Such Problem: I have video file recorded with two sound channels. I have 
tried to switch off left sound channel by this code:


Code:

Videoview vv;
............... 
       vv.setOnPreparedListener(new OnPreparedListener() { 
           @Override            public void onPrepared(MediaPlayer mp) { 
               mp.setVolume(0.f, 1f); 
           } 
       });


... and on Tablet this work good (right volume channel sounds well). But 
then I tried it on googleTv and this code did not work, sound swichs off; mp
.setVolume(1.f,0.f) - has no effect, sound continues playing in both 
channels.

*Then I tried this:*
Code:


public class MainActivity extends Activity { 
   MediaPlayer mp = null; 
   @Override    protected void onCreate(Bundle savedInstanceState) { 
       super.onCreate(savedInstanceState); 
       setContentView(R.layout.activity_main); 
       if (mp != null) { 
           mp.reset(); 
           mp.release(); 
       } 
       mp = MediaPlayer.create(this, R.raw.test); 
       mp.start(); 
   } 
   public void onTurnOffLeft(View v){ 
       mp.setVolume(0.f, 1.f); 
   } 
   public void onTurnOffRight(View v){ 
       mp.setVolume(1.f, 0.f); 
   }
}

Method onTurnOffLeft switchs off all sound, and onTurnOffRight method has 
no effect.

I have tested on *Visio Co-Star*, and* Logitech Revue* google tv boxes with 
Optical 
and HDMI cables.

First I thougth the problem is in hdmi cable, but a have tried to connect 
lenovo tablet to TV through hdmi cable, and experiment with swithing off 
sound channels finished with success. So, I need help with this problem. 
Any ideas would be helpfull. Thank you.

-- 
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

Reply via email to