Giter Site home page Giter Site logo

Popping when playing multiple sounds about finch HOT 3 OPEN

zoul avatar zoul commented on July 21, 2024
Popping when playing multiple sounds

from finch.

Comments (3)

zoul avatar zoul commented on July 21, 2024

Same problem experienced by pwightman:

I'm essentially using Finch as a sampler of sorts for when users press notes, it plays the sample I've recorded
corresponding to that note. But every time I call "Stop" on the sound, I get a small but noticeable popping sound. It
happens sometimes when multiple sounds are played at once when the sound begins, but always happens when you
release the sound. Any idea why it might be? I'm not necessarily sure if it has much to do with your code, but I've
searched and searched for why this might be happening and can't find anything that fixes it anywhere.

from finch.

NickCulbertson avatar NickCulbertson commented on July 21, 2024

I have a hacky fix. I found that the pop occurs when alSourceStop(source) occurs. Pausing the sound does not cause a pop but you must pause the sound before the sound ends naturally and call the play function again to get the sound to the rest.

so I have

- (void) rewind 
{
    CLEAR_ERROR_FLAG;
    alSourcePlay (source);
    alSourcePause(source);
    // [self performSelector:@selector(rewind2) withObject:self afterDelay:1.1];
}

- (void) play
{
    // if (self.playing)
    // [self stop];
    CLEAR_ERROR_FLAG;
    alSourcePlay(source);
    [self checkSuccessOrLog:@"Failed to start sound"];
}

and when I stop the sound now I call.

sitar.gain=0.01;
[self rewind];

This plays the sound from the start and pauses it instantly. When I play the sound again there are no pops.

Nick

from finch.

zoul avatar zoul commented on July 21, 2024

Nick, thanks for the info! I’ll leave the issue open until it’s fixed here on GitHub. (Not sure when I’ll have the time yet.)

from finch.

Related Issues (20)

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.