24 May '13 - 09:31
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Un4seen Developments Forum
>
Developments
>
BASS
> Topic:
Delphi XE2 and FMBassDemo
Pages: [
1
]
« previous
|
next »
Reply
|
Print
Author
Topic: Delphi XE2 and FMBassDemo (Read 669 times)
fitz906
Posts: 6
Delphi XE2 and FMBassDemo
«
on:
2 Apr '12 - 18:45 »
Quote
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
Delphi XE2 and FMBassDemo
«
Reply #1 on:
2 Apr '12 - 18:54 »
Quote
What return BASS_ErrorGetCode ?
Logged
fitz906
Posts: 6
Delphi XE2 and FMBassDemo
«
Reply #2 on:
2 Apr '12 - 19:08 »
Quote
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
Delphi XE2 and FMBassDemo
«
Reply #3 on:
2 Apr '12 - 19:55 »
Quote
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
Delphi XE2 and FMBassDemo
«
Reply #4 on:
2 Apr '12 - 20:48 »
Quote
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
?
Logged
Ian @ un4seen
Administrator
Posts: 15270
Re: Delphi XE2 and FMBassDemo
«
Reply #5 on:
3 Apr '12 - 14:10 »
Quote
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
Un4seen Developments Forum
>
Developments
>
BASS
> Topic:
Delphi XE2 and FMBassDemo
« previous
|
next »
Jump to:
Please select a destination:
-----------------------------
Developments
-----------------------------
=> BASS
=> XMPlay
=> MO3
-----------------------------
Off Topic
-----------------------------
=> General Discussion
Loading...