Hi, thank you very much for your answer. The problem I have is that I got an audio stream, say 5 seconds long. I want the user to be able to change the volume and the playbackrate while the sound is being played. I'm able to modify those parameters before i call the play() method, but I need to change them while the stream is being played as well What do you mean by "you can upsample/downsample your streams to get the desired efect"? Thanks again Simone
2010/3/26 Gabriel Simões <gsim...@gmail.com> > Hello Simone. > > What problems have you been facing with AudioTrack? > > Besides the fact that you will need to handle all the overhead of time/ > streams controling everything should work fine with AudioTrack, even > using the Emulator. > > For the volume change for example, try to each position of your audio > streams for a float between 0.0f (no sound) and 1.0f (volume at 100%) > and cast back to short before playing. Should give you the results you > want. > > For the SampleRate, once AudioTrack is created you cannot change it´s > samplerate value, but you can upsample/downsample your streams to get > the desired efect. > > Hope it helps, > Gabriel > > On 23 mar, 17:57, Simone <simone.russ...@gmail.com> wrote: > > Hi everyone, I'll try to explain briefly what I need to do. > > I need to load an audio resource and play it, but I also need to be > > able to modify some parameters (like the volume, or the playback rate) > > while the audio is being played. > > For example, I might want to play a 10 seconds audio stream, and > > change the volume only after 3 seconds. > > Is there a way to do it? I've been experimenting a little with > > AudioTrack without results. > > Thanks, > > Simone > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > > To unsubscribe from this group, send email to android-developers+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.