Broadcast output soundchannel?

Started by Ed1966,

Ed1966

Hi,

I can currently broadcast trough a loopback device, but the volume is the same as the source. Can I also stream to a "SoundDevice," or only to loopback channels?

Currently, I'm using:
LoopbackDevice (21, WASAPI): 1 - PHL 272B8Q (AMD High Definition Audio Device)

But I'd like to:
SoundDevice (1): 1 - PHL 272B8Q (AMD High Definition Audio Device)

But I also see: Better?
OutputDevice (20, WASAPI): 1 - PHL 272B8Q (AMD High Definition Audio Device)
 
So I want to capture and stream audio with, for example, an extra boost.

Please help me.

Ian @ un4seen

Do you just want to change the level of the recording? If so, you can do that with the recording channel's BASS_ATTRIB_VOLDSP setting.

Ed1966

Yes but not right now.
I use Loopback for broadcast but i want to use output device

Not use: LoopbackDevice (21, WASAPI): 1 - PHL 272B8Q (AMD High Definition Audio Device)

BUT: OutputDevice (20, WASAPI): 1 - PHL 272B8Q (AMD High Definition Audio Device)

But i don't know that wil work?
Like outputdevice > Mixer and mixer > Cast.



Ian @ un4seen

A "loopback" device captures what's playing on the corresponding output device, so the mentioned loopback device will capture the sound from the mentioned output device, like you want? Is there a particular reason that you don't want to use the loopback device?

Ed1966

Yes because if I put sound level at 50% or 0% the end user broadcast is also 0% or 50% soundlevel and that must bij always 100% sound.

Ian @ un4seen

What volume control are you using? Device volume controls shouldn't affect loopback recording.

If the sound that you want to record is being generated by BASS, then another way you can record it is via a BASS device output stream. Something like this:

outstream = BASS_StreamCreate(0, 0, 0, STREAMPROC_DEVICE, 0); // get device output stream
encoder = BASS_Encode_Start(outstream, cmdline, BASS_ENCODE_QUEUE, 0, 0); // set an encoder (async) on it

Ed1966

I want to stream the audio that's playing outside of my program. So this is just a streaming utility. That's why I need the Loopback.
There's not much else I can do about it.

Since the sound outside my program is sometimes loud or soft, you'll hear that at the receiver's end too.
I do see that there are tools like Voicemeeter and Virtual Cable.

If there's anything else I can do in my own source code—other than a DSP boost—let me know, otherwise we can close this thread :-)

Ian @ un4seen

If the volume controls are in other software then unfortunately I don't think there's much you can do about that in your app. I don't think a virtual cable will help because the software's own volume controls will still apply whatever the output device is. I think the only thing you can do is to adjust the level of your recording, eg. with BASS_ATTRIB_VOLDSP or perhaps a compressor (eg. BASS_FX_BFX_COMPRESSOR2 effect). You can use BASS_ChannelGetLevelEx to detect what the recording's level is, and decide if it needs adjusting.

Ed1966

Do you have a little snippit to start. the Mixer HSTREAM is known.

Chris

#9
A Mixer is not needed for that.Because you will have only 1 Stream.
A Mixer is normally needed if you want to mix multiple streams.
About your Volume Problem:
If you want only a higher Volume on the Loopback Stream then you can try
the BASS_FX_BFX_DAMP (Dynamic Amplification/Autogain) Effect from the Bass_FX Packages.
If you want a more punchy Sound (FM-Radio like) then
the BASS_FX_BFX_COMPRESSOR2 Effect from the bass_FX Package.
e/g something like this.
var
  Form1: TForm1;
  AutoGain_DSP :DWORD = 0;
  AutoGain_OPT :BASS_BFX_DAMP;
-----
procedure Autogain(FStart:boolean = true);
begin
  if not FStart then
    BASS_ChannelRemoveFX(encoder, AutoGain_DSP); 
  else 
    AutoGain_DSP := BASS_ChannelSetFX(encoder, BASS_FX_BFX_DAMP, 1);
end;