Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play.go example aiff file sounds "strange" #55

Open
rabidmachine9 opened this issue Nov 4, 2022 · 2 comments
Open

play.go example aiff file sounds "strange" #55

rabidmachine9 opened this issue Nov 4, 2022 · 2 comments

Comments

@rabidmachine9
Copy link

Trying to playback an aiff file with the play.go example, playback is almost correct still the sound is weird like there is some kind of bandpass filter shadowing a frequency range. There is no problem with the file it plays correctly in other players. Are all files supposed to play correctly in the example or maybe I should change the some configurations ?

Not sure if this is a problem with the code or it is supposed to be that way.
Thanks for any support

@rabidmachine9
Copy link
Author

Ok, I am pretty sure what is happening is that I am using a stereo file and the example is supposed to play mono, still could someone guide me to make it play properly ?

@gordonklaus
Copy link
Owner

It might be as simple as passing 2 instead of 1 as the second argument to OpenDefaultStream. This assumes your audio file has the samples interleaved (left, right, left, right, ...), which I think is typical. If they're not interleaved, it will take a bit more work to pass them to the portaudio stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants