Audio volume getting lower after few page transitions

I have an audio that gets lower and lower after a few page transitions (for example, I go to other page then I return to the audio page). The more I go back and forth, it gets almost inaudible.

I tried to replace loadStream by loadSound, remove fade, force volume to its higher value and NOTHING is avoiding this issue. Ideas?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-- Code created by Kwik - Copyright: kwiksher.com 
module(..., package.seeall) 
 
function new() 
    local numPages = 5 
    local menuGroup = display.newGroup() 
 
    local sound_02_aud078 = audio.loadSound( "sound_02.wav" ) 
 
    local curPage = 3 
 
    local disposeAudios 
 
    local disposeTweens 
 
    local drawScreen = function() 
       local Layer1  
           Layer1 = display.newImageRect( "p3_Layer1.png", 1024, 768 ); 
           Layer1.x = 512; Layer1.y = 384; Layer1.alpha = 1 
           menuGroup:insert(Layer1) 
           menuGroup.Layer1 = Layer1 
 
 
       local function flip (event) 
          if event.phase =="ended" then  
             if event.xStart < event.x and (event.x - event.xStart) >= 30 then 
                if (curPage > 1) then  
                    disposeAudios() 
                    disposeTweens() 
                    director:changeScene( "page_"..curPage-1, "moveFromLeft" ) 
                end 
             elseif event.xStart > event.x and (event.xStart-event.x) >= 30 then  
                if (curPage < numPages) then  
                    disposeAudios() 
                    disposeTweens() 
                    director:changeScene("page_"..curPage+1, "moveFromRight") 
                end 
             end 
          end 
       end 
       Layer1:addEventListener("touch", flip) 
   end 
   drawScreen() 
 
   disposeAudios = function (event) 
      audio.stop(); audio.dispose(sound_02_aud078); sound_02_aud078 =nil 
   end 
 
   disposeTweens = function (event) 
      cancelAllTweens(); 
      cancelAllTimers(); 
      cancelAllTransitions(); 
   end 
 
   local myClosure_sound_02_aud078 = function() 
      audio.play(sound_02_aud078, {  loops=0 } ) 
   end 
   timerStash.newTimer = timer.performWithDelay(0, myClosure_sound_02_aud078, 1) 
 
   return menuGroup 
end 

I have the same problem, did you solve it ?
Thank you

Ray

views:1495 update:2012/1/13 9:04:04
corona forums © 2003-2011