Unexplained error from MediaPlayer
<p>My code tries to play an MP3 file from res/raw.</p>

<p>Code:</p>

<pre><code>FileDescriptor fd = appContext.getResources().openRawResourceFd(R.raw.ringtone)
                    .getFileDescriptor();
player = new MediaPlayer();
            try
            {
                player.setAudioStreamType(AudioManager.STREAM_RING);
                player.setDataSource(fd);
                player.prepare();           
            }
            catch (IllegalArgumentException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
                player = null;
                return;
            }
            catch (IllegalStateException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
                player = null;
                return;
            }
            catch (IOException e)
            {
                // TODO Auto-generated catch block
                e.printStackTrace();
                player = null;
                return;
            }

            player.setLooping(true);
            player.start();
</code></pre>

<p>The log shows:</p>

<p>02-21 15:18:18.360: ERROR/PlayerDriver(51): Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported
02-21 15:18:18.380: ERROR/MediaPlayer(693): error (1, -4)
02-21 15:18:18.390: WARN/PlayerDriver(51): PVMFInfoErrorHandlingComplete</p>

<p>After player.prepare() is called.</p>

<p>I really don't have a hint.
I won't use MediaPlayer.create() because I need player.setAudioStreamType(AudioManager.STREAM_RING );</p>

<p>Would appreciate any help on this...</p>
