Cancelled

Problem with playing audio in real time using OpenSL ES + NDK

I'm trying to record audio and play it in real time using OpenSL ES, I can send the audio packet to the server, and the server is sending the packet to users correctly. However, there is a problem that I don't know why. The user who is recording can hear himself (the audio goes through the server and goes back to him), but when another user is speaking, the audio packages arrive and when I will queue the application closes.

Here is the part where I play the audio packets that arrive from the server.

void setBuffer(int playerid, uint8_t* buffer, size_t bufferSize)

{

if (buffer != NULL && playerBufferQueueItf != NULL && playerPlay != NULL && engineEngine != NULL)

{

(*playerBufferQueueItf)->Enqueue(playerBufferQueueItf, buffer, bufferSize);

}

}

Below starts the listen

createEngine();

// Create a mixer

SLresult result;

result = (*engineEngine)->CreateOutputMix(engineEngine, &outputMixObjext, 0, 0, 0);

assert(SL_RESULT_SUCCESS == result);

(void)result;

result = (*outputMixObjext)->Realize(outputMixObjext, SL_BOOLEAN_FALSE);

assert(SL_RESULT_SUCCESS == result);

(void)result;

// Create a player

createAudioPlayer(engineEngine, outputMixObjext, playerObject);

result = (*playerObject)->Realize(playerObject, SL_BOOLEAN_FALSE);

assert(SL_RESULT_SUCCESS == result);

(void)result;

result = (*playerObject)->GetInterface(playerObject, SL_IID_BUFFERQUEUE, &playerBufferQueueItf);

assert(SL_RESULT_SUCCESS == result);

(void)result;

result = (*playerObject)->GetInterface(playerObject, SL_IID_PLAY, &playerPlay);

assert(SL_RESULT_SUCCESS == result);

(void)result;

result = (*playerPlay)->SetPlayState(playerPlay, SL_PLAYSTATE_PLAYING);

assert(SL_RESULT_SUCCESS == result);

I took this link as a base [login to view URL], it writes to a file and reproduces, my record sends to the server and reproduces in real time. (does not store anything in the file)

Skills: C++ Programming, Android, Audio Processing

See more: save real time player online audio, real time web cam streaming using flash aspnet, real time clock ds1307 project using pic micro, real time clock using pic, java code send real time video audio, real time audio streaming java, free real time gps tracking using gps phone, real time using 1307 ccs, real time web application using, curriencies price real time using, using auctioneer real time search, listen audio remote computer real time, real time eye tracking using matlab, real time image processing project using labview, real time audio streaming spy, real time wpf video playing, real time commenting using ajax, real time data extraction using, real time audio wifi, eye tracking real time using matlab

About the Employer:
( 1 review ) Chapecó, Brazil

Project ID: #27866512

3 freelancers are bidding on average $183 for this job

tenia5200299

Hi, project owner After carefully reading your job description, I am very impressed with your project and now have a full understanding of it. I am extremely experienced in iOS and Android app development with 5 years More

$100 USD in 2 days
(4 Reviews)
3.1
zaharprogger

Hi, I have read your description and I am so interested in your project. Don't worry, C++ and Image Audio Processing is my first job. I am confident in your project and I can finish it clearly on time. I am well exper More

$200 USD in 3 days
(2 Reviews)
2.1
bgpatel1

HopeLeaf Technologies is a technology startup founded by industry experts who bring in decades of experience as Information Technology specialists and entrepreneurs. We transform innovative ideas into state-of-the-art More

$250 USD in 10 days
(0 Reviews)
0.0