Commit Graph

103 Commits

Author SHA1 Message Date
Chris Robinson
0e1fd34c89 Fix a temp buffer leak in alffplay 2018-01-05 20:41:55 -08:00
Chris Robinson
10f2531b6c Handle the audio clock diff as nanoseconds in alffplay 2018-01-05 05:41:57 -08:00
Chris Robinson
fd8143fea0 Use a non-recursive mutex for alffplay's source lock 2018-01-03 19:05:25 -08:00
Chris Robinson
9d61f429a5 Use ALC_SOFT_device_clock in alffplay 2018-01-02 19:32:28 -08:00
Chris Robinson
dcc0f6e25d Improve starting synchronization in alffplay
It waits until the internal buffers are filled before starting playback, then
triggering the audio and video to start as close together as possible.
2018-01-02 03:31:12 -08:00
Chris Robinson
21684fac69 Inline and simplify some code 2018-01-01 22:28:28 -08:00
Chris Robinson
329333ca8b Don't leak the AVIOContext 2018-01-01 19:16:05 -08:00
Chris Robinson
91e20dc12e Fix a couple alffplay comments still referencing Alure 2018-01-01 18:54:15 -08:00
Chris Robinson
aecfa0b426 Make smart pointer wrappers for some ffmpeg types 2018-01-01 18:47:48 -08:00
Chris Robinson
9675068706 Print the running time and duration in alffplay 2018-01-01 16:15:32 -08:00
Chris Robinson
cbd55ad31e Use aliases to simplify some time type names 2018-01-01 02:26:39 -08:00
Chris Robinson
5eb1753d31 Wrap av_gettime to ensure it's interpreted as microseconds 2018-01-01 01:39:28 -08:00
Chris Robinson
e277f5e268 Rename the do_direct_out variable 2018-01-01 01:14:53 -08:00
Chris Robinson
145bf52b7a Use a less-intense memory order to check for quitting 2018-01-01 01:13:32 -08:00
Chris Robinson
fe7bdc93eb Check for AL_SOFT_direct_channels once when initializing 2018-01-01 01:07:29 -08:00
Chris Robinson
d889435334 Declare the total buffer time instead of buffer count 2018-01-01 01:04:47 -08:00
Chris Robinson
dad17a7d91 Use a std::array for the buffers in alffplay 2018-01-01 00:32:27 -08:00
Chris Robinson
830adf6ae8 Use inline member initialization where possible 2018-01-01 00:17:40 -08:00
Chris Robinson
babfa70cab Make more values global const 2018-01-01 00:02:51 -08:00
Chris Robinson
258eadd003 Use a global to specify alffplay's audio sync threshold 2017-12-31 23:44:33 -08:00
Chris Robinson
48916ebd76 Clear the buffer queue when underrun 2017-12-31 16:29:52 -08:00
Chris Robinson
506d316f55 Wake up the packet send loop when more frames are needed 2017-12-31 16:11:00 -08:00
Chris Robinson
490b71378e Readd AL_SOFT_source_latency support to alffplay 2017-12-30 23:12:19 -08:00
Chris Robinson
0e8b0c520e Use standard duration types for stream clocks 2017-12-30 22:46:09 -08:00
Chris Robinson
0136df1e62 Improve the alffplay queue for FFmpeg's send/receive API
The packet handling thread now calls avcodec_send_packet to give compressed
data to libavcodec, while the audio/video threads call avcodec_receive_frame to
handle decoded frames. The packet thread still maintains local queues for each
stream to avoid starving an A/V thread when the other doesn't want another
frame yet.
2017-12-30 20:34:33 -08:00
Chris Robinson
8253014fe9 Fix some types to make MSVC happy 2017-12-17 15:56:30 -08:00
Chris Robinson
0e2e9e9a29 Add a simple non-streaming play example 2017-11-07 23:12:12 -08:00
Chris Robinson
4ec67e6226 Add missing include for std::array 2017-07-23 00:18:32 -07:00
Chris Robinson
5048322fff Update alffplay's command line message 2017-07-11 00:38:52 -07:00
Chris Robinson
56a33ef955 Print the opened device in alffplay 2017-07-05 12:32:19 -07:00
Chris Robinson
74139c914d Skip past the -device switch even if the device doesn't open 2017-07-01 20:44:56 -07:00
Chris Robinson
cb83f48105 Add an option to enable direct channels for alffplay 2017-07-01 19:18:57 -07:00
Chris Robinson
4b7cbb50ab Add a whitenoise generator to altonegen 2017-06-25 08:00:55 -07:00
Chris Robinson
be552a35e6 Support 32-bit float with the recording example 2017-06-25 06:10:20 -07:00
Chris Robinson
e07166e93c Add a recording example app 2017-06-23 05:19:24 -07:00
Chris Robinson
07bb5f1322 Add a missing include 2017-05-28 00:53:33 -07:00
Chris Robinson
5308ea7e2a Put the app name after filename in the window title 2017-05-07 04:29:18 -07:00
Chris Robinson
710bbde09c Ensure SDL_AUDIO_BITSIZE is defined for older SDL2 versions 2017-04-07 03:33:03 -07:00
Chris Robinson
c040491615 Update alffplay for newer ffmpeg and convert to C++ 2017-03-05 01:20:19 -08:00
Chris Robinson
87fd288359 Remove unnecessary wrappers around SDL_sound
Also remove wrappers for the now-unsupported buffer_samples extension.
2017-03-04 22:30:57 -08:00
Chris Robinson
4486043ae5 Skip audio packets that fail to decode in alffplay 2016-09-14 13:37:20 -07:00
Chris Robinson
0f24f49a44 Allow specifying the device to open for the examples 2016-09-08 12:14:28 -07:00
Chris Robinson
6d7f9aacd6 Print whether direct channels are off or on to stdout in alffplay 2016-08-29 22:18:44 -07:00
Chris Robinson
4859984e33 Add an option to alffplay to toggle AL_DIRECT_CHANNELS_SOFT
Using the 'd' key will toggle the playback source's AL_DIRECT_CHANNELS_SOFT
property. Although there is no visual feedback showing when it's on or off.
2016-08-29 01:55:44 -07:00
Chris Robinson
d8e9b3c621 Also rotate stereo sounds in the alhrtf example 2016-08-24 03:49:45 -07:00
Ryan P.C. McQuen
69af50cadb Fix for ffmpeg.
Closes https://github.com/kcat/openal-soft/issues/48.
2016-07-21 08:09:31 -07:00
gero
cec03f39ae fix audio play error in sample
fix audio play error in sample
2016-04-22 17:33:00 +08:00
Chris Robinson
0c4653085c Don't request a specific HRTF when one isn't specified 2016-03-11 21:01:32 -08:00
Chris Robinson
4fb2526779 Fix "signed and unsigned type in conditional expression" warning 2016-01-24 02:29:26 -08:00
Chris Robinson
482372577e Avoid using usleep in the examples
We already have an al_nssleep wrapper in the common lib we can use.
2015-12-04 19:09:48 -08:00