Results 1 to 7 of 7

Thread: Problem with sound

  1. #1

    Thumbs down Problem with sound

    I try to work with ClanLib 2.1.1 compiled myself, (also tried with compilled version from webpage)... and I've got an error ...example as shown below:

    Application displays a message:

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.


    And this is a fragment of code:
    Code:
    ...
    #include <ClanLib/sound.h>
    ...
    CL_SetupGL setup_gl;
    
    CL_SetupSound setup_sound;
    CL_SoundOutput sound_output(44100);
    
    CL_SoundBuffer sample("powerup.wav");
    sample.play();
    ...
    I was trying to run example (Sound from ClanLib Example dir) - works ONLY Vorbis (wav and xm/mod - aren't working).
    What's wrong?

    My configuration:
    Windows 32 bit XP sp3
    Visual C++ Express 2008 SP1
    ClanLib 2.1.1 Windows - debug multithreaded static (compiled succesfully)

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    It is difficult to tell what's wrong with the fragment of code.

    It may be as simple as your not catching the CL_Exception, and it cannot find the filename.

    Does the "Shadowofthebeast" example play music?

  3. #3

    Default HI

    Quote Originally Posted by rombust View Post
    It is difficult to tell what's wrong with the fragment of code.

    It may be as simple as your not catching the CL_Exception, and it cannot find the filename.

    Does the "Shadowofthebeast" example play music?
    Not, this is from Sound , this is next example.
    I tried to catch exception, and .... I caught it For example - If there is no proper sample filename I will always catch exception. :....
    CL_IODeviceProvider_File ::CL_IODeviceProvider_File(): Unable to open file....

    But when filename exists (and everything should be ok) window appears
    "Unhandled exception at 0x0071eb15 in ClanA2.exe: 0xC000001D: Illegal Instruction."
    and.... Visual Studio opens sound_sse.cpp from ClanLib sources on line (code):
    __m128 samples0 = _mm_cvtepi32_ps(_mm_srai_epi32(_mm_unpacklo_epi16( zero, isamples0), 16));
    I've changed wav file - no effect.

    What's wrong?

  4. #4
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    What processor do you have in your computer?

  5. #5

    Default

    Quote Originally Posted by Magnus Norddahl View Post
    What processor do you have in your computer?
    AMD Athlon XP 2200 +

    I know, that poor

    Grettings
    M.

  6. #6
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    The problem is that your CPU does not support SSE2 instructions. You need an AMD Athlon 64 or Intel Pentium 4 or newer CPU before it will recognize these opcodes.

    This leaves you with 2 options: either you buy a newer CPU or you can contribute some non-SSE implementations of the functions in question. What they do is not that advanced, but they are in time critical code.

  7. #7

    Default hi

    Thanks for advice.
    I should to change my computer long time ago.

    Best regards.
    M.

Similar Threads

  1. problem with 0.8.0 and sound in gentoo
    By unghio in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 06-03-2008, 10:28 AM
  2. Sound Input
    By shade37337 in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 09-22-2007, 01:01 AM
  3. ClanLib 0.8 Sound
    By Nikitto46 in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 09-07-2007, 10:56 AM
  4. weather and sound
    By in forum RTsoft Tavern
    Replies: 4
    Last Post: 08-11-2007, 09:36 PM
  5. Turning of sound
    By Daij-Djan in forum RTsoft Tavern
    Replies: 1
    Last Post: 03-31-2004, 09:52 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •