diff --git a/assets/musics/music_win.ogg b/assets/musics/music_win.ogg index eadd8eff..ee5195e3 100644 Binary files a/assets/musics/music_win.ogg and b/assets/musics/music_win.ogg differ diff --git a/lib/Ray/sources/Window.cpp b/lib/Ray/sources/Window.cpp index e91f6112..a9a1d9bf 100644 --- a/lib/Ray/sources/Window.cpp +++ b/lib/Ray/sources/Window.cpp @@ -40,7 +40,6 @@ RAY::Window::Window(int width, int height, std::string title, unsigned flags, bo { if (openNow) this->open(); - InitAudioDevice(); } bool RAY::Window::open(void) @@ -50,6 +49,7 @@ bool RAY::Window::open(void) } InitWindow(this->_dimensions.x, this->_dimensions.y, this->_title.c_str()); this->_isOpen = true; + InitAudioDevice(); return true; } diff --git a/sources/Component/Music/MusicComponent.cpp b/sources/Component/Music/MusicComponent.cpp index 49bb03ff..8d2656e3 100644 --- a/sources/Component/Music/MusicComponent.cpp +++ b/sources/Component/Music/MusicComponent.cpp @@ -15,6 +15,8 @@ namespace BBM this->volume = 1; } + float MusicComponent::volume; + WAL::Component *MusicComponent::clone(WAL::Entity &entity) const { return new MusicComponent(entity, this->_musicPath); diff --git a/sources/Component/Sound/SoundComponent.cpp b/sources/Component/Sound/SoundComponent.cpp index ddbddb77..b74fcc9b 100644 --- a/sources/Component/Sound/SoundComponent.cpp +++ b/sources/Component/Sound/SoundComponent.cpp @@ -25,6 +25,8 @@ const std::map &soundPath) } } + float SoundComponent::volume; + WAL::Component *SoundComponent::clone(WAL::Entity &entity) const { return new SoundComponent(entity, this->_soundPath);