just_playback
A small library for playing audio files in python. Provides file format independent methods for loading audio files, playing, pausing, resuming, stopping, seeking, getting the current playback position, and changing the volume.
The package uses miniaudio for awesome cross-platform, dependency-free asynchronous audio playback that stays away from your main thread.
Installation
pip install just_playback
Usage
>>> from just_playback import Playback
>>> playback = Playback()
>>> playback.load_file('music-files/sample.mp3')
>>> playback.play()
>>> playback.pause()
>>> playback.resume()
>>> playback.stop()
>>> playback.seek(60)
>>> playback.set_volume(0.5)
>>> playback.loop_at_end(True)
>>> playback.active
>>> playback.playing
>>> playback.curr_pos
>>> playback.paused
>>> playback.duration
>>> playback.volume
>>> playback.loops_at_end