reactos/sdk/lib/drivers/sound/mmebuddy/readme.txt
Oleg Dubinskiy 24e088daa8
[MMEBUDDY] Implement support for looped wave playback (#6761)
Fix playing wave header multiple times in case the caller requests to do it.
In Windows, it is supported by WHDR_BEGINLOOP and WHDR_ENDLOOP flags (specified together) and dwLoops member of WAVEHDR structure (ususally set to 0xFFFFFFFF (INFINITE constant)).
- Check whenther WHDR_BEGINLOOP | WHDR_ENDLOOP flags are set by the caller.
- If they are, get the amount of times to play the header from WAVEHDR.dwLoops.
- Perform wave header competion only when the loop count is equal to zero. Otherwise, don't do it.
- When the header is entirely committed, in case completion is not needed, reset committed bytes count to the starting value to allow the header play again.
- Decrement loop count in case it isn't set to INFINITE, to mark loop as played correctly. When this count becomes zero, then the playback is finished.
- Get rid from SOUND_OVERLAPPED.PerformCompletion member. Use SOUND_DEVICE_INSTANCE.LoopsRemaining == 0 condition instead.
- Do this only for WaveOut devices, since MSDN states it works only with output buffers. Hence, there is nothing changed for WaveIn.
- Update an appropriate statement about unimplemented functionality from mmebuddy notes.
TODO: handle the case when multiple headers are requested to be looped (WHDR_BEGINLOOP and WHDR_ENDLOOP are set separatedly: 1st flag - in the 1st header, and 2nd in the last header). Currently, only looping a single wave header is supported.
This fixes the playback in the apps those request looped wave playback of some audio data (e. g., BRD Demo app, which did play its sound only first 500 ms before, now it plays endlessly until closing it manually).
CORE-10118
2024-04-24 11:08:40 +02:00

91 lines
1.9 KiB
Plaintext

MME BUDDY
This library currently is capable of maintaining lists of devices for all of
the MME types, it will provide the appropriate entrypoints for each device
type, and code using this library simply needs to inform the MME Buddy
library of the devices that exist, and provide callback routines to be used
when opening/closing/playing, etc.
Code using this library needs to provide its own DriverProc entrypoint (this
may be refactored in future so that simply an init/cleanup routine need be
provided.)
WAVE OUTPUT
===========
Supported MME messages:
* WODM_GETNUMDEVS (Get number of devices)
* WODM_GETDEVCAPS (Get device capabilities)
* WODM_OPEN (Open a device, query supported formats)
* WODM_CLOSE (Close a device)
* WODM_PREPARE (Prepare a wave header)
* WODM_UNPREPARE (Unprepare a wave header)
* WODM_WRITE (Submit a prepared header to be played)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* WHDR_BEGINLOOP and WHDR_ENDLOOP are not working for looping multiple wave headers, only for a single header.
* Not possible to pause/restart playback
WAVE INPUT
==========
Supported MME messages:
* WIDM_GETNUMDEVS (Get number of devices)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* Mostly unimplemented
MIDI OUTPUT
===========
Supported MME messages:
* MODM_GETNUMDEVS (Get number of devices)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* Mostly unimplemented
MIDI INPUT
==========
Supported MME messages:
* MIDM_GETNUMDEVS (Get number of devices)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* Mostly unimplemented
AUXILIARY
=========
Supported MME messages:
* AUXM_GETNUMDEVS (Get number of devices)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* Mostly unimplemented
MIXER
=====
Supported MME messages:
* MXDM_GETNUMDEVS (Get number of devices)
Unsupported MME messages:
* Any not mentioned above
Notes/Bugs:
* Mostly unimplemented