Skip to content

Manually building stream formats  #465

Description

@degol

Hello everyone,

I’m new to CPAL, and I’m trying to port an audio processing application to rust based web application. I have a couple of questions that I couldn’t find the answers of which in the documentation provided.

  1. In the machine that I’m using, the possible buffer-size range is set to “unknown”, but when I set it to any value, including the default values, I keep getting the following error:
    Error: The requested stream configuration is not supported by the device.

This is how I'm manually configuring it

    let sample_rate: cpal::SampleRate = SampleRate{0: 44100 as u32};
    let buffer_size: cpal::BufferSize = BufferSize::Default;
    let config: cpal::StreamConfig =  StreamConfig { channels : 1, sample_rate, buffer_size };
  1. Is there any way to get pure raw data other than PCM ? Right now I need the pure sampled raw data, before its converted to PCM

It would be really great if anyone can drop a helpful link here.

Thank you!

.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions