variables again to let the threads end normally. Re-implenented the method
closewaveoutput() for some modules, move the destructor code to it and call it
after leaving the mixer thread. This fixes a deadlock in the "soundwin" module
if Bochs is compiled with plugin support.
- Renamed OSS sound driver files from soundlnx.cc/.h to soundoss.cc/.h.
- Removed "pseudo device plugin" containing common code and specific drivers.
- Moved common sound code, base classes of sound drivers and the dummy driver
to the Bochs core. Now loading sound driver plugins in soundmod.cc.
- Created separate plugins for the platform/library specific drivers and the
"file" driver.
- Modified Bochs plugin system to support now plugin type PLUGTYPE_SOUND.
either libsamplerate or the SoX resampler library installed. If not installed,
the data is only copied to the output buffer and sample rate of the output
driver is changed similar to legacy code. Related changes:
- Added check for libsamplerate or SoX resampler header files in configure
script.
- Added functions for converting source format to float (requied by resampler)
and float to output format.
- Added support for float type data in the audio buffer code. Buffer chain #0
receives float data from sendwavepacket() and buffer #1 receives data for
mixing and output in format "16-bit signed little endian stereo".
- ALSA: Disable builtin resampling feature if resampler is present to avoid
doing it twice.
sendwavepacket() directly calls the conversion method and output(). In all other
cases it puts the unmodified data into a buffer and the conversion thread is
doing the main job and puts the data into the output buffer chain.
TODO: resampling could also be done by the new thread.
- Moved BX_INIT_MUTEX() call to start_mixer_thread() to reduce code duplication.
- Call BX_FINI_MUTEX() only when the mixer thread and mutex was really used.
- Added the capability to load up to 4 sound drivers and added methods to
get pointers to the waveout, wavein and midiout services of a driver.
- Rewrite of the SB16 midi file output code. In midimode 2 and 3 the midiout
service of the 'file' driver is used. Removed obsolete midi file handling.
- Re-implemented the closemidioutput() method to make runtime changes of the
midi setup work with the new code.
creates the object and returns a pointer to it. TODO: Rewrite of the sound
configuration to support a more detailed setup (e.g. waveout with alsa,
dummy wavein, midiout to a file).
creates the object and returns a pointer to it. TODO: The wavein and midiout
components should also move to separate classes. When finished, it should be
possible to configure the sound support more detailed (e.g. waveout with sdl,
midiout with alsa and the dummy driver for wavein). Creating a separate
module for the output to file(s) is also possible.
'alsa'. Cleaned up the code a little bit.
TODO #1: Implement mixer thread support in the OSX sound driver.
TODO #2: Code cleanups in the Bochs sound code.
TODO #3: Resampling support and improvements in the wave recording code.
- soundlow: prepared code for 2 pcm parameter sets:
emulated: requested by sendwavepacket()
real: used for the sound output
- soundsdl: startwaveplayback() rewritten to set_pcm_data().
- soundmod: some beep init code fixes.
- Define new structure bx_pcm_param_t and use it as a parameter for the method
sendwavepacket(). The method startwavepacket() is now called from
sendwavepacket() in case of a parameter change (temporary solution).
- soundsdl: Replaced waveready() call by some more accurate code for buffer
space check in sendwavepacket().
- soundsdl: Moved code for reading from audio buffer to a new function.
- soundsdl: Temporarily increase the audio buffer size.
- Preparing the SB16 code for the OPL emulation port from DOSBox.
- ALSA stuff moved from soundlnx.* to new soundalsa.* files
- SB16 / ES1370: including specific sound driver headers not necessary
- updated dependencies