Skip to content

First buffer lost when trying to write to stream #1

@RyanG2016

Description

@RyanG2016

This article was an amazing read and really help me be able to create a recording app that I am using to stream audio to a server over websockets.
I am running into an issue that is really stumping me though. I need to find a way to delay the AudioQueue callback from running until the websocket is open and we get a response from the server. It usually happens within one buffer cycle (~500ms) but since I can't send until the socket is ready, the first buffer never gets to the server and seems to get dropped. If I write to a file it's all there with no issue.
I am requesting the websocket connection as soon as the user clicks record so I can't do that any better than it is.
Anyways, if you have any suggestions it would be appreciated. I should note that I'm not using objc but swift 5

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