x


Choppy audio

I'm using GetButtonUp to trigger random audio when an interactive game object is clicked. The random audio clips that play are 2D sounds (uncompressed, but small). It seems to work fine when clicking on the interactive object the vast majority of the time, however, about every 20-30 clicks, the audio that plays is extremely choppy.

Has anybody experienced this kind of audio inconsistency within Unity? All of my audio clips play fine within the inspector, just not always in the game itself. I was going to attempt changing the DSP Buffer size, however, I would prefer not to give up performance in an attempt to fix this small inconsistency. Any help/suggestions as to how I can correct this would be greatly appreciated!! Thank you.

more ▼

asked Apr 19, 2012 at 04:04 PM

holman8er gravatar image

holman8er
46 27 18 21

Gregzo, Sorry for the lack of detail. -I'm using Playmaker. It's a simple fsm that gets a mouse pick event, then sends an event once clicked. -In that (clicked) state, I'm using an "Audio Play" action (it's not set to one shot). -The clips are all set as a 2D sound, and the audio source that they come out of is not set to loop. -The random audio clips are anywhere from .6 to 2.3 seconds and the largest one is 322kb. -These clicks are slow, as it allows for the first audio clip to finish playing before the mouse pick event can be sent again. Therefore, the previous clip is not being heard since it finished. -By choppiness, I mean the opposite of clear... the audio is garbled and distorted... sorry I can't articulate any better than that!

Thank you for your help, I hope this is a bit more clear.

Apr 20, 2012 at 03:10 PM holman8er

what version of unity are you running? We've experienced some chopping/popping of audio with on-board soundcards and earlier versions of unity. The stuff we experience before may be fixed in newer versions. Also, have you tested the build on multiple machines? what os's, etc.?

Apr 20, 2012 at 03:38 PM droderick

We're running version 3.5.1. We have not yet upgraded to 3.5.2 as we're in the middle of a deadline. We've have been testing on multiple machines (all of them alienware or dell) running windows 7.

Apr 20, 2012 at 05:32 PM holman8er

Are all your clips wav's? All clip import settings set to load in memory and not stream from disk? What is your latency setting? Which platform are ypu building to? And last but not least: how does Playmaker implement "Audio Play " action? If it implements it with PlayOmeShot, that could (emphasis on COULD) be part of the problem.

Apr 20, 2012 at 09:35 PM gregzo

1)How do you play the clips? PlayOneShot or Play? 2)Are your clips looped? 3)How long are they? You say small, how small? 4)How quickly do these 30 clicks have to happen before you get the choppiness? 5)Choppy: you mean clicks? Is a previous clip still heard and just the newly played one is choppy?

Sorry for the many questions! It would help to know more...

Apr 19, 2012 at 04:12 PM gregzo
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1691
x35
x19
x17

asked: Apr 19, 2012 at 04:04 PM

Seen: 1535 times

Last Updated: Apr 20, 2012 at 09:35 PM