GithubHelp home page GithubHelp logo

portaudio's People

Contributors

aknuds1 avatar bejayoharen avatar philburk avatar robiwano avatar rossbencina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

portaudio's Issues

error in example min is not found in this code

line of code is

ring_buffer_size_t elementsToWrite = min(elementsWriteable, (ring_buffer_size_t)(framesPerBuffer * NUM_CHANNELS));

error is

src/paex_record.c: In function ‘int recordCallback(const void_, void_, long unsigned int, const PaStreamCallbackTimeInfo_, PaStreamCallbackFlags, void_)’:
src/paex_record.c:209:117: error: ‘min’ was not declared in this scope
src/paex_record.c: In function ‘int playCallback(const void_, void_, long unsigned int, const PaStreamCallbackTimeInfo_, PaStreamCallbackFlags, void_)’:
src/paex_record.c:234:113: error: ‘min’ was not declared in this scope

Replay the same WAV file many times in a loop

Actually, replay itself works, and the issue is only when the playing stops to replay the same stream again. I'm writing headless D-BUS service for playing WAV file.
API is quite simple as:

  • start(path)
  • stop()

When the first play comes it runs the following steps

Pa_Initialize(...)
sf_open(...)
Pa_OpenDefaultStream(...)
Pa_SetStreamFinishedCallback(..)
Pa_StartStream(...)

And the system starts playing.
When playing finished I'm not closing the stream and waiting for the next command. If the user asks me to replay the same file again.

I'm making sf_seek to the start and calling Pa_StartStream on the same stream and getting PaError = 'Stream is not stopped'.Actually, it's stopped. I have checked it in the finished callback.
If I will close the stream and open it again everything works like a charm.

Does it mean that I need to close the stream after each file play?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.