Pause Toggle Switch (is this correct)

Started by nobody,

nobody

I am using delphi and I created a button on a form to toggle the playing/paused state of the current song using the code below and I was wondering if this is the correct way to do this.

here is my code

procedure TForm1.Button1Click(Sender: TObject);
begin
if Bass_ChannelIsActive(song) = Bass_Active_Playing then
Bass_Pause()
else
Bass_Start()
end;

or should I be doing it like this

procedure TForm1.Button1Click(Sender: TObject);
begin
if Bass_ChannelIsActive(song) = Bass_Active_Playing then
Bass_ChannelPause(song)
else
Bass_ChannelResume(song)
end;

And finally what is the difference between them.

nobody

What I mean to say in the above post was what is the difference between them if you are only playing one sound at a time I understand that channel pause/resume only works on the channel you specify and bass pause/start work on all chanels but when you only use one channel what is the difference.

Irrational86

No difference when you use one channel...the only difference is the code, that in one you dont need to pass a channel as parameter, and in the other you do..thats all

Basically, no difference..