server icon indicating copy to clipboard operation
server copied to clipboard

Allow system-audio to specify output device

Open pbelbin opened this issue 3 years ago • 6 comments

Logs the current available OpenAL devices.

Allows .config file to have within the screen (which uses OpenAL for audio) consumer element:

<system-audio>
   <device-name>[device name from OpenAL device list]</device-name>
</system-audio>

When matching device is found, use that instead of system default.

pbelbin avatar Feb 21 '21 01:02 pbelbin

Who can review and commit this change?

I saw a comment emailed to me re comment from @dimitry-ishenko, but I no longer see the comment here, so I suppose it was retracted/deleted before I can respond?

Please advise!

pbelbin avatar Feb 21 '21 21:02 pbelbin

@pbelbin I was going to suggest to use move semantics when passing around configuration and replace C-style casts with static_cast, but then I've realized I didn't have the time to examine the code and decided it wasn't that important.

Disclaimer: my opinion has no bearing on whether your PR is accepted, so feel free to ignore my suggestion. :smile:

dimitry-ishenko avatar Feb 21 '21 23:02 dimitry-ishenko

I discovered something interesting while testing another usage scenario.

Initially, I was using CasparCG to use 2 video outputs (alpha and fill) as a single channel, with a single audio output (to the 'fill' video output). This works nicely.

But, I then started trying use of 4 video outputs (2 channels, each with alpha and fill), and each with it's own audio output (or so I thought).

With the 2 channel scenario, I see in the logging that I have added, that the enumeration of available audio devices is happening twice, and each time, the configured output audio device names are shown and found (which suggests they are both being used, too), but, audio for both sets of playout channels only ever appears in one of the output devices. It's like it's ignoring that the 2nd channel has it's own audio device when it comes to actually outputting audio.

Because I happen to have CasparCG feeding all video outputs to a single video switch, it's not a huge problem. But, it's a bit disconcerting, and, would cause issues if the 2 output channels were being fed to 2 totally different switchers!

Can someone provide some additional information here? What is supposed to happen as far as audio handling of multiple video card outputs being used as separate channels?

Without knowing more about how CasparCG is designed in this respect, it's hard to say whether this is 'normal' and 'expected', or whether it's a 'bug'.

pbelbin avatar Feb 22 '21 00:02 pbelbin

It appears that this is some kind of known behavior with plain video card outputs, based on this comment, but I have to say, I think it's pretty strange for this to be 'normal behavior'.

Perhaps this is partly because so few people are using plain video cards for output, and it just doesn't come up that often (similar to why the system default device was being used on every start-up).

Perhaps this will be improved in the future, but it appears, this is not a bug.

pbelbin avatar Feb 23 '21 21:02 pbelbin

hey there @Julusian, do you have an idea as to when this will be reviewed?

pbelbin avatar Mar 13 '21 15:03 pbelbin

Hey @ronag , it's been nearly a month, and @Julusian has not provided any feedback or response at all. What normally happens in this project when that sort of thing happens? Can/should someone else be tagged to review it?

pbelbin avatar Apr 13 '21 01:04 pbelbin

Very excited to try the next build after the merge.

In the end, are we allowed to specify different system-audio devices in the same config? That opens up Caspar to feed Dante networks.

I'd appreciate an example of how to set the devices, I guess I'll find one in the config file itself.

Thanks a lot!

Sidonai-1 avatar May 25 '23 17:05 Sidonai-1

In the end, are we allowed to specify different system-audio devices in the same config?

Not yet, this still only allows for one system audio device to be used.

Julusian avatar May 25 '23 17:05 Julusian