Author Topic: BASS_ASIO_Monitor  (Read 302 times)

SotirisPapad

  • Posts: 15
BASS_ASIO_Monitor
« on: 15 Apr '17 - 07:36 »
I am try this function to hear mic sound without latency in my headphones.
Is it possimple ?
I can't understud the gain and pan parameter. 


Ian @ un4seen

  • Administrator
  • Posts: 19987
Re: BASS_ASIO_Monitor
« Reply #1 on: 17 Apr '17 - 16:25 »
Assuming you want the sound to be centred at 0 dB (normal level), then "gain" should be set to 0x20000000 and "pan" set to 0x40000000, like this:

Code: [Select]
result = BASS_ASIO_Monitor(input, output, 0x20000000, 1, 0x40000000);

Note that BASS_ASIO_Monitor isn't supported by all devices, and the output/gain/pan settings may also be ignored by some. In that case, you could use BASS_ASIO_ChannelEnableMirror instead:

Code: [Select]
result = BASS_ASIO_ChannelEnableMirror(output, true, input);

SotirisPapad

  • Posts: 15
Re: BASS_ASIO_Monitor
« Reply #2 on: 18 Apr '17 - 00:49 »
I tried but it's hard for me.
If you have some code for Delphi would be very useful for me

3delite

  • Posts: 878
Re: BASS_ASIO_Monitor
« Reply #3 on: 18 Apr '17 - 10:45 »
This seems working here:

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
begin
    // not playing anything via BASS, so don't need an update thread
    BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD,0);
    // init BASS (for the FX)
    BASS_Init(0,44100,0,0,nil);

    // init ASIO - first device
    if not (BASS_ASIO_Init(0,0)) then begin
        BASS_Free();
        ShowMessage('Can''t initialize ASIO');
    end;

    if NOT BASS_ASIO_ChannelEnableMirror(0, true, 0) then begin
        Showmessage('Error: BASS_ASIO_Monitor ' + IntToStr(BASS_ASIO_ErrorGetCode));
    end;

    if NOT BASS_ASIO_ChannelEnableMirror(1, true, 1) then begin
        Showmessage('Error: BASS_ASIO_Monitor ' + IntToStr(BASS_ASIO_ErrorGetCode));
    end;

    BASS_ASIO_Start(0,1);

end;

SotirisPapad

  • Posts: 15
Re: BASS_ASIO_Monitor
« Reply #4 on: 24 Apr '17 - 09:37 »
BASS_ASIO_ChannelEnableMirror  and Asioproc ????? 
Asio drivers and BASS_ChannelSlideAttribute(Stream,BASS_ATTRIB_VOL,0,2000);
is working with asio drivers ?
« Last Edit: 24 Apr '17 - 09:42 by SotirisPapad »

Ian @ un4seen

  • Administrator
  • Posts: 19987
Re: BASS_ASIO_Monitor
« Reply #5 on: 24 Apr '17 - 17:26 »
You don't need an ASIOPROC callback function when using BASS_ASIO_ChannelEnableMirror. If you want to implement an ASIOPROC function, then you should use BASS_ASIO_ChannelEnable instead of BASS_ASIO_ChannelEnableMirror.

BASS_ChannelSlideAttribute won't have any direct effect on ASIO output; you can use BASS_ASIO_ChannelSetVolume instead to adjust the level. If you happen to be feeding a mixer to an ASIO output, then BASS_ChannelSlideAttribute would have effect on the mixer's sources.

SotirisPapad

  • Posts: 15
Re: BASS_ASIO_Monitor
« Reply #6 on: 28 Apr '17 - 12:58 »
How can i record from my asio card ?
I want record microphone and music.

Ian @ un4seen

  • Administrator
  • Posts: 19987
Re: BASS_ASIO_Monitor
« Reply #7 on: 28 Apr '17 - 17:04 »
It depends on what input channels your ASIO device/driver has. You can use the pre-compiled LIST.EXE example included in the BASSASIO package (C\BIN folder) to quickly check that.

SotirisPapad

  • Posts: 15
Re: BASS_ASIO_Monitor
« Reply #8 on: 28 Apr '17 - 18:56 »
List.exe is runing but after is closing and i can't see
I have tascam 4x4
4 inpouts and 4 outputs

Ian @ un4seen

  • Administrator
  • Posts: 19987
Re: BASS_ASIO_Monitor
« Reply #9 on: 2 May '17 - 13:02 »
The pre-compiled LIST.EXE example should be run in a Command Prompt window. You can then copy'n'paste the text from there.