SYMBIAN: Fixes & improvements for SymbianSdlMixerManager (untested)
svn-id: r54519
This commit is contained in:
parent
7760077cf5
commit
f1cdb318c6
4 changed files with 17 additions and 43 deletions
|
@ -58,7 +58,7 @@ void SdlMixerManager::init() {
|
|||
}
|
||||
|
||||
// Get the desired audio specs
|
||||
SDL_AudioSpec desired = getAudioSpec();
|
||||
SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC);
|
||||
|
||||
// Start SDL audio with the desired specs
|
||||
if (SDL_OpenAudio(&desired, &_obtainedRate) != 0) {
|
||||
|
@ -78,7 +78,7 @@ void SdlMixerManager::init() {
|
|||
}
|
||||
}
|
||||
|
||||
SDL_AudioSpec SdlMixerManager::getAudioSpec() {
|
||||
SDL_AudioSpec SdlMixerManager::getAudioSpec(uint32 outputRate) {
|
||||
SDL_AudioSpec desired;
|
||||
|
||||
// Determine the desired output sampling frequency.
|
||||
|
@ -86,7 +86,7 @@ SDL_AudioSpec SdlMixerManager::getAudioSpec() {
|
|||
if (ConfMan.hasKey("output_rate"))
|
||||
samplesPerSec = ConfMan.getInt("output_rate");
|
||||
if (samplesPerSec <= 0)
|
||||
samplesPerSec = SAMPLES_PER_SEC;
|
||||
samplesPerSec = outputRate;
|
||||
|
||||
// Determine the sample buffer size. We want it to store enough data for
|
||||
// at least 1/16th of a second (though at most 8192 samples). Note
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue