android
  #1  
Old 02-24-2011, 11:16 AM
Nohajc's Avatar
Nohajc Nohajc is offline
Junior Member
 
Join Date: Mar 2010
Location: Czech Republic
Posts: 68
Exclamation A very strange problem with playing wav

I have no idea why this is happening but when I have multiple sounds loaded and then play each several times during the gameplay, the sound volume is decreasing. Not globally, but separately for each sample depending on how many times this particular wav was played already.

This ends up with all the sounds fading completely (one by one). I can't explain this behaviour. I don't tamper with audio.volume() during the gameplay.
I only call play() and time() repeatedly.
__________________
There was a little man...
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 02-24-2011, 12:33 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

I remember we had some trouble before with audio decreasing... But I thought that had been fixed in a newer firmware update... And I think that affected the whole player's global sound level.
This is a first hearing about wavs individually decreasing in audio. jbob might know more, he's way more experienced with the sound of this thing than I am.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #3  
Old 02-24-2011, 01:09 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Hmmm, you say the sound decreases, I as well remember that if the volume was greater then 15 or so the sound would decrease(but i thought they fixed this). I have tried to replicate the problem but I cant even on a sound level of 25

If you could supply the following details that would be a big help.

1. Firmware Version
2. Sound Level
3. Wave Type/length
4.How you are calling play() and time()

Last edited by jbob182; 02-24-2011 at 01:26 PM.
Reply With Quote

  #4  
Old 02-24-2011, 04:01 PM
Nohajc's Avatar
Nohajc Nohajc is offline
Junior Member
 
Join Date: Mar 2010
Location: Czech Republic
Posts: 68
Default

1. version: 1.22.03 (i.e. the latest)
2. sound level: 15
3. length: several short samples with a maximum of 2 seconds in length
4. I have a table:
Code:
sounds={hello,pause,edge,gameover,ringing,jumpLo,jumpMid,jumpHi}
Then for each item i call :load() and then I use time() and play() for these objects to play them back of course and for setting a countdown to the end of a sample (only for those samples that should suppress the others while playing - that means no other sound will play until the counter reaches zero again - only two samples have this priority, the others can be interrupted by second sound which is triggered before the end of the previous)

Anyway, this has to be a bug because this behaviour manifests only when the earphones are plugged in. Everything works fine with the speaker.

EDIT: I've just tried volume 14 and it started to work properly. So I'll have to restrict the volume in my app. At least for earphones.

Thank you guys for your advice.
__________________
There was a little man...

Last edited by Nohajc; 02-24-2011 at 04:19 PM.
Reply With Quote

  #5  
Old 02-27-2011, 05:54 AM
kleinerammelkamp kleinerammelkamp is offline
Junior Member
 
Join Date: Jan 2011
Posts: 8
Default Volume problem

Quote:
Originally Posted by Nohajc View Post
1. version: 1.22.03 (i.e. the latest)
2. sound level: 15
3. length: several short samples with a maximum of 2 seconds in length
4. I have a table:
Code:
sounds={hello,pause,edge,gameover,ringing,jumpLo,jumpMid,jumpHi}
Then for each item i call :load() and then I use time() and play() for these objects to play them back of course and for setting a countdown to the end of a sample (only for those samples that should suppress the others while playing - that means no other sound will play until the counter reaches zero again - only two samples have this priority, the others can be interrupted by second sound which is triggered before the end of the previous)

Anyway, this has to be a bug because this behaviour manifests only when the earphones are plugged in. Everything works fine with the speaker.

EDIT: I've just tried volume 14 and it started to work properly. So I'll have to restrict the volume in my app. At least for earphones.

Thank you guys for your advice.
volume for the headphones up to 14
the speaker 25

To avoid the bug adjust it back

if audio.channel() == 0 then v = math.ceil(vol/2) else v = vol end
audio.volume(v)
play()

See script Super Klavier
Reply With Quote

  #6  
Old 02-27-2011, 11:06 AM
Nohajc's Avatar
Nohajc Nohajc is offline
Junior Member
 
Join Date: Mar 2010
Location: Czech Republic
Posts: 68
Default

No need to write specific code for me.
I already fixed it my way. But thanks anyway.
__________________
There was a little man...
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 08:12 AM.