mirror of
https://github.com/SFML/SFML.git
synced 2025-03-14 01:40:05 +08:00
Added example opus file, added libopus to android scripts.
This commit is contained in:
parent
7345d08d9c
commit
96d4b28bf2
@ -85,6 +85,9 @@ int main()
|
|||||||
// Play music from an ogg file
|
// Play music from an ogg file
|
||||||
playMusic("doodle_pop.ogg");
|
playMusic("doodle_pop.ogg");
|
||||||
|
|
||||||
|
// Play music from an opus file
|
||||||
|
playMusic("error.opus");
|
||||||
|
|
||||||
// Play music from a flac file
|
// Play music from a flac file
|
||||||
playMusic("ding.flac");
|
playMusic("ding.flac");
|
||||||
|
|
||||||
|
BIN
examples/sound/resources/error.opus
Normal file
BIN
examples/sound/resources/error.opus
Normal file
Binary file not shown.
@ -55,7 +55,7 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Open a sound file from the disk for reading
|
/// \brief Open a sound file from the disk for reading
|
||||||
///
|
///
|
||||||
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC, MP3.
|
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAT, MP3, and Opus.
|
||||||
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
||||||
///
|
///
|
||||||
/// Because of minimp3_ex limitation, for MP3 files with big (>16kb) APEv2 tag,
|
/// Because of minimp3_ex limitation, for MP3 files with big (>16kb) APEv2 tag,
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Open a sound file in memory for reading
|
/// \brief Open a sound file in memory for reading
|
||||||
///
|
///
|
||||||
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC.
|
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, Opus and FLAC.
|
||||||
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
||||||
///
|
///
|
||||||
/// \param data Pointer to the file data in memory
|
/// \param data Pointer to the file data in memory
|
||||||
@ -87,7 +87,7 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Open a sound file from a custom stream for reading
|
/// \brief Open a sound file from a custom stream for reading
|
||||||
///
|
///
|
||||||
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, FLAC.
|
/// The supported audio formats are: WAV (PCM only), OGG/Vorbis, Opus and FLAC.
|
||||||
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
/// The supported sample sizes for FLAC and WAV are 8, 16, 24 and 32 bit.
|
||||||
///
|
///
|
||||||
/// \param stream Source stream to read from
|
/// \param stream Source stream to read from
|
||||||
|
5
tools/android/compile_libs.sh
Executable file → Normal file
5
tools/android/compile_libs.sh
Executable file → Normal file
@ -48,6 +48,11 @@ rm $DESTDIR/$1/usr/lib/libFLAC*.so*
|
|||||||
cd $LOCALDIR/build/libvorbis-* && sed -i 's/-version-info/-avoid-version/g' lib/Makefile.in lib/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install
|
cd $LOCALDIR/build/libvorbis-* && sed -i 's/-version-info/-avoid-version/g' lib/Makefile.in lib/Makefile.am && ./configure $HOST $PREFIX --enable-shared=no && make && make install
|
||||||
rm $DESTDIR/$1/usr/lib/libvorbis*.so*
|
rm $DESTDIR/$1/usr/lib/libvorbis*.so*
|
||||||
|
|
||||||
|
# Compile OPUS and OPUSFILE
|
||||||
|
cd $LOCALDIR/build/opus-* && sed -i '-version-info/-avoid-version/g' Makefile.in Makefile.am && ./configure $HOST $PREFIX --enabled-shared=no && make && make install
|
||||||
|
cd $LOCALDIR/build/opusfile-* && sed -i '-version-info/-avoid-version/g' Makefile.in Makefile.am && ./configure $HOST $PREFIX --enabled-shared=no && make && make install
|
||||||
|
rm $DESTDIR/$1/usr/lib/libopus*.so*
|
||||||
|
|
||||||
# Compile freetype
|
# Compile freetype
|
||||||
cd $LOCALDIR/build/freetype-* && sed -i 's/-version-info/-avoid-version/g' builds/unix/unix-cc.in && ./configure $HOST $PREFIX && make && make install
|
cd $LOCALDIR/build/freetype-* && sed -i 's/-version-info/-avoid-version/g' builds/unix/unix-cc.in && ./configure $HOST $PREFIX && make && make install
|
||||||
|
|
||||||
|
16
tools/android/download_sources.sh
Executable file → Normal file
16
tools/android/download_sources.sh
Executable file → Normal file
@ -3,10 +3,14 @@
|
|||||||
FLAC_VERSION=1.2.1
|
FLAC_VERSION=1.2.1
|
||||||
VORBIS_VERSION=1.3.3
|
VORBIS_VERSION=1.3.3
|
||||||
OGG_VERSION=1.3.1
|
OGG_VERSION=1.3.1
|
||||||
|
OPUS_VERSION=1.1.2
|
||||||
|
OPUSFILE_VERSION=0.7
|
||||||
|
|
||||||
FLAC=flac-$FLAC_VERSION
|
FLAC=flac-$FLAC_VERSION
|
||||||
VORBIS=libvorbis-$VORBIS_VERSION
|
VORBIS=libvorbis-$VORBIS_VERSION
|
||||||
OGG=libogg-$OGG_VERSION
|
OGG=libogg-$OGG_VERSION
|
||||||
|
OPUS=opus-$OPUS_VERSION
|
||||||
|
OPUSFILE=opusfile-$OPUSFILE_VERSION
|
||||||
|
|
||||||
SNDFILE_VERSION=1.0.25
|
SNDFILE_VERSION=1.0.25
|
||||||
SNDFILE=libsndfile-$SNDFILE_VERSION
|
SNDFILE=libsndfile-$SNDFILE_VERSION
|
||||||
@ -34,6 +38,18 @@ then
|
|||||||
tar -C build -xf src/$OGG.tar.gz
|
tar -C build -xf src/$OGG.tar.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
wget -nc -P src http://downloads.xiph.org/releases/opus/$OPUS.tar.gz
|
||||||
|
if [ ! -d "$PWD/tmp/$OPUS" ]
|
||||||
|
then
|
||||||
|
tar -C build -xf src/$OPUS.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
wget -nc -P src http://downloads.xiph.org/releases/opus/$OPUSFILE.tar.gz
|
||||||
|
if [ ! -d "$PWD/tmp/$OPUSFILE" ]
|
||||||
|
then
|
||||||
|
tar -C build -xf src/$OPUSFILE.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz
|
wget -nc -P src http://download.savannah.gnu.org/releases/freetype/$FREETYPE.tar.gz
|
||||||
if [ ! -d "$PWD/tmp/$FREETYPE" ]
|
if [ ! -d "$PWD/tmp/$FREETYPE" ]
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user