Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - SoundPool.load and FileDescriptor

SoundPool.load and FileDescriptor

All your problems with Audio, Video and Images.

SoundPool.load and FileDescriptor

Postby mswiege » Fri Jun 04, 2010 5:37 pm

I tried using the load function of the SoundPool that takes a FileDescriptor, because I wanted to be able to set the offset and length. The File is not stored in the Ressources but a file on the storage card. Even though neither the load nor the play function of the SoundPool throw any Exception or print anything to the console, the sound is not played. Using the same code, but use the file path string in the SoundPool constructor works perfectly.

This is how I have tried the loading (start equals 0 and length is the length of the file in miliseconds):
Code: Select all
FileInputStream fileIS = new FileInputStream(new File(mFile));
mStreamID = mSoundPool.load(fileIS.getFD(), start, length, 0);
mPlayingStreamID = mSoundPool.play(mStreamID, 1f, 1f, 1, 0, 1f);


If I would use this, it works:
Code: Select all
mStreamID = mSoundPool.load(mFile, 0);
mPlayingStreamID = mSoundPool.play(mStreamID, 1f, 1f, 1, 0, 1f);


Any ideas anyone?

Thanks
mswiege
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jun 04, 2010 5:29 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 4 guests