Skip to content

Reinit a drained stream behaves strange in audiounit. #537

@achronop

Description

@achronop

As I mentioned in #528 there is an issue when a drained stream reinits due to a device plug/unplug. The STR is:

  1. Create a playback or duplex stream and start it.
  2. Let the stream drain. Drain state callback will fire.
  3. Plug or unplug a device to create a reinit of the stream.

The strange behavior is that a drain state callback will be fired for a second time on step 3. This is because, on reinit, the stream is started again. However, the str->drain flag is set to true so the stream drains again and the callback is fired. The expected woulf be to end up with a stopped stream at that point.

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