Skip to content

Open() blocking forever #14

@diamondburned

Description

@diamondburned

The issue

In https://github.com/yobert/alsa/blob/master/device.go#L107, the os.OpenFile call does not have a syscall.O_NONBLOCK flag. I suspect this is causing the beep example on my pure ALSA setup to block. (I've tested and nailed it down to the Open() method). This does not happen with PulseAudio.

Proposal:

Add syscall.O_NONBLOCK like so:

device.fh, err = os.OpenFile(device.Path, os.O_RDWR | syscall.O_NONBLOCK, 0755)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions