esd sort of working

This commit is contained in:
urioxis 2011-02-10 14:54:12 +00:00
parent e129b71739
commit 6c597b4f78
2 changed files with 9 additions and 3 deletions

View File

@ -235,8 +235,14 @@ void EsdOut::SetFormat(IBuffer *buffer){
this->waveFormat |= ESD_STREAM;
this->waveFormat |= ESD_PLAY;
this->waveHandle = esd_play_stream(this->waveFormat, (int)this->currentSampleRate, "192.168.10.1:16001", "musik");
#ifdef _DEBUG
std::cerr << "waveFormat: " << this->waveFormat << std::endl;
#endif
char* host = getenv("ESPEAKER");
#ifdef _DEBUG
std::cerr << "host: " << host << std::endl;
#endif
this->waveHandle = esd_play_stream(this->waveFormat, (int)this->currentSampleRate, host, "musik");
#ifdef _DEBUG
std::cerr << "waveHandle: " << this->waveHandle << std::endl;
#endif

View File

@ -102,7 +102,7 @@ bool EsdOutBuffer::AddToOutput(){
printf("Short write (expected %li, wrote %li)\n", (long)bufferLength, frames);
return false;
}*/
if ( write( *wHandle, *data, bufferLength ) <= 0 )
if ( write( *wHandle, data, bufferLength ) <= 0 )
return false;
return true;
}