1,079
edits
(→Mixer: update isReady() comment, add some stuff from my personal TODO) |
|||
Line 106: | Line 106: | ||
* Consider changing the mixer volume to use range 0-255, for sake of consistency (but at a slight loss of efficiency). Note that this requires changes in at least rate.cpp and mixer.cpp. | * Consider changing the mixer volume to use range 0-255, for sake of consistency (but at a slight loss of efficiency). Note that this requires changes in at least rate.cpp and mixer.cpp. | ||
* Some of our engines support the speech_mute / sfx_mute / music_mute options, but most don't. Almost all support the corresponding FOO_volume config keys. All engines use Mixer::setVolumeForSoundType to push those through to the mixer. I am wondering: Maybe it would make sense to remove Mixer::setVolumeForSoundType, and instead leave it up to the mixer to query the ConfigManager for the corresponding FOO_volume/_mute values? That way we'd ensure 100% identical behavior in all engines and actually simplify the code a bit... ? Not sure if this would work smoothly, it needs to be investigated. | * Some of our engines support the speech_mute / sfx_mute / music_mute options, but most don't. Almost all support the corresponding FOO_volume config keys. All engines use Mixer::setVolumeForSoundType to push those through to the mixer. I am wondering: Maybe it would make sense to remove Mixer::setVolumeForSoundType, and instead leave it up to the mixer to query the ConfigManager for the corresponding FOO_volume/_mute values? That way we'd ensure 100% identical behavior in all engines and actually simplify the code a bit... ? Not sure if this would work smoothly, it needs to be investigated. | ||
* the "isReady" code is irritating. Most engines ignore it anyway. It's primary purpose is to allow ScummVM to run even if not digitial audio out is available. A better solution would likely be to enforce that all backends always return a valid mixer. In the worst case, if a backend cannot produce audio output, it should still instantiate an Audio::MixerImpl, with some arbitrary sample rate (I recommend 22050 Hz), and a fake playback thread, which acts like an audio output callback but simply discards the generated audio data. (Note: It doesn't suffice to just throw away input data in Mixer::playInputStream, as this breaks with QueuingAudioStream). | |||
* the "isReady" code is irritating. Most engines ignore it anyway. It's primary purpose is to allow ScummVM to run even if not digitial audio out is available. A better solution would likely be to | * document the semantics of sound handles and sound ids | ||
* Are there backends which could benefit from a 'custom' mixer? If so, what would be required to implement such a thing? Needs talking to porters | |||
==== CD ==== | ==== CD ==== |
edits