Skip to content

Commit

Permalink
Merge branch 'ms-pipewire-fix' into ms-2020-experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Jun 23, 2022
2 parents fed4925 + 26f897f commit 8f73a54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/audio/IAudioDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void IAudioDevice::setOnAudioOverflow(AudioOverflowCallbackFn fn, void* state)
onAudioOverflowState = state;
}

void IAudioDevice::setOnAudioUnderflow(AudioOverflowCallbackFn fn, void* state)
void IAudioDevice::setOnAudioUnderflow(AudioUnderflowCallbackFn fn, void* state)
{
onAudioUnderflowFunction = fn;
onAudioUnderflowState = state;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/IAudioDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class IAudioDevice
// Callback must take the following parameters:
// 1. Audio device.
// 2. Pointer to user-provided state object (typically onAudioUnderflowState, defined below).
void setOnAudioUnderflow(AudioOverflowCallbackFn fn, void* state);
void setOnAudioUnderflow(AudioUnderflowCallbackFn fn, void* state);

// Set error callback.
// Callback must take the following parameters:
Expand Down
9 changes: 6 additions & 3 deletions src/audio/PulseAudioDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ void PulseAudioDevice::start()
int result = 0;
if (direction_ == IAudioEngine::AUDIO_ENGINE_OUT)
{
fprintf(stderr, "PulseAudioDevice: connecting to playback device %s\n", (const char*)devName_.ToUTF8());
time_t result = time(NULL);
fprintf(stderr, "PulseAudioDevice[%s]: connecting to playback device %s\n", ctime(&result), (const char*)devName_.ToUTF8());

pa_stream_set_write_callback(stream_, &PulseAudioDevice::StreamWriteCallback_, this);
result = pa_stream_connect_playback(
Expand All @@ -108,7 +109,8 @@ void PulseAudioDevice::start()
}
else
{
fprintf(stderr, "PulseAudioDevice: connecting to record device %s\n", (const char*)devName_.ToUTF8());
time_t result = time(NULL);
fprintf(stderr, "PulseAudioDevice[%s]: connecting to record device %s\n", ctime(&result), (const char*)devName_.ToUTF8());

pa_stream_set_read_callback(stream_, &PulseAudioDevice::StreamReadCallback_, this);
result = pa_stream_connect_record(
Expand Down Expand Up @@ -316,7 +318,8 @@ void PulseAudioDevice::StreamMovedCallback_(pa_stream *p, void *userdata)
auto newDevName = pa_stream_get_device_name(p);
PulseAudioDevice* thisObj = static_cast<PulseAudioDevice*>(userdata);

fprintf(stderr, "PulseAudioDevice: stream named %s has been moved to %s\n", (const char*)thisObj->devName_.ToUTF8(), newDevName);
time_t result = time(NULL);
fprintf(stderr, "PulseAudioDevice[%s]: stream named %s has been moved to %s\n", ctime(&result), (const char*)thisObj->devName_.ToUTF8(), newDevName);

thisObj->devName_ = newDevName;

Expand Down

0 comments on commit 8f73a54

Please sign in to comment.