Commit 208bfdc1 authored by Your Name's avatar Your Name
Browse files

fix C++ comments

parent ce605efb
......@@ -88,10 +88,10 @@ zmq_audiobuffer::~zmq_audiobuffer() {
Pa_CloseStream(stream);
}
/* This routine will be called by the PortAudio engine when audio is needed.
** It may called at interrupt level on some machines so don't do anything
** that could mess up the system like calling malloc() or free().
*/
// This routine will be called by the PortAudio engine when audio is needed.
// It may called at interrupt level on some machines so don't do anything
// that could mess up the system like calling malloc() or free().
//
int zmq_audiobuffer::stream_callback(
const void *, void *outputBuffer,
unsigned long framesPerBuffer,
......@@ -118,9 +118,9 @@ int zmq_audiobuffer::stream_callback(
return ret;
}
/*
* This routine is called by portaudio when playback is done.
*/
//
// This routine is called by portaudio when playback is done.
//
void zmq_audiobuffer::stream_finished(void *userData) {
zmq_audiobuffer *pbuf = (zmq_audiobuffer *)userData;
pbuf->playing = false;
......@@ -133,23 +133,23 @@ int zmq_audiobuffer::play() {
PaStreamParameters outputParameters;
outputParameters.device =
Pa_GetDefaultOutputDevice(); /* default output device */
Pa_GetDefaultOutputDevice(); // default output device
if (outputParameters.device == paNoDevice) {
fprintf(stderr, "Error: No default output device.\n");
return paNoDevice;
}
outputParameters.channelCount = nchan; /* stereo output */
outputParameters.channelCount = nchan; // stereo output
outputParameters.sampleFormat =
paFloat32; /* 32 bit floating point output */
paFloat32; // 32 bit floating point output
outputParameters.suggestedLatency =
Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
outputParameters.hostApiSpecificStreamInfo = NULL;
PaError err;
err = Pa_OpenStream(&stream, NULL, /* no input */
err = Pa_OpenStream(&stream, NULL, // no input
&outputParameters, fsamp, frames_per_buffer,
paClipOff, /* we won't output out of range samples so
don't bother clipping them */
paClipOff, // we won't output out of range samples so
// don't bother clipping them
zmq_audiobuffer::stream_callback, this);
sprintf(message, "No Message");
err =
......@@ -246,7 +246,6 @@ int zmq_recv_multi(zmq::socket_t &socket, zmq::message_t parts[], int nmax) {
return n;
}
/*******************************************************************/
int main(void) {
PaError err = Pa_Initialize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment