Sound in AM Intermittent? [!!!SOLVED!!!]

This forum is meant for discussing how to create pictures, sounds, and videos. You can also post technical questions about how to use a particular program (Poser, Lightwave, etc.).

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Sound in AM Intermittent? [!!!SOLVED!!!]

Postby 3dgamer » Wed Mar 04, 2009 10:19 am

I am noticing that when I associate sound clips with either a set of inventory items dragged onto another object or triggered by hotspots, they don't seem to all play.

For instance, if I have seven hotspots that I click in succession, and they each have a sound (the same sound) associated to it, the first two sounds will play, but then the next two won't, and then maybe the remainder ones will or will not play. This type of failure to play sound is pretty consistent, but the sounds it chooses not to play is not consistent. I thought it could be due to AM having to catch up to itself, so I slowed down a bit between the clicks. But this didn't seem to help at all.

Has anyone noticed this problem, and if so, what did you do to resolve it?

Any help would be appreciated; I am trying to get this nanodemo finished and I keep running into things that hold me up. <sigh>

TIA
Last edited by 3dgamer on Fri Mar 06, 2009 12:17 am, edited 1 time in total.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Wed Mar 04, 2009 10:43 am

Hey 3D..:)

A few questions..;

Are u using the Channels or Scripting..?
Make sure the Fade is off..!--JK~ --lol..

If it's script ..could u post it..and also
How big is the sound file..?
Are u using timed events with it..?
If so that may be why..

THanks..this way someone can test exactly what it is u are doing as well..~

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Thu Mar 05, 2009 5:14 am

Hi Mercedes,

Thanks for the response.

Scripting:
No, no scripting used...just channels.
Fade: Nope, no fade [I learned my lesson from last time ;)].
Timed Events: No time events either, just your regular button sounds playing when a player presses a button or drag/drops an object from inventory.
File Sizes: The files sizes for the audio are: 18K for one and 19K for the other...your typical button sound file sizes.

The strange thing about it is that you can usually hear the first two buttons sounds just fine. It's the button sounds after those that seem to sometimes play and then, sometimes not. Are there any caveats I should know about playing sounds consecutively in channels, etc.? This is really throwing me because I am using the same sound file for the first set of buttons and a different one for another set of buttons, but I get the same unpredictable behaviour from both. :(

I wish I knew EZTalk better to see if I could use it to troubleshoot this problem. I may have to learn it, though, if it keeps up this bad. It's just that I am pretty much finished and now this stuff is cropping up to snag me. [ Sigh ;( ]

Anything you can think of to steer me in the right direction would be most appreciated.

TIA!
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Thu Mar 05, 2009 5:52 am

Hi 3D..:)

Hi..ok.. .Are u able to upload the project..or a smaller one and copy what u are doing ..see if i can't have a look at it..?..I"m not doing anything right now..so if u can that might be best..:)..Unless of course someone has another option in the mean time..I've tried several things..Not sure if u are using variables or anything..changing channels..using top channel for each sound..? Fade duration at the botton says 2 in every channel..? Ok well let me know..sent u a pm..:)
I've put 7 hotspots in a row..using the top channel for each hotspot..fade duration--2 at the bottom..--which is default..The option itself is not checked off..and that's it..same sound in each one..I get sound..Also tried with variables and without..Is this similar to what u are doing..?


Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Thu Mar 05, 2009 7:45 am

Hi Mercedes,

Thanks for helping me try to dissect this.

mercedes wrote:Not sure if u are using variables or anything


The variables I am using are not related to the sound. I am using variables to make an hotspot image appear when an item is dragged to it..typical stuff one would think...

mercedes wrote:changing channels


It seems that whether I keep the sound files on the same channel or split between channel 2 and 3 (channel 1 is playing music in the background), the behaviour is still the same.

mercedes wrote:...using top channel for each sound..?


Nope, top channel is for background music exclusively. The sounds are spread across channels 2 and 3.

mercedes wrote:Fade duration at the botton says 2 in every channel..?


Yep, Fade says "2" in every channel, however the Fade check box is not checked.

mercedes wrote:Ok well let me know..sent u a pm..:)


Got it, thanks...will pm you back. :)

mercedes wrote:I've put 7 hotspots in a row..using the top channel for each hotspot..fade duration--2 at the bottom..--which is default..The option itself is not checked off..and that's it..same sound in each one..I get sound..Also tried with variables and without..Is this similar to what u are doing..?


It sure sounds like it. But perhaps I need to do like you just did and use a new project to see if I can reproduce this issue in there. At least if it is happening in a totally new file, then it helps to indicate that something greater is afoot.

Well, I'll go ahead and try that to see what I get and the let you know what my results are.

Again, thanks for all the help. :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Thu Mar 05, 2009 8:16 am

This is what i would suggest..I would put the backround music--if its something that is associated with the frame--when it loads..Then i would use Channel1 in the Frame's properties Audio Tab.

I would only use the Channel2 for each hotspot--so for hotspot(1) Channel 2 Hotspot(2) Channel 2 ect..--.If its just a click sound..

If u want the sound to be part of the backround only when they click the hotspot then i would suggest, making the channel1 in the one u want it to start..and only channel 2 in other ones.

Try that and see if that works, ..if not..copy ur project--rightclick copy and paste it..Then open the copied version..and delete what's not important..--Making the project smaller..:) But make sure the problem still exists..before u send..

If this is what u are doing...Then I would suggest copying it..I'm assuming u have tried different sounds, and are not using stop sound/changevolume..so..This is what i would suggest..Its process of elimination and at this point..I think all is covered so far..other than i can't see it. So taking shots in the dark..all that's left.. i think.. are ur variables...k well ill await ur reply..:)

Peace--Pm u as well...lol..

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Imari » Thu Mar 05, 2009 3:16 pm

I've had as many as three sounds playing just fine on a single frame, but if the sounds are going to play simultanteously, could you combine them into fewer sounds or even a single sound file in a program like Audacity, perhaps?
User avatar
Imari
VIP
 
Posts: 872
Joined: Fri Jun 20, 2003 4:49 pm
Location: Virginia, USA

Postby reneuend » Thu Mar 05, 2009 8:56 pm

I agree with Amari. In fact, that's the way I do a lot of my sounds, especially if I need the sounds to work together more precisely.

I still haven't run into the intermittent problem. I was wondering if you are loading a lot of animation, code, or other items that take awhile and might cause this particular problem?
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Postby 3dgamer » Thu Mar 05, 2009 10:52 pm

Hi Mercedes,
Mercedes wrote:...If this is what u are doing...Then I would suggest copying it..I'm assuming u have tried different sounds, and are not using stop sound/changevolume..so..This is what i would suggest..Its process of elimination and at this point..I think all is covered so far..other than i can't see it. So taking shots in the dark..all that's left.. i think.. are ur variables...k well ill await ur reply..Smile


Thanks so much for the detailed response. I think I am doing what you stated in the beginning of your response about dedicating the channels for certain sounds. My Channel 1 only plays background music; channels 2 and/or 3 are for sound effects. And no stop sound or change volume is being used. The player just has to simply click on the hotspot (or drag to the hotspot) to hear the sound.

But I think the trimming code thing may be a way to go. I know I have some commented lines that don't need to be in there so that is worth taking out. I'll can also see if there are any other bits of code lying about causing trouble.

Thanks for the tip and I'll try that and let you know how things go.

Again, thanks! :)

--------------------------------------------------------------

HI Imari,

Imari wrote:I've had as many as three sounds playing just fine on a single frame, but if the sounds are going to play simultanteously, could you combine them into fewer sounds or even a single sound file in a program like Audacity, perhaps?


Thanks for the response. The only problem with a single file is that I have buttons that need be selected randomly by the player (when you get to see my nanodemo, you'll understand what I mean). So unfortunately, a single audio file, at least in this case, is not feasible. But that is something to keep in mind for future puzzles.

Thanks. :)

------------------------------------------------------------
Hi reneuend,

reneuend wrote:...I still haven't run into the intermittent problem. I was wondering if you are loading a lot of animation, code, or other items that take awhile and might cause this particular problem?


I think you are pretty close assessment to what is going on because I do have a lot of code going on (variable monitoring code, variable incremental code, etc.) in all the button hotspots to create the effect I need. So trimming the code, as Mercedes suggested, may be a way to go.

Right now, though, thankfully, at least overall, the nanodemo is working fine. It's just the sound issue...and it is only in two frames, not the entire project.

Well, I'll let you know how things turn out.

Thanks!

[EDIT]---------------------------------[!!!!RESOLVED!!!]--------------------------------------[EDIT]

HURRAY! :)

Well, I found what the problem was. It seems that it could be a bug with AM. Before I took any drastic steps like deleting code, I decided to see what the difference was between the sounds that played well and the ones that didn't. The button sounds were basically MP3 sound files. Mostly all my other sound were WAV sounds file. Well, I converted the MP3 buttons sounds to WAV files and VOILA! They work consistently, now! :)

So it seems that when pinched, AM doesn't seem to like MP3 files as much as WAV files.

<whew> I am so glad that is over! :) Now to add more sounds and be done with it.

Thanks Mercedes, Imari, and reneuend for all your help and patience with this! :)

Cya
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Fri Mar 06, 2009 1:51 am

Oh that's good..!~ weird though that its mp3..I only use mp3..I"ve never used a wav file..ever...Well i'm glad u figured it out..!!~ The file maybe was initially a wav file to begin with..thats why it sounded badly..who knows..glad its figured out.

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Fri Mar 06, 2009 3:12 am

Hi Mercedes,

Actually, after thinking about and analyzing this a bit, I think it maybe because I was using more than one audio file type at a time, along with all the coding I had. The background music was playing in the background;that was a WAV file. But the buttons were all MP3s. So I am thinking that when both the music and the buttons were playing simultaneously, that AM had to decode and playback both a WAV and an MP3 audio file, both at the same time. So it may have been too much decoding for AM at one time, in addition to all the other coding I had in the hotspots. That is probably where the intermittent behaviour occurred. But when I made everything a WAV file, it worked.

Since you use all MP3 files and don't mix file types, then you probably won't be running into this issue...at least that is my guess.

So my hunch is that AM has an issue with decoding differing audio files if it is already being bogged down by a lot of code processing. But again, that is only a theory. :)

Well, have a good one! :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Lyberodoggy » Fri Mar 06, 2009 12:07 pm

Well even if it is a bug of AM, the one to blame is the MediaPlayerObject that microsoft supplies with Visual Basic 6...

I 'd suggest creating a second mediaplayerobject for the different file types. Still the problem could be with the encoder/decoder...
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to How to make pictures, sounds, and videos

Who is online

Users browsing this forum: No registered users and 0 guests

cron