aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
Commit message (Collapse)AuthorAge
...
* ao_coreaudio: refactor playGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: extract mixmode set/unset in utility functionsGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: move AudioStreamChangeFormat to common file and refactorGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: extract methods to lock/unlock device for digital outputGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: lpcm: remove buffer size calculation depending on audio unitGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: refactor initializationGravatar Stefano Pigozzi2013-07-22
| | | | | | | | | | | | | The initialization is split more clearly between compressed and lpcm case. For the compressed case, format selection is simplified a lot and negotiation removed. The way it was written it just passed back to the core the original requested format, not what was found available on hardware. Since this is most likely useless for the compressed case, I didn't bother with this. In the future I'd like to split this AO in two one that only uses the AUHAL and the other with direct access to the hardware so that even passthrough of lcpm can be possible. This would decrease the latency, audiophiles would like that.
* ao_coreaudio: refactor print_helpGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: split out some utility functions and refactor themGravatar Stefano Pigozzi2013-07-22
| | | | | | | Split out some utility functions that use the CoreAudio API but are not related the main task of the AOs (which is to move data correctly to the ringbuffer). These are mainly need for the verbosity of the CoreAudio API and are just obscuring the 'real' code.
* ao_coreaudio: make variable names shorterGravatar Stefano Pigozzi2013-07-22
| | | | property_address -> p_addr
* ao_coreaudio: add error check function and macroGravatar Stefano Pigozzi2013-07-22
| | | | WIP
* ao_coreaudio: dry up ca_msg and use it everywhereGravatar Stefano Pigozzi2013-07-22
| | | | | Change the ca_msg macro to pass along MSGT_AO automatically. Also use it for every output for consistency.
* ao_coreaudio: simplify digital render callbackGravatar Stefano Pigozzi2013-07-22
| | | | | It was reported that it also works by not setting the read size in the AudioBuffer (now idea how, but I will discover it later).
* ao_coreaudio: rewrite spdif render callbackGravatar Stefano Pigozzi2013-07-22
|
* ao_coreaudio: simplify render callbackGravatar Stefano Pigozzi2013-07-22
| | | | | | | Read only the requested amount by the AUHAL (instead of all the buffered data). No idea what the deal is with pausing the audio units if there is no audio to play, maybe to avoid underruns of some sort. Anyway from my tests this condition never occurred so I'm removing it all.
* af_bs2b: use new option APIGravatar wm42013-07-22
|
* af_lavfi: switch to new option APIGravatar wm42013-07-22
| | | | | This makes it actually possible to use the filter with more complicated filter graphs (such as graphs containing the "," character).
* af_scaletempo: use new option APIGravatar wm42013-07-22
|
* af_lavrresample: switch to new option APIGravatar wm42013-07-22
| | | | | Also add a "o" suboption, which should allow fine control over libavresample.
* af_force: use new option APIGravatar wm42013-07-22
|
* audio/filter: use new option APIGravatar wm42013-07-22
| | | | | | | | | | | | | Make the VF/VO/AO option parser available to audio filters. No audio filter uses this yet, but it's still a quite intrusive change. In particular, the commands for manipulating filters at runtime completely change. We delete the old code, and use the same infrastructure as for video filters. (This forces complete reinitialization of the filter chain, which hopefully isn't a problem for any use cases. The old code forced reinitialization too, but it could potentially allow a filter to cache things; e.g. consider loaded ladspa plugins and such.)
* af_force: add option that causes filter to fail at initializationGravatar wm42013-07-22
| | | | This is useful for debugging.
* af: fix recovery code for filter insertion (changing volume with spdif crash)Gravatar wm42013-07-22
| | | | | | | | | | | | This code is supposed to run if dynamic filter insertion (such as when inserting a volume filter in mixer.c) fails. Then it removes all filters and recreates the default list of filters. But the code just blew up and entered an endless loop, because it removed even the sentinel in/out filters. This could happen when trying to use softvol controls while using spdif, but also other situations. Fix it by calling the correct code. Also remove these obnoxious yoda-conditions.
* audio/decode: remove macro crapGravatar wm42013-07-22
| | | | | Declare decoders directly, instead of using the LIBAD_EXTERN macro. This is simpler (no weird magic) and more extensible.
* ao_wasapi: Make default on Windows.Gravatar Diogo Franco (Kovensky)2013-07-22
| | | | Ahead of OSS because cygwin provides OSS.
* ao_wasapi: Fix S/PDIF passthrough initGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | | MSDN tells me to multiply the samplerates by 4 (for setting up the S/PDIF signal frequency), but doesn't mention that I'm only supposed to do it on the new, NT6.1+ IEC 61937 structs. Works on my Realtek Digital Output, but as I can't connect any hardware to it I can't hear the result. Also, always ask for little-endian AC3. I'm not sure if this is supposed to be LE or NE, but Windows is LE on all platforms, so we go with LE.
* ao_wasapi: Log the passthrough format in MSGL_VGravatar Diogo Franco (Kovensky)2013-07-22
|
* ao_wasapi: Also do passthrough for AF_FORMAT_MPEG2Gravatar Diogo Franco (Kovensky)2013-07-22
| | | | That's the sample format ad_spdif uses when the source is MP3.
* ao_wasapi: Support S/PDIF passthroughGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | Entirely untested as this troper has no S/PDIF hardware. Refuses trying any other format if we can't use passthrough, or we would end up sending white noise at the user.
* ao_wasapi: Fix double free on uninitGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | Caused by incorrect conversion to the m_option API: since we don't allocate the state ourselves, we also don't free it ourselves.
* ao_wasapi: Support loading devices by nameGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | Do an strstr match against the device description and, if we have only a single match, take it. This works as long as the devices in the system don't change, but it's not supposed to be reliable; if one wants reliability, one uses the device ID string. Formatting.
* ao_wasapi: Don't search for devices as part of validationGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | | | This could turn valid parameters into syntax errors by the mere presence or abscence of a device (e.g. USB audio devices), so don't do that. We do validate that, if the parameter is an integer, it is not negative. We also respond to the "help" parameter, which does the same as the "list" suboption but exits after listing. Demote the validation logging to MSGL_DBG2.
* ao_wasapi: Change function macros to require semicolon after invocationGravatar Diogo Franco (Kovensky)2013-07-22
| | | | Add semicolons where they were missing.
* ao_wasapi: Use OPT_STRING_VALIDATE for device suboptionGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | | | | | | | | | Validates by trying to pick the device using the device enumerator and aborting with out of range on failure. Refactors find_and_load_device to not use the wasapi_state; it might be called during validation. Adds missing CoInitialize/CoUninitialize calls. Remove unused variables (the SAFE_RELEASE macros keep them referenced so compiler warnings don't help finding them...). Remove the IMMDeviceEnumerator from the wasapi_state, it's only needed during initialization and initialization is now well factored enough to get rid of it. Try and connect to unplugged devices as well when using the device ID string.
* ao_wasapi: Fully convert to m_option APIGravatar Diogo Franco (Kovensky)2013-07-22
|
* ao_wasapi: Don't leak the default device's ID when listing devicesGravatar Diogo Franco (Kovensky)2013-07-22
| | | | Also remove unused variable.
* ao_wasapi: Annotate the default device when listing devicesGravatar Diogo Franco (Kovensky)2013-07-22
|
* ao_wasapi: Refactor device listing/loadingGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | | | | Omit "{0.0.0.00000000}." on devices that start with that substring, re-add when searching for devices by ID. Log the device ID of the default device. Log the friendly name of the used device. Consistently refer to endpoints/devices as devices, as this is more consistent with mpv terminology.
* ao_wasapi0: Rename to ao_wasapiGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | Nobody knows what the 0 was for. There's no "WASAPI version 0". Just take it out.
* ao_wasapi0: Use the mix format directly in try_mix_formatGravatar Diogo Franco (Kovensky)2013-07-22
|
* ao_wasapi0: Don't complain about failed init during AO probingGravatar Diogo Franco (Kovensky)2013-07-22
| | | | Only if the user specifically asked for ao_wasapi0.
* ao_wasapi0: Don't fail init when listing devicesGravatar Diogo Franco (Kovensky)2013-07-22
|
* ao_wasapi0: Demote "negotiation failed" message to MSGL_VGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | Could spam the console with what may be harmless in some cases. We already complain loudly if we're stuck checking this too many times.
* ao_wasapi0: Support shared mode, better format guessing methodGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | | | | | | | | | | | | | | Uses WASAPI in shared mode by default, add :exclusive flag to choose exclusive mode (duh). WASAPI works somewhat different in shared mode: the OS suggests the sample format to use, and the GetBuffer call is done slightly differently. The shared mode driver does not consume audio as fast as it notifies the thread; we need to check how much we're allowed to write. Not doing this correctly results in spamming the console with AUDCLNT_E_BUFFER_TOO_LARGE errors. When guessing formats for exclusive mode, try several sample size and sample rate combinations instead of just falling back to s16le@44100hz. If none of the rates are accepted, tries remixing >6 channels to 5.1 channels. Failing that, tries remixing to stereo. Failing everything, including the CD Red Book format, what else is left to test? Calculate buffer_block_size based on the configured channels and bytes per sample; MSDN docs say nBlockAlign is not guaranteed to be set for anything but integer PCM formats.
* ao_wasapi0: Support device enumeration and selectionGravatar Diogo Franco (Kovensky)2013-07-22
| | | | | | | | | Adds the :list suboption to ao_wasapi0, which enumerates the audio endpoints in the system. Adds the :device=<n> suboption, which either takes an ID string (as output by list) or a device number and uses the requested device instead of the system default.
* ao_dsound: use new option APIGravatar wm42013-07-22
|
* ao_jack: use new option APIGravatar wm42013-07-22
|
* ao_oss: switch to new option APIGravatar wm42013-07-21
|
* options: remove --mixer and --mixer-channel, turn them into alsa/oss suboptsGravatar wm42013-07-21
| | | | | | These two options were supported by ALSA and OSS only. Further, their values were specific to the respective audio systems, so it doesn't make sense to keep them as top-level options.
* ao_rsound: use new option APIGravatar wm42013-07-21
| | | | | Untested. I don't even know if this compiles. I have no clue what rsound even is.
* ao_sdl: use new option APIGravatar wm42013-07-21
|