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

Static Audio #68

Open
BlackSheepBoy69 opened this issue Apr 11, 2023 · 2 comments
Open

Static Audio #68

BlackSheepBoy69 opened this issue Apr 11, 2023 · 2 comments

Comments

@BlackSheepBoy69
Copy link

BlackSheepBoy69 commented Apr 11, 2023

In RetroFlow/HexFlow/etc there's an issue with the "click" sound. Use the analog stick to move while spamming the "R" button is an easy way to get it: the audio overlaps and causes a super loud glitch sound. You might say "well that's easy, don't hold analog stick and spam R button" but once you have enough apps installed, it happens very often with just using analog stick. I've tried many things to fix it like checking whether the audio is playing before playing the sound again, setting a timer of minimum time before next click is allowed... these solutions ALMOST worked but still sometimes (admittedly less often though) there was the super loud glitch sound. What worked was making the click audio into a .mp4 file and using "Video.jumpToTime(0)" and "Video.resume()" and it will act exactly how I want it: no more super loud glitch sound from overlapping .mp3 audio.

...but there's just 1 issue. Having it as a video causes lag in the app

Can you please add this command? Sound.jumpToTime(click, 0)

It's just an example. In this case, it's assuming the audio file has been loaded to variable "click" by using this feature that already exists: Sound.open("app0:/DATA/click2.wav")

I just need to be able to jump to a time in the audio so 2 sound.play() of the same audio don't glitch out please.

Thank you Rinne for all your good code!!!!! And thanks if you can help figure this out.

@Rinnegatamante
Copy link
Owner

Audio system is not same of video one. "jumpToTime" is not something easily doable.
Did you try to just add a few seconds of mute audio in the sound file at the end?

@BlackSheepBoy69
Copy link
Author

Just adding muted audio, or adding muted audio and using the "if sound.is_playing then sound.stop" (pseudocode)? I'll try both when I get a sec

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