there's a bug in BASS_WMA_EncodeOpenPublish.
Calling BASS_WMA_EncodeOpenPublish on a publishing point and afterwards calling another time this function on another publishing point, made the second encoder (that is instantiated correctly) connect on the first publishing point ignoring its settings.
briefly, this code doesn't work:
procedure TForm4.Button4Click(Sender: TObject);
begin
enc := BASS_WMA_EncodeOpenPublish(
44100,
2,
BASS_WMA_ENCODE_SCRIPT or BASS_UNICODE,
48000,
pchar('http://www.myserver.com/pp1'),
pchar('myusername'),
pchar('mypassword')
);
enc2 := BASS_WMA_EncodeOpenPublish(
44100,
2,
BASS_WMA_ENCODE_SCRIPT or BASS_UNICODE,
48000,
pchar('http://www.myserver.com/pp2'),
pchar('myusername2'),
pchar('mypassword2')
);
end;
this results in enc2 connect to pp1 instead of pp2.
instead this code works fine:
procedure TForm4.Button2Click(Sender: TObject);
begin
enc := BASS_WMA_EncodeOpenPublish(
44100,
2,
BASS_WMA_ENCODE_SCRIPT or BASS_UNICODE,
48000,
pchar('http://www.myserver.com/pp1'),
pchar('myusername'),
pchar('mypassword')
);
end;
procedure TForm4.Button3Click(Sender: TObject);
begin
enc2 := BASS_WMA_EncodeOpenPublish(
44100,
2,
BASS_WMA_ENCODE_SCRIPT or BASS_UNICODE,
48000,
pchar('http://www.myserver.com/pp2'),
pchar('myusername2'),
pchar('mypassword2')
);
end;
pushing first button2 and after button3, every encoder connects to its correct publishing point.
seems there's something "global" inside bass that doesn't have time to reset, or something similar.
----
I'm using the latest version of bass and basswma in delphi 2009