I need to connect to a shoutcast server and stream live audio with Delphi FMX compiled for Android.
I'm able to connect to the server with the function BASS_Encode_CastInit, but have not idea how to start the broadcast process. In general my code is.
if Not BASS_RecordInit(0) then
ShowMessage('Error on Init bass')
vChan:=BASS_RecordStart(44100, 2, BASS_RECORD_PAUSE, @RecordingCallback, 0);
if vChan = 0 then
begin
ShowMessage('Couldn''t start recording!');
exit;
end;
if not BASS_Encode_CastInit(Encoder,'https://myserver',
mypassword,
BASS_ENCODE_TYPE_OGG,
PAnsiChar(AnsiString('')),
PAnsiChar(AnsiString('')),
PAnsiChar(AnsiString('')),
PAnsiChar(AnsiString('')),
'',
128,
false) then
begin
ShowMessage('Couldn''t setup connection with server');
BASS_ChannelStop(vChan);
rchan := 0;
exit;
end;
;
but now I don't know how to continue to start the data transmission process to the server.
Could someone tell me in Delphi or another language or pseudocode how to continue? keep in mind that i need it for android, lame.exe is not available