TaylorSMarks / playsound

Pure Python, cross platform, single function module with no dependencies for playing sounds.
Other
517 stars 114 forks source link

play speed #60

Closed sina-rostami closed 3 years ago

sina-rostami commented 3 years ago

are there any options to control the playing speed with playsound ?

acemasterjb commented 3 years ago

try self.winCommand(f'set speed 0.5 ')

https://docs.microsoft.com/en-us/windows/win32/multimedia/set

The set command establishes control settings for the device. CD audio, digital-video, MIDI sequencer, VCR, videodisc, video-overlay, and waveform-audio devices recognize this command.

speed factor Sets the relative speed of video and audio playback from the workspace. Factor is the ratio between the nominal frame rate and the desired frame rate, where the nominal frame rate is designated as 1000.

TaylorSMarks commented 3 years ago

If you want to make a PR that adds in this feature, I'm happy to accept it as long as it doesn't add in any more dependencies or cause any regressions in the existing testcases.