Author Topic: How do you play a wave file in delphi with Bass  (Read 4555 times)

vidiware

  • Posts: 6
c:\test.wav

Can someone tell me how to play that file everytime button1 is pressend?

(: JOBnik! :)

  • Posts: 1080
Re: How do you play a wave file in delphi with Bas
« Reply #1 on: 15 May '03 - 15:49 »
Hi ;D

There're a lot of examples in BASS package, just choose your programming language that you're using, under the language Directory name and you'll find what you're seeking for :)

Have fun!

8) JOBnik! 8)

vidiware

  • Posts: 6
Re: How do you play a wave file in delphi with Bas
« Reply #2 on: 15 May '03 - 16:28 »
The problem is not the examples...
but how exactly do you open a file...
im just looking for some code... because im getting the error:

Cardinal and String is incompatible types

Ghostwalker

  • Posts: 35
Re: How do you play a wave file in delphi with Bas
« Reply #3 on: 15 May '03 - 19:13 »
Simple as posible:

var
 MyStream : HStream;

begin
 mystream :=  Bass_StreamCreateFile(false,Pchar('C:\your.wav'),0,0,0);
 if mystream <> 0 then
   Bass_StreamPlay(MyStream,true,0);
end;

You also can use the BASS_SAMPLE-Functions to do this.

Greetings Ghostwalker

vidiware

  • Posts: 6
Re: How do you play a wave file in delphi with Bas
« Reply #4 on: 15 May '03 - 20:01 »
thanx...
this Bass System is great!!

vidiware

  • Posts: 6
Re: How do you play a wave file in delphi with Bas
« Reply #5 on: 16 May '03 - 07:43 »
Well now i have done that...
how do you initzialize bass and make it ready to play that sound?  ::)

Ghostwalker

  • Posts: 35
Re: How do you play a wave file in delphi with Bas
« Reply #6 on: 16 May '03 - 15:43 »
Have a closer look to the demos that come with bass. There are the init's for bass. Also the helpfile may help you.:)

vidiware

  • Posts: 6
Re: How do you play a wave file in delphi with Bas
« Reply #7 on: 19 May '03 - 20:34 »
im learining fast...
the bass system is really nice