Skip to content

Commit

Permalink
[SoftAE][CA] update to use new CAEWAVLoader API
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffrey McRae committed Sep 26, 2012
1 parent ae03425 commit 5d4d74f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAESound.cpp
Expand Up @@ -42,6 +42,7 @@ CCoreAudioAESound::CCoreAudioAESound(const std::string &filename) :
m_volume (1.0f ),
m_inUse (0 )
{
m_wavLoader.Load(filename);
}

CCoreAudioAESound::~CCoreAudioAESound()
Expand All @@ -57,17 +58,18 @@ std::string CCoreAudioAESound::GetFileName()

void CCoreAudioAESound::DeInitialize()
{
m_wavLoader.DeInitialize();
}

bool CCoreAudioAESound::Initialize()
{
DeInitialize();

if (!m_wavLoader.Initialize(m_filename, AE.GetSampleRate()))
if (!m_wavLoader.IsValid())
return false;

return m_wavLoader.Remap(AE.GetChannelLayout());
return m_wavLoader.Initialize(
AE.GetSampleRate (),
AE.GetChannelLayout(),
AE_CH_LAYOUT_INVALID
);
}

void CCoreAudioAESound::SetVolume(float volume)
Expand Down

0 comments on commit 5d4d74f

Please sign in to comment.