Compiling terminal mp3player for Android in C and Fmod: Functions gets undefined reference
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
All functions throws undefined reference error.
Here's my code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0, &audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
return 0;
}
fmod.jar would solve the problem. How to use it or alternatives with GCC on c4droid terminal? Or should I use C with libasound? Sdl mixer works fine but it plays only one MP3 at same time and traps terminal by window.
android c terminal mp3 fmod
add a comment |
All functions throws undefined reference error.
Here's my code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0, &audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
return 0;
}
fmod.jar would solve the problem. How to use it or alternatives with GCC on c4droid terminal? Or should I use C with libasound? Sdl mixer works fine but it plays only one MP3 at same time and traps terminal by window.
android c terminal mp3 fmod
add a comment |
All functions throws undefined reference error.
Here's my code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0, &audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
return 0;
}
fmod.jar would solve the problem. How to use it or alternatives with GCC on c4droid terminal? Or should I use C with libasound? Sdl mixer works fine but it plays only one MP3 at same time and traps terminal by window.
android c terminal mp3 fmod
All functions throws undefined reference error.
Here's my code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0, &audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
return 0;
}
fmod.jar would solve the problem. How to use it or alternatives with GCC on c4droid terminal? Or should I use C with libasound? Sdl mixer works fine but it plays only one MP3 at same time and traps terminal by window.
android c terminal mp3 fmod
android c terminal mp3 fmod
edited Nov 23 '18 at 1:41
K.Dᴀᴠɪs
7,310112440
7,310112440
asked Nov 22 '18 at 21:48
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
I added -lfmod to end of compile command. Now it gives : fmod depends libstdc++. Install it.
add a comment |
I did some changes, final code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod and install some dependencies
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player -lfmod
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
static FMOD_BOOL * isplaying;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0,
&audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
isplaying=(FMOD_BOOL *)1;
while(FMOD_Channel_IsPlaying(0, isplaying))
{
}
return 0;
}
add a comment |
no, just download and link libstdc++ headers for compiler
compile command:
gcc -I/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/inc -I/system/inc/ -L/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/lib/ -L/system/lib mp3player.c -o mp3player -lfmod -llog -lm -lstdc++
add a comment |
all .so libs needs headers, download those to /system/inc and link those to gcc with -I directive .
add a comment |
solved!
download and link these headers or dev packets dependencies for fmod :
liblog android
libm android
libstdc++ android
extra:
fmod source : compile it for android 7 and 8
add a comment |
protected by Community♦ Dec 8 '18 at 14:26
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
I added -lfmod to end of compile command. Now it gives : fmod depends libstdc++. Install it.
add a comment |
I added -lfmod to end of compile command. Now it gives : fmod depends libstdc++. Install it.
add a comment |
I added -lfmod to end of compile command. Now it gives : fmod depends libstdc++. Install it.
I added -lfmod to end of compile command. Now it gives : fmod depends libstdc++. Install it.
answered Nov 23 '18 at 3:20
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
I did some changes, final code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod and install some dependencies
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player -lfmod
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
static FMOD_BOOL * isplaying;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0,
&audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
isplaying=(FMOD_BOOL *)1;
while(FMOD_Channel_IsPlaying(0, isplaying))
{
}
return 0;
}
add a comment |
I did some changes, final code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod and install some dependencies
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player -lfmod
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
static FMOD_BOOL * isplaying;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0,
&audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
isplaying=(FMOD_BOOL *)1;
while(FMOD_Channel_IsPlaying(0, isplaying))
{
}
return 0;
}
add a comment |
I did some changes, final code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod and install some dependencies
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player -lfmod
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
static FMOD_BOOL * isplaying;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0,
&audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
isplaying=(FMOD_BOOL *)1;
while(FMOD_Channel_IsPlaying(0, isplaying))
{
}
return 0;
}
I did some changes, final code:
/*
terminal mp3 player android
requirements:
c4droid terminal fmod and install some dependencies
requires:
copy fmod api lowlevel lib armeabi-v7a libs to lib dir
compile:
gcc -I./fmod/api/lowlevel/inc -L./fmod/api/lowlevel/lib/ mp3player.c -o mp3player -lfmod
*/
#include <fmod.h>
#include <stdio.h>
static FMOD_SYSTEM * system;
static FMOD_SOUND * audioStream;
static FMOD_BOOL * isplaying;
int main()
{
// Create FMOD interface object
FMOD_System_Create(&system);
FMOD_System_SetDSPBufferSize(system, 1000, 2);
FMOD_Channel_SetFrequency(0, 44100);
// Initialise FMOD
FMOD_System_Init(system, 64, FMOD_INIT_NORMAL, 0);
// Load Mp3
FMOD_System_CreateStream(system, "/storage/emulated/0/playlist/starat16.mp3", FMOD_DEFAULT, 0,
&audioStream);
// Play mp3
FMOD_System_PlaySound(system, audioStream, 0, 0, 0);
isplaying=(FMOD_BOOL *)1;
while(FMOD_Channel_IsPlaying(0, isplaying))
{
}
return 0;
}
answered Nov 23 '18 at 4:25
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
no, just download and link libstdc++ headers for compiler
compile command:
gcc -I/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/inc -I/system/inc/ -L/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/lib/ -L/system/lib mp3player.c -o mp3player -lfmod -llog -lm -lstdc++
add a comment |
no, just download and link libstdc++ headers for compiler
compile command:
gcc -I/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/inc -I/system/inc/ -L/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/lib/ -L/system/lib mp3player.c -o mp3player -lfmod -llog -lm -lstdc++
add a comment |
no, just download and link libstdc++ headers for compiler
compile command:
gcc -I/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/inc -I/system/inc/ -L/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/lib/ -L/system/lib mp3player.c -o mp3player -lfmod -llog -lm -lstdc++
no, just download and link libstdc++ headers for compiler
compile command:
gcc -I/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/inc -I/system/inc/ -L/storage/emulated/0/Download/fmodlowlatencymp3player/fmod/api/lowlevel/lib/ -L/system/lib mp3player.c -o mp3player -lfmod -llog -lm -lstdc++
answered Dec 8 '18 at 6:09
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
all .so libs needs headers, download those to /system/inc and link those to gcc with -I directive .
add a comment |
all .so libs needs headers, download those to /system/inc and link those to gcc with -I directive .
add a comment |
all .so libs needs headers, download those to /system/inc and link those to gcc with -I directive .
all .so libs needs headers, download those to /system/inc and link those to gcc with -I directive .
answered Dec 8 '18 at 6:47
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
solved!
download and link these headers or dev packets dependencies for fmod :
liblog android
libm android
libstdc++ android
extra:
fmod source : compile it for android 7 and 8
add a comment |
solved!
download and link these headers or dev packets dependencies for fmod :
liblog android
libm android
libstdc++ android
extra:
fmod source : compile it for android 7 and 8
add a comment |
solved!
download and link these headers or dev packets dependencies for fmod :
liblog android
libm android
libstdc++ android
extra:
fmod source : compile it for android 7 and 8
solved!
download and link these headers or dev packets dependencies for fmod :
liblog android
libm android
libstdc++ android
extra:
fmod source : compile it for android 7 and 8
answered Dec 8 '18 at 14:26
Jani VerkkomäkiJani Verkkomäki
61
61
add a comment |
add a comment |
protected by Community♦ Dec 8 '18 at 14:26
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?