Jump to content

I don't like to answer "just Google it" but considering how many questions you've posted where typing the title on Google yields an answer in literally the first result I'm going to make an exception...

 

just Google it.

 

And here is what you'll find in the first result:

https://stackoverflow.com/a/42317458

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14535559
Share on other sites

Link to post
Share on other sites

3 minutes ago, Sauron said:

I don't like to answer "just Google it" but considering how many questions you've posted where typing the title on Google yields an answer in literally the first result I'm going to make an exception...

 

just Google it.

 

And here is what you'll find in the first result:

https://stackoverflow.com/a/42317458

I googled it. I found the link you shared. But it doesn't really tell how I can do it. Am I supoosed to change the sample_rate? What should I change it to?

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14535562
Share on other sites

Link to post
Share on other sites

3 minutes ago, Wictorian said:

I googled it. I found the link you shared. But it doesn't really tell how I can do it. Am I supoosed to change the sample_rate? What should I change it to?

By reading the answer you can easily tell the parameter that was changed was "frequency".

Quote

I had some mp3 audio tracks playing back slowed down. I updated the mixer frequency to be based on the mp3 sample rate using mutagen like so:

It obviously follows that by setting a higher or lower frequency you can change the playback speed to be faster or slower. Note that I did not know this before I read that answer. All I had to do was read it and pay attention.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14535572
Share on other sites

Link to post
Share on other sites

1 minute ago, Sauron said:

By reading the answer you can easily tell the parameter that was changed was "frequency".

It obviously follows that by setting a higher or lower frequency you can change the playback speed to be faster or slower. Note that I did not know this before I read that answer. All I had to do was read it and pay attention.

Yeha I changed the frequency but it did nothing

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14535577
Share on other sites

Link to post
Share on other sites

2 hours ago, Wictorian said:

Yeha I changed the frequency but it did nothing

Maybe there's something wrong in your code. I can't know what it is because you didn't post your code and you didn't even tell me what type of file you want to play. You didn't even mention whether you're on python 2 or 3.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14535910
Share on other sites

Link to post
Share on other sites

-= Locked =-

This topic does not follow the posting guidelines for this section.

 

Please note the obnoxious banner at the top of this page:

image.png.c5b81c3e2abe98614d4ee49431c89961.png

COMMUNITY STANDARDS   |   TECH NEWS POSTING GUIDELINES   |   FORUM STAFF

LTT Folding Users Tips, Tricks and FAQ   |   F@H & BOINC Badge Request   |   F@H Contribution    My Rig   |   Project Steamroller

I am a Moderator, but I am fallible. Discuss or debate with me as you will but please do not argue with me as that will get us nowhere.

 

Spoiler

Character is like a Tree and Reputation like its Shadow. The Shadow is what we think of it; The Tree is the Real thing.  ~ Abraham Lincoln

You have enemies? Good. That means you've stood up for something, sometime in your life.  ~ Winston Churchill

Reputation is a Lifetime to create but takes only seconds to destroy.

Docendo discimus - "to teach is to learn"

 

  

 CHRISTIAN MEMBER 

 
 
 
 
 
 

 

Link to comment
https://linustechtips.com/topic/1312000-pygame-playback-speed/#findComment-14537212
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×