From c33bb63cbd9db867511c8bdb91afaa3c33b5b274 Mon Sep 17 00:00:00 2001 From: Chris Warren-Smith Date: Sun, 14 Aug 2011 20:12:03 +1000 Subject: BADA: Increased audio thread priority to avoid sound skipping in some games --- backends/platform/bada/audio.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'backends/platform/bada') diff --git a/backends/platform/bada/audio.cpp b/backends/platform/bada/audio.cpp index 8f4252737f..48874d69bc 100755 --- a/backends/platform/bada/audio.cpp +++ b/backends/platform/bada/audio.cpp @@ -51,7 +51,9 @@ AudioThread::AudioThread() : Audio::MixerImpl *AudioThread::Construct(OSystem *system) { logEntered(); - if (IsFailed(Thread::Construct(THREAD_TYPE_EVENT_DRIVEN))) { + if (IsFailed(Thread::Construct(THREAD_TYPE_EVENT_DRIVEN, + DEFAULT_STACK_SIZE, + THREAD_PRIORITY_HIGH))) { AppLog("Failed to create AudioThread"); return null; } @@ -135,6 +137,12 @@ bool AudioThread::OnStart(void) { } int sampleRate = _mixer->getOutputRate(); + + // ideally we would update _mixer with GetOptimizedSampleRate here + if (_audioOut->GetOptimizedSampleRate() != sampleRate) { + AppLog("Non optimal sample rate %d", _audioOut->GetOptimizedSampleRate()); + } + if (IsFailed(_audioOut->Prepare(AUDIO_TYPE_PCM_S16_LE, AUDIO_CHANNEL_TYPE_STEREO, sampleRate))) { -- cgit v1.2.3