Skip to main content

A library for setting pos of a wav file with pygame.mixer.music

Project description


This is a module to make setting the position of a wav file in pygame.mixer.music possible


Functions

load_wav

Loads wav file into pygame mixer

def load_wav(filename : str, namehint : str | None = "") -> None:...

Example

import wavsetpos as wsp
import pygame

# use in place of pygame.mixer.music.load()
wsp.load_wav(...)
...
pygame.mixer.music.play()

set_wav_pos

Sets position of wav file playing in pygame mixer

def set_wav_pos(pos : int, dir : str | None = None) -> None:...

Example

import wavsetpos as wsp
import pygame

# use in place of pygame.mixer.music.load()
wsp.load_wav(...)
...
pygame.mixer.music.play()

# in seconds
wsp.set_wav_pos(50)

Change Log

1.1 (8/21/2024)

  • Fixed change Log

1.0 (8/21/2024)

  • Initial Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wavsetpos-1.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

wavsetpos-1.1-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page