summaryrefslogtreecommitdiff
path: root/gr-audio/lib/oss
diff options
context:
space:
mode:
Diffstat (limited to 'gr-audio/lib/oss')
-rw-r--r--gr-audio/lib/oss/audio_oss_sink.cc14
-rw-r--r--gr-audio/lib/oss/audio_oss_sink.h10
-rw-r--r--gr-audio/lib/oss/audio_oss_source.cc14
-rw-r--r--gr-audio/lib/oss/audio_oss_source.h10
4 files changed, 24 insertions, 24 deletions
diff --git a/gr-audio/lib/oss/audio_oss_sink.cc b/gr-audio/lib/oss/audio_oss_sink.cc
index 34af16cce..26b71be24 100644
--- a/gr-audio/lib/oss/audio_oss_sink.cc
+++ b/gr-audio/lib/oss/audio_oss_sink.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004-2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -66,7 +66,7 @@ audio_oss_sink::audio_oss_sink (int sampling_rate,
throw std::runtime_error ("audio_oss_sink");
}
- double CHUNK_TIME =
+ double CHUNK_TIME =
std::max(0.001, gr_prefs::singleton()->get_double("audio_oss", "latency", 0.005));
d_chunk_size = (int) (d_sampling_rate * CHUNK_TIME);
@@ -121,7 +121,7 @@ audio_oss_sink::work (int noutput_items,
gr_vector_void_star &output_items)
{
const float *f0, *f1;
-
+
switch (input_items.size ()){
case 1: // mono input
@@ -138,7 +138,7 @@ audio_oss_sink::work (int noutput_items,
perror ("audio_oss_sink: write");
}
break;
-
+
case 2: // stereo input
f0 = (const float *) input_items[0];
diff --git a/gr-audio/lib/oss/audio_oss_sink.h b/gr-audio/lib/oss/audio_oss_sink.h
index 47b1407d3..8148ec34b 100644
--- a/gr-audio/lib/oss/audio_oss_sink.h
+++ b/gr-audio/lib/oss/audio_oss_sink.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004-2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -46,7 +46,7 @@ public:
audio_oss_sink (int sampling_rate, const std::string device_name = "", bool ok_to_block = true);
~audio_oss_sink ();
-
+
int work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
diff --git a/gr-audio/lib/oss/audio_oss_source.cc b/gr-audio/lib/oss/audio_oss_source.cc
index eefe4dd04..e186e30ae 100644
--- a/gr-audio/lib/oss/audio_oss_source.cc
+++ b/gr-audio/lib/oss/audio_oss_source.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004-2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -126,13 +126,13 @@ audio_oss_source::work (int noutput_items,
const int bytes_per_item = shorts_per_item * sizeof (short);
// To minimize latency, never return more than CHUNK_TIME
- // worth of samples per call to work.
+ // worth of samples per call to work.
noutput_items = std::min (noutput_items, d_chunk_size);
int base = 0;
int ntogo = noutput_items;
-
+
while (ntogo > 0){
int nbytes = std::min (ntogo, d_chunk_size) * bytes_per_item;
int result_nbytes = read (d_fd, d_buffer, nbytes);
@@ -158,7 +158,7 @@ audio_oss_source::work (int noutput_items,
}
break;
- case 2: // stereo output
+ case 2: // stereo output
for (int i = 0; i < result_nitems; i++){
f0[base+i] = d_buffer[2*i+0] * (1.0 / 32767);
f1[base+i] = d_buffer[2*i+1] * (1.0 / 32767);
diff --git a/gr-audio/lib/oss/audio_oss_source.h b/gr-audio/lib/oss/audio_oss_source.h
index df9f68e42..abb2db1f8 100644
--- a/gr-audio/lib/oss/audio_oss_source.h
+++ b/gr-audio/lib/oss/audio_oss_source.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004-2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -48,7 +48,7 @@ public:
bool ok_to_block = true);
~audio_oss_source ();
-
+
int work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);