24 May '13 - 09:31 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Delphi XE2 and FMBassDemo  (Read 669 times)
fitz906
Posts: 6


« on: 2 Apr '12 - 18:45 »
Reply with quoteQuote

I'm new to BASS.  I use Delphi XE2 and have had no problem running the VCL examples that come with the BASS package.  Then I downloaded and tried the FMBassDemo and have had no luck getting it to play.  Everything compiles fine (and yes, I made the slight code adjustment to the Open Dialog filter) and I am able to locate the files I want.  But they do not play.  I tried this as a 32 bit Win .exe and an OS-X build, but no luck either way.  Could anyone tell me what I am doing wrong?
Logged
Ionut Cristea
Posts: 1376


« Reply #1 on: 2 Apr '12 - 18:54 »
Reply with quoteQuote

 What return BASS_ErrorGetCode ?
Logged
fitz906
Posts: 6


« Reply #2 on: 2 Apr '12 - 19:08 »
Reply with quoteQuote

BASS_StreamCreateFile is returning a HSTREAM chan value of $B0000001 and the call to

BASS_ChannelPlay(chan, False);

is returning false.
« Last Edit: 2 Apr '12 - 19:26 by fitz906 » Logged
fitz906
Posts: 6


« Reply #3 on: 2 Apr '12 - 19:55 »
Reply with quoteQuote

Added some code to check the BASS_ErrorGetCode value.  It returned a value of 4  =  BASS_ERROR_BUFLOST after the call to BASS_ChannelPlay(chan, False);
Logged
fitz906
Posts: 6


« Reply #4 on: 2 Apr '12 - 20:48 »
Reply with quoteQuote

Well, for some reason, setting the Win Handle to 0 in the call to BASS_Init makes everything okay and all files play well.  Don't know why this would be but, hey, if it works, it works Huh?
Logged
Ian @ un4seen
Administrator
Posts: 15270


« Reply #5 on: 3 Apr '12 - 14:10 »
Reply with quoteQuote

BASS_ERROR_BUFLOST can result from using an invalid window handle in the BASS_Init call. Using 0 there tells BASS to take the handle of the foreground window, which may not belong to your app, so it is generally better to provide your app's main window handle whenever possible. What handle were you using when you got the BASS_ERROR_BUFLOST error?

BASS_ERROR_BUFLOST is a Windows/DirectSound thing that doesn't apply to other platforms, so if you're having trouble on OSX too, it will be something else that is going wrong there; are you getting a different error code from a different function?
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines