comparison ALmixer.c @ 73:32757e494675

Fixed bug that sets the wrong variable for fading in Pause. There still seems to be another bug related to fading though based on Johnson Lin's test case. Audio no longer stops and triggers the completion callback, but the volume doesn't seem to go up to max for long fade-ins. Still investigating.
author Eric Wing <ewing . public |-at-| gmail . com>
date Fri, 10 Aug 2012 22:53:14 -0700
parents be97ae4f30c0
children c112e4576832
comparison
equal deleted inserted replaced
72:398d1cb12448 73:32757e494675
2953 */ 2953 */
2954 ALmixer_Channel_List[channel].fade_expire_ticks = 2954 ALmixer_Channel_List[channel].fade_expire_ticks =
2955 ALmixer_Channel_List[channel].fade_expire_ticks - 2955 ALmixer_Channel_List[channel].fade_expire_ticks -
2956 diff_time; 2956 diff_time;
2957 /* Don't allow the time to go negative */ 2957 /* Don't allow the time to go negative */
2958 if(ALmixer_Channel_List[channel].expire_ticks < 0) 2958 if(ALmixer_Channel_List[channel].fade_expire_ticks < 0)
2959 { 2959 {
2960 ALmixer_Channel_List[channel].expire_ticks = 0; 2960 ALmixer_Channel_List[channel].fade_expire_ticks = 0;
2961 } 2961 }
2962 } /* End fade check */ 2962 } /* End fade check */
2963 } /* End if PLAYING */ 2963 } /* End if PLAYING */
2964 } /* End If in use */ 2964 } /* End If in use */
2965 } /* End specific channel */ 2965 } /* End specific channel */
3036 */ 3036 */
3037 ALmixer_Channel_List[i].fade_expire_ticks = 3037 ALmixer_Channel_List[i].fade_expire_ticks =
3038 ALmixer_Channel_List[i].fade_expire_ticks - 3038 ALmixer_Channel_List[i].fade_expire_ticks -
3039 diff_time; 3039 diff_time;
3040 /* Don't allow the time to go negative */ 3040 /* Don't allow the time to go negative */
3041 if(ALmixer_Channel_List[i].expire_ticks < 0) 3041 if(ALmixer_Channel_List[i].fade_expire_ticks < 0)
3042 { 3042 {
3043 ALmixer_Channel_List[i].expire_ticks = 0; 3043 ALmixer_Channel_List[i].fade_expire_ticks = 0;
3044 } 3044 }
3045 } /* End fade check */ 3045 } /* End fade check */
3046 } /* End if PLAYING */ 3046 } /* End if PLAYING */
3047 } /* End channel in use */ 3047 } /* End channel in use */
3048 } /* End for-loop */ 3048 } /* End for-loop */