Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple output support #129

Open
ajmirsky opened this issue Jun 24, 2021 · 1 comment
Open

multiple output support #129

ajmirsky opened this issue Jun 24, 2021 · 1 comment

Comments

@ajmirsky
Copy link

If more than one output is initialized, no sound is heard from either output.

This works:

speakers = sc.all_speakers()
mics = sc.all_microphones()

front_speaker = speakers[0]
input = mics[0]

with input.recorder(samplerate=48000) as mic, \
      front_speaker.player(samplerate=48000) as f_sp:
    for _ in range(100):
        data = input.record(numframes=1024)
        f_sp.play(data)

Neither speaker plays audio in this case:

speakers = sc.all_speakers()
mics = sc.all_microphones()

front_speaker = speakers[0]
rear_speaker = speakers[1]
input = mics[0]

with input.recorder(samplerate=48000) as mic, \
      front_speaker.player(samplerate=48000) as f_sp, \
      rear_speaker.player(samplerate=48000) as r_sp:
    for _ in range(100):
        data = input.record(numframes=1024)
        f_sp.play(data)
        r_sp.play(data)

Is this a limitation of pulseaudio? I'm aware of module-combine-sink but the goal will be to process (control volume, frequency) front/rear speakers separately.

Since there is no error message, I'm not sure where to start to debug. Guidance appreciated.

@bastibe
Copy link
Owner

bastibe commented Jun 28, 2021

Usually, a "speaker" in SoundCard's terms refers to a sound card. Each sound card has several channels, corresponding to individual physical loudspeakers.

So you'd need to address individual channels of your main "speaker" in order to control front/rear speakers separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants