Skip to content

Importing sounddevice interrupts other audio streams on Windows when exclusive mode is enabled #496

@arkrow

Description

@arkrow

As the title mentions, importing sounddevice interrupts any currently playing audio streams momentarily on Windows when exclusive mode is enabled on the sound device. This issue seems to originate from PortAudio's initialization logic, however, I can't seem to pinpoint the problematic code there, and there isn't a similar issue opened there either.

To replicate the issue:

  1. On Windows 10/11, enable exclusive mode on the default sound device.
  2. Run any audio stream in the background (it doesn't seem necessary for the stream to be using exclusive mode)
  3. import sounddevice (can be run in the python interactive interpreter; the current audio stream will be interrupted as a result)

This issue does not occur if exclusive mode is disabled in the sound device. I'd assume this issue can be reproduced on Windows 7 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions