Registriert seit: 15. Nov 2003
Ort: Berlin
946 Beiträge
Delphi 10.2 Tokyo Professional
|
AW: BASS.dll Probleme
20. Mai 2024, 19:14
So wird das nix. Hast Du die Hilfe- und Beispiel-Dateien? Da ist auch etwas zu WMA dabei.
Was Du auf jedenfall benötigst ist ein Encoder.
Delphi-Quellcode:
...
// start recording & encoding
procedure TForm1.Start;
begin
// initialize encoder - let system choose port, max 5 clients
ehandle := BASS_WMA_EncodeOpenNetwork(SAMPLERATE, CHANNELS, BASS_WMA_ENCODE_SCRIPT, strtoint(combobox1.Text), 0, 5);
{
If you want mutible Bitrates then you must do it on this way
little Example
var
Bitrates : array [0..3] of DWORD = (64000,128000,160000,0);
ehandle := BASS_WMA_EncodeOpenNetworkMulti(SAMPLERATE, CHANNELS, BASS_WMA_ENCODE_SCRIPT, @Bitrates, 0, 5);
}
if (ehandle = 0) then
begin
MessageBox(0, 'Can''t initialize encoding', 'Error', 0);
Exit;
end;
BASS_WMA_EncodeSetTag(ehandle, 'Title', PChar(Edit1.Text), BASS_WMA_TAG_ANSI); // set WMA title tag
BASS_WMA_EncodeSetNotify(ehandle, @ClientConnect, 0); // setup client notification
time := 0;
displaycount := 0;
// start recording
rchan := BASS_RecordStart(SAMPLERATE, CHANNELS, 0, @RecordingCallback, 0);
if (rchan = 0) then
begin
MessageBox(0, 'Can''t start recording', 'Error', 0);
BASS_WMA_EncodeClose(ehandle);
Exit;
end;
Button1.Caption := 'Stop';
Edit1.Enabled := False;
Edit1.Color := clBtnFace;
ComboBox1.Enabled := False;
ComboBox1.Color := clBtnFace;
Edit2.Enabled := True;
Edit2.Color := clWindow;
Timer1.Enabled := True;
end;
...
|
|
Zitat
|