summaryrefslogtreecommitdiff
path: root/gr-audio/lib/windows/windows_source.cc
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2019-02-01 10:36:10 +0100
committerMarcus Müller <marcus@hostalia.de>2019-02-01 15:16:43 +0100
commit668ae25e46ab9e4ec592dfdb6d6bd0da1b0b150e (patch)
tree249a2e078e2c9621f47f57a438e079800c78294d /gr-audio/lib/windows/windows_source.cc
parent441c155ad9b33c6f84c389003a5cb1646ba6211b (diff)
cleanup: fix local includes in gr-audio
Previously all directories were in the include path which breaks for local includes in pointy brackets. This commit uses quotes for local includes in gr-audio now.
Diffstat (limited to 'gr-audio/lib/windows/windows_source.cc')
-rw-r--r--gr-audio/lib/windows/windows_source.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/gr-audio/lib/windows/windows_source.cc b/gr-audio/lib/windows/windows_source.cc
index 9f177462e2..b5550a59c2 100644
--- a/gr-audio/lib/windows/windows_source.cc
+++ b/gr-audio/lib/windows/windows_source.cc
@@ -24,8 +24,8 @@
#include "config.h"
#endif
-#include "audio_registry.h"
-#include <windows_source.h>
+#include "../audio_registry.h"
+#include "windows_source.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -77,7 +77,7 @@ namespace gr {
wave_format.wFormatTag = WAVE_FORMAT_PCM;
wave_format.nChannels = 1; // changing this will require adjustments to the work routine.
wave_format.wBitsPerSample = 16; // changing this will necessitate changing buffer type from short.
- wave_format.nSamplesPerSec = d_sampling_freq; // defined by flowgraph settings, but note that the microphone will likely have a native sample rate
+ wave_format.nSamplesPerSec = d_sampling_freq; // defined by flowgraph settings, but note that the microphone will likely have a native sample rate
// that the audio system may upsample to you desired rate, so check where the cutoff ends up or check your control panel
wave_format.nBlockAlign =
wave_format.nChannels * (wave_format.wBitsPerSample / 8);
@@ -101,7 +101,7 @@ namespace gr {
for (int i = 0; i < nPeriods; i++)
{
lp_buffers[i] = new WAVEHDR;
- LPWAVEHDR lp_buffer = lp_buffers[i];
+ LPWAVEHDR lp_buffer = lp_buffers[i];
lp_buffer->dwLoops = 0L;
lp_buffer->dwFlags = 0;
lp_buffer->dwBufferLength = d_buffer_size;
@@ -147,7 +147,7 @@ namespace gr {
float *f0, *f1;
DWORD dw_items = 0;
- while (!buffer_queue.empty())
+ while (!buffer_queue.empty())
{
// Pull the next incoming buffer off the queue
LPWAVEHDR next_header = buffer_queue.front();
@@ -157,7 +157,7 @@ namespace gr {
DWORD buffer_length = next_header->dwBytesRecorded / sizeof(short);
if (buffer_length + dw_items > noutput_items * output_items.size()) {
- // There's not enough output buffer space to send the whole input buffer
+ // There's not enough output buffer space to send the whole input buffer
// so don't try, just leave it in the queue
// or else we'd have to track how much we sent etc
// In theory we should never reach this code because the buffers should all be
@@ -206,11 +206,11 @@ namespace gr {
MMRESULT windows_source::is_format_supported(LPWAVEFORMATEX pwfx, UINT uDeviceID)
{
return (waveInOpen(
- NULL, // ptr can be NULL for query
- uDeviceID, // the device identifier
- pwfx, // defines requested format
- NULL, // no callback
- NULL, // no instance data
+ NULL, // ptr can be NULL for query
+ uDeviceID, // the device identifier
+ pwfx, // defines requested format
+ NULL, // no callback
+ NULL, // no instance data
WAVE_FORMAT_QUERY)); // query only, do not open device
}