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

Author Topic: AL_INVALID_OPERATION from SFML 2.3 Audio  (Read 9149 times)

0 Members and 1 Guest are viewing this topic.

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: AL_INVALID_OPERATION from SFML 2.3 Audio
« Reply #15 on: June 25, 2015, 10:11:17 pm »
Windows 8.1 64-bit
VS 2013
SFML 32-bit.
Did you try it in debug mode?

Sorry, should've clarified, I tried both Debug and Release.
Only dynamic though, not static. (it was 2 AM. :) )

Though, it looks like VS doesn't define DEBUG automatically in Debug builds (grumble grumble), it defines _DEBUG (note the underscore). So that'd be why I could not reproduce. I can try again after work, thought it looks like that may be redundant.

@Nexus:
Yeah, when googling and looking at the Github I thought that macro was pretty... interesting. The two statement macro + if-statement without braces didn't click for me though.
Heh, that may be why my workplace's coding standards require braced if-statements...

But yeah, you're right. Who knows what else could be caused by similar errors? I'm interested in the effects on client code. I'll try that branch out on some of my existing code and see if anything breaks.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: AL_INVALID_OPERATION from SFML 2.3 Audio
« Reply #16 on: June 25, 2015, 10:33:10 pm »
While you are at it, you might want to fix the glCheck(...) function also.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: AL_INVALID_OPERATION from SFML 2.3 Audio
« Reply #17 on: June 26, 2015, 12:19:29 am »
While you are at it, you might want to fix the glCheck(...) function also.
Yup: :)
I would like to do something similar for glCheck(), because such macros are bloody time bombs.

I renamed the branch to bugfix/robust_check_macros because it handles both alCheck and glCheck. I used the opportunity to improve the diagnostic output of those macros, mainly by incorporating the expression string and making the log more readable. Instead of:
Quote
An internal OpenGL call failed in userfile.cpp(50) : GL_INVALID_ENUM, an unacceptable value has been specified for an enumerated argument
the output is now:
Quote
An internal OpenGL call failed in userfile.cpp(50).
Expression:
   glBegin(GL_TRIANGLES)
Error description:
   GL_INVALID_ENUM
   An unacceptable value has been specified for an enumerated argument.

Still needs testing, feel free to experiment :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Hapax

  • Hero Member
  • *****
  • Posts: 3346
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: AL_INVALID_OPERATION from SFML 2.3 Audio
« Reply #18 on: June 26, 2015, 12:25:00 am »
Wow, Nexus. That was blooming quick!  :o

The new error message format looks miles better too.

Looks promising  :)
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: AL_INVALID_OPERATION from SFML 2.3 Audio
« Reply #19 on: June 26, 2015, 01:13:54 am »
I would like to do something similar for glCheck(), because such macros are bloody time bombs.

Woops :/ Missed that xD

Anyways, the new error messages look good :D
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor