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

Author Topic: SoundBuffer creation freezes the application  (Read 2868 times)

0 Members and 2 Guests are viewing this topic.

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
SoundBuffer creation freezes the application
« on: March 05, 2012, 09:09:05 pm »
Using SFML.Net, latest bindings from GitHub.

Code: [Select]
 SoundBuffer soundBuffer = new SoundBuffer(fileInfo.FullName);

This code brings the debugger here.

Code: [Select]
public SoundBuffer(string filename) :
                base(sfSoundBuffer_CreateFromFile(filename))
            {
                if (CPointer == IntPtr.Zero)
                    throw new LoadingFailedException("sound buffer", filename);
            }


The application is frozen and I can't seem to find the problem, it worked with the previous bindings.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SoundBuffer creation freezes the application
« Reply #1 on: March 05, 2012, 10:39:47 pm »
Quote
This code brings the debugger here

With what error message and call stack?
Laurent Gomila - SFML developer

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
SoundBuffer creation freezes the application
« Reply #2 on: March 05, 2012, 11:01:29 pm »
Maybe I'm doing something wrong, but I don't see any exception/error. The application seems to keep running, but it doesn't go through the code I posted. If I press "start" on the debugger, nothing else happens but it seems to be responsive. If I press "break all", then the debugger brings me at the

 
Code: [Select]
public SoundBuffer(string filename) :
                base(sfSoundBuffer_CreateFromFile(filename))
            {
                if (CPointer == IntPtr.Zero)
                    throw new LoadingFailedException("sound buffer", filename);
            }


code but no exceptions or errors appear.

Can I help you in any other way?

 

anything