Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cannot load a wav file  (Read 3204 times)

0 Members and 1 Guest are viewing this topic.

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Cannot load a wav file
« on: February 17, 2012, 04:59:30 pm »
I have been trying to run the cpp file provided with the tutorial (http://www.sfml-dev.org/tutorials/1.6/audio-sound.php) and I keep getting an error message in the console "Failed to load sound buffer from file "sound.wav".

I use visual studio 2008. I have copied all dll from extdll and the sfml-audio.dll to the release folder. a wav file with the name "sound.wav" is also copied to the same folder.

following is what I got in the output section of the IDE.

Code: [Select]
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\SFMLTest.exe', Symbols loaded.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\sfml-system.dll'
'SFMLTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll'
'SFMLTest.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\sfml-audio.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\openal32.dll', Binary was not built with debug information.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll'
'SFMLTest.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2008\Projects\SFMLTest\Release\libsndfile-1.dll', Binary was not built with debug information.
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\propsys.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\wdmaud.drv'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\ksuser.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\avrt.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\AudioSes.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msacm32.drv'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msacm32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\midimap.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
The thread 'Win32 Thread' (0xd88) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xbe4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x544) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x193c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x14c0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xb6c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xa34) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xfe0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1578) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1460) has exited with code 1 (0x1).
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll'
'SFMLTest.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll'
The program '[6548] SFMLTest.exe: Native' has exited with code 1 (0x1).


Need your help. Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Cannot load a wav file
« Reply #1 on: February 17, 2012, 06:53:05 pm »
Quote
I have copied all dll from extdll and the sfml-audio.dll to the release folder

You're in debug mode, not release.

And if you run the executable from the IDE, the working directly may be the project directory by default, not the executable one. You can set the working directory in the project settings (under "Debugging").
Laurent Gomila - SFML developer

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Cannot load a wav file
« Reply #2 on: February 17, 2012, 07:12:48 pm »
Thanks. that solved the problem.