Hello,
I'm new here. My name is Jürgen from Mannheim Germany and I'm 74 year old.
I writting a program at Delphi 11.2 on Windows 10.
I am a radioamateur and i will make a program which receive weatherfax from satellite.
So I receive the Audiosignal from mein Receiver at Soundcard 8_USB.
I'm writtung the sound to a WAV-File.
It working well.
But I want to control the sound with my headphone at soundcard 6-USB
But there are no sound. I don't know why.
I show you the important instruction of my program
audioein2 = Number of soundcard 8-USB from BASS_RecordGetDevice
audioaus2 = Number of Soundcard 6-USB from BASS_GetDevice
if BASS_Init(audioaus2,44100,0,Handle,nil) then
begin
bassret:=BASS_Start;
bassret:=BASS_SetConfig(BASS_CONFIG_BUFFER,50);
bassret:=BASS_SetConfig(BASS_CONFIG_DEV_BUFFER,50);
bassret:=BASS_SetDevice(audioaus2);
ChannelOutput:=Bass_StreamCreate(44100,2,Bass_Sample_Float or BASS_STREAM_DECODE,@Proc_Out,nil);
if ChannelOutput > 0 then
begin
bassret:=BASS_ChannelPlay(ChannelOutput, False);
bassret:=BASS_ChannelSetAttribute(ChannelOutput,BASS_ATTRIB_VOL,1);
if BASS_RecordInit(audioein2) then
begin
if InitDevice(audioein2) then
begin
bassret:=BASS_RecordSetInput(0,BASS_INPUT_ON,-1);
ChannelInput:=BASS_RecordStart(44100,2,0,@RecordingCallback,nil);
if (ChannelInput > 0) then
begin
lautin:=lautina;
bassret:=BASS_ChannelPlay(ChannelInput, True);
bassret:=BASS_ChannelGetInfo(ChannelInput,audioinfo);
bassret:=BASS_ChannelSetAttribute(ChannelInput,BASS_ATTRIB_VOL,lautin/100);
.......................
function Proc_Out(Handle: HRecord; buffer: Pointer; length: DWord; user: Pointer): boolean; stdcall;
var x2: Cardinal;
begin
Result:=True;
end;
function RecordingCallback(Handle: HRecord; buffer: Pointer; length: DWord; user: Pointer): boolean; stdcall;
var rueck: Boolean;
var x4: integer;
var x2: Cardinal;
var x8: string;
begin
rueck:=False;
if Length > 0 then
begin
x2:=WaveStream.Write(buffer^,length);
x2:=Bass_StreamPutData(ChannelOutput,buffer,length);
rueck:=True;
x4:=satname.Length;
if x4 > 3 then
begin
x8:=Copy(satname,1,4);
if modulation <> '' then
begin
if x8 = 'AFU-' then
begin
// RTTY
end else begin
// FAX
// must have the real Volume
end;
end;
end else begin
rueck:=False;
end;
end;
Can anybody help me?
Another Questions:
How ca I get the real Volume of the Sound?
the instruction 'bassret:=BASS_ChannelGetAttribute(ChannelInput,BASS_ATTRIB_VOL,volume);'brings only the set volumelevel, no change.
I have seen at this forum a version with BASS_Mixer. But they need the WASAPI and I don't know where I get it.
How can I get the real Frequencies of the Audiosignal?
Satellite Audiosignal is 2400 Hz AM.
Thank you and kind regards
Jürgen