[pygame] adjusting when a sound is played

[pygame] adjusting when a sound is played

Postby metulburr » Sat Dec 21, 2013 9:18 am

Ive noticed that my sound is delayed for probably fractions of a second, but it stilll is noticable to me. It is to you? How can you ajust the time when a sound is played sooner?
I seen someone mention the fact of dropping the buffer int lower, but ihave already dropped it from 2048 to 128, and it seems to make no difference at all.

Again...the code i am referring to is the pong game
https://github.com/metulburr/pong/blob/ ... a/sound.py

EDIT:
another thought i had, was maybe manually editing the sound files, to remove a portion of the beginning since they all seem to be delayed. But hopefullyy there is a programmatical approach as well.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1416
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: [pygame] adjusting when a sound is played

Postby Mekire » Sat Dec 21, 2013 2:27 pm

Well sometimes people have issues with latency and then you have to mess around with the mixer settings until you find something that works (very technical process). First things first though; make sure the file doesn't actually have a significant pause at the beginning of the sound. I'm not sure if you can start a sound effect at any point other than the beginning if it does have an actual gap (I believe not). Honestly I would probably just edit the file and slice off the empty part at the beginning.

I used to use a free little program called Praat that was actually made for linguists to this effect.

-Mek
User avatar
Mekire
 
Posts: 987
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan

Re: [pygame] adjusting when a sound is played

Postby metulburr » Sat Dec 21, 2013 3:20 pm

ah ok, i ended up finding a program audacity which allows me nicely cut tracks, move timeframes around, etc....in which i did see the fact that there was a *small* gap of space before the first wave length. I think it sounds a lot more in tune now.

It looks as if doing your own game, you have to be a jack of all trades, eh? sounds, music, images, programming, etc.
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1416
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest