diff options
author | Tom Rondeau | 2012-04-13 18:36:53 -0400 |
---|---|---|
committer | Tom Rondeau | 2012-04-13 18:36:53 -0400 |
commit | f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch) | |
tree | 7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gr-audio | |
parent | 6a1e9783fec6ed827f49db27c171591d30f32933 (diff) | |
download | gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.gz gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.bz2 gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.zip |
Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future.
The sed script was provided by Moritz Fischer.
Diffstat (limited to 'gr-audio')
56 files changed, 342 insertions, 342 deletions
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt index f9975cf08..35fd7fc23 100644 --- a/gr-audio/CMakeLists.txt +++ b/gr-audio/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/doc/CMakeLists.txt b/gr-audio/doc/CMakeLists.txt index f4e6c4a07..483554a0e 100644 --- a/gr-audio/doc/CMakeLists.txt +++ b/gr-audio/doc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/doc/README.audio b/gr-audio/doc/README.audio index ebd0fe5d7..754c849c8 100644 --- a/gr-audio/doc/README.audio +++ b/gr-audio/doc/README.audio @@ -14,7 +14,7 @@ based on the system it is run on. Import this package with: See the Doxygen documentation for details about the blocks available in this package. A quick listing of the details can be found in Python -after importing by using: +after importing by using: help(audio) diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt index 28bbc52a5..f0d45817c 100644 --- a/gr-audio/examples/c++/CMakeLists.txt +++ b/gr-audio/examples/c++/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/examples/c++/dial_tone.cc b/gr-audio/examples/c++/dial_tone.cc index e4e3d8ceb..4cd0ff59c 100644 --- a/gr-audio/examples/c++/dial_tone.cc +++ b/gr-audio/examples/c++/dial_tone.cc @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/examples/python/audio_copy.py b/gr-audio/examples/python/audio_copy.py index 3094c9f7a..946aae1c2 100755 --- a/gr-audio/examples/python/audio_copy.py +++ b/gr-audio/examples/python/audio_copy.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio @@ -61,4 +61,4 @@ if __name__ == '__main__': my_top_block().run() except KeyboardInterrupt: pass - + diff --git a/gr-audio/examples/python/audio_fft.py b/gr-audio/examples/python/audio_fft.py index 960e0f94d..519963da5 100755 --- a/gr-audio/examples/python/audio_fft.py +++ b/gr-audio/examples/python/audio_fft.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, audio from gnuradio import eng_notation @@ -34,7 +34,7 @@ class app_top_block(stdgui2.std_top_block): self.frame = frame self.panel = panel - + parser = OptionParser(option_class=eng_option) parser.add_option("-W", "--waterfall", action="store_true", default=False, help="Enable waterfall display") @@ -45,15 +45,15 @@ class app_top_block(stdgui2.std_top_block): parser.add_option("-r", "--sample-rate", type="eng_float", default=48000, help="set sample rate to RATE (48000)") - (options, args) = parser.parse_args() + (options, args) = parser.parse_args() sample_rate = int(options.sample_rate) - + if len(args) != 0: parser.print_help() sys.exit(1) self.show_debug_info = True - + # build the graph if options.waterfall: self.scope = \ @@ -79,9 +79,9 @@ class app_top_block(stdgui2.std_top_block): def _form_set_freq(kv): return self.set_freq(kv['freq']) - + vbox.Add(self.scope.win, 10, wx.EXPAND) - + #self._build_subpanel(vbox) def _build_subpanel(self, vbox_arg): @@ -89,7 +89,7 @@ class app_top_block(stdgui2.std_top_block): # FIXME figure out how to have this be a subpanel that is always # created, but has its visibility controlled by foo.Show(True/False) - + def _form_set_decim(kv): return self.set_decim(kv['decim']) @@ -129,7 +129,7 @@ class app_top_block(stdgui2.std_top_block): hbox.Add((5,0), 0) vbox.Add(hbox, 0, wx.EXPAND) - + def main (): app = stdgui2.stdapp(app_top_block, "Audio FFT", nstatus=1) app.MainLoop() diff --git a/gr-audio/examples/python/audio_play.py b/gr-audio/examples/python/audio_play.py index f9520c7cf..465590f69 100755 --- a/gr-audio/examples/python/audio_play.py +++ b/gr-audio/examples/python/audio_play.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-audio/examples/python/audio_to_file.py b/gr-audio/examples/python/audio_to_file.py index 0d54f7bd2..3f7a4f8d1 100755 --- a/gr-audio/examples/python/audio_to_file.py +++ b/gr-audio/examples/python/audio_to_file.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio @@ -38,7 +38,7 @@ class my_top_block(gr.top_block): help="set sample rate to RATE (48000)") parser.add_option("-N", "--nsamples", type="eng_float", default=None, help="number of samples to collect [default=+inf]") - + (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() diff --git a/gr-audio/examples/python/dial_tone.py b/gr-audio/examples/python/dial_tone.py index 65c5e50b2..5661d13d4 100755 --- a/gr-audio/examples/python/dial_tone.py +++ b/gr-audio/examples/python/dial_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-audio/examples/python/dial_tone_daemon.py b/gr-audio/examples/python/dial_tone_daemon.py index d30d0e117..b25baebee 100755 --- a/gr-audio/examples/python/dial_tone_daemon.py +++ b/gr-audio/examples/python/dial_tone_daemon.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,2008 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru from gnuradio import audio diff --git a/gr-audio/examples/python/dial_tone_wav.py b/gr-audio/examples/python/dial_tone_wav.py index 6e87b2a48..c06af55b7 100755 --- a/gr-audio/examples/python/dial_tone_wav.py +++ b/gr-audio/examples/python/dial_tone_wav.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007,2008 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, # Boston, MA 02110-1301, USA. -# +# # GNU Radio example program to record a dial tone to a WAV file diff --git a/gr-audio/examples/python/mono_tone.py b/gr-audio/examples/python/mono_tone.py index 869c2e5ff..bce486e4a 100755 --- a/gr-audio/examples/python/mono_tone.py +++ b/gr-audio/examples/python/mono_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio @@ -55,7 +55,7 @@ class my_top_block(gr.top_block): dst = audio.sink (sample_rate, options.audio_output, options.ok_to_block) - + self.connect (src0, (dst, 0)) diff --git a/gr-audio/examples/python/multi_tone.py b/gr-audio/examples/python/multi_tone.py index 7d47dd5d5..00c213b63 100755 --- a/gr-audio/examples/python/multi_tone.py +++ b/gr-audio/examples/python/multi_tone.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2006,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio @@ -72,7 +72,7 @@ class my_top_block(gr.top_block): dst = audio.sink (sample_rate, options.audio_output, options.ok_to_block) - + max_chan = dst.input_signature().max_streams() if (max_chan == -1) or (max_chan > limit_channels): max_chan = limit_channels diff --git a/gr-audio/examples/python/noise.py b/gr-audio/examples/python/noise.py index 75f741082..12eee1906 100755 --- a/gr-audio/examples/python/noise.py +++ b/gr-audio/examples/python/noise.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr from gnuradio import audio diff --git a/gr-audio/examples/python/spectrum_inversion.py b/gr-audio/examples/python/spectrum_inversion.py index 021e23f2d..e152430cd 100755 --- a/gr-audio/examples/python/spectrum_inversion.py +++ b/gr-audio/examples/python/spectrum_inversion.py @@ -1,19 +1,19 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, diff --git a/gr-audio/examples/python/test_resampler.py b/gr-audio/examples/python/test_resampler.py index 4644c5e2f..db7f79fba 100755 --- a/gr-audio/examples/python/test_resampler.py +++ b/gr-audio/examples/python/test_resampler.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2005,2007 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, # Boston, MA 02110-1301, USA. -# +# from gnuradio import gr, gru, blks2 from gnuradio import audio diff --git a/gr-audio/grc/CMakeLists.txt b/gr-audio/grc/CMakeLists.txt index a077f7fb4..35c540ad3 100644 --- a/gr-audio/grc/CMakeLists.txt +++ b/gr-audio/grc/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/include/CMakeLists.txt b/gr-audio/include/CMakeLists.txt index 6db55e92c..a41506373 100644 --- a/gr-audio/include/CMakeLists.txt +++ b/gr-audio/include/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/include/gr_audio_api.h b/gr-audio/include/gr_audio_api.h index 65782d308..2ddd0fec6 100644 --- a/gr-audio/include/gr_audio_api.h +++ b/gr-audio/include/gr_audio_api.h @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/include/gr_audio_sink.h b/gr-audio/include/gr_audio_sink.h index 7a1caaf80..c2c8bdc30 100644 --- a/gr-audio/include/gr_audio_sink.h +++ b/gr-audio/include/gr_audio_sink.h @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/include/gr_audio_source.h b/gr-audio/include/gr_audio_source.h index 8fe2b9b47..0e46ab198 100644 --- a/gr-audio/include/gr_audio_source.h +++ b/gr-audio/include/gr_audio_source.h @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt index 28188a77b..7e0252a8b 100644 --- a/gr-audio/lib/CMakeLists.txt +++ b/gr-audio/lib/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/lib/alsa/audio_alsa_sink.cc b/gr-audio/lib/alsa/audio_alsa_sink.cc index 0bda42470..687f24bde 100644 --- a/gr-audio/lib/alsa/audio_alsa_sink.cc +++ b/gr-audio/lib/alsa/audio_alsa_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, @@ -51,7 +51,7 @@ static snd_pcm_format_t acceptable_formats[] = { #define NELEMS(x) (sizeof(x)/sizeof(x[0])) -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_alsa", "default_output_device", "hw:0,0"); @@ -131,7 +131,7 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, } set_input_signature (gr_make_io_signature (min_chan, max_chan, sizeof (float))); - + // fill in portions of the d_hw_params that we know now... // Specify the access methods we implement @@ -156,14 +156,14 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, "audio_alsa_sink", CHATTY_DEBUG)) throw std::runtime_error ("audio_alsa_sink"); - + // sampling rate unsigned int orig_sampling_rate = d_sampling_rate; if ((error = snd_pcm_hw_params_set_rate_near (d_pcm_handle, d_hw_params, &d_sampling_rate, 0)) < 0) bail ("failed to set rate near", error); - + if (orig_sampling_rate != d_sampling_rate){ fprintf (stderr, "audio_alsa_sink[%s]: unable to support sampling rate %d\n", snd_pcm_name (d_pcm_handle), orig_sampling_rate); @@ -204,7 +204,7 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, &d_period_size, &dir); if (error < 0) bail ("get_period_size failed", error); - + set_output_multiple (d_period_size); } @@ -226,11 +226,11 @@ audio_alsa_sink::check_topology (int ninputs, int noutputs) return true; // If stream is running, don't change any parameters else if(state == SND_PCM_STATE_XRUN ) snd_pcm_prepare ( d_pcm_handle ); // Prepare stream on underrun, and we can set parameters; - + bool special_case = nchan == 1 && d_special_case_mono_to_stereo; if (special_case) nchan = 2; - + err = snd_pcm_hw_params_set_channels (d_pcm_handle, d_hw_params, nchan); if (err < 0){ @@ -249,7 +249,7 @@ audio_alsa_sink::check_topology (int ninputs, int noutputs) err = snd_pcm_sw_params_current (d_pcm_handle, d_sw_params); if (err < 0) bail ("snd_pcm_sw_params_current", err); - + // Tell the PCM device to wait to start until we've filled // it's buffers half way full. This helps avoid audio underruns. @@ -327,7 +327,7 @@ audio_alsa_sink::work_s16 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 16-1) - 1; - + unsigned int nchan = input_items.size (); const float **in = (const float **) &input_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -351,7 +351,7 @@ audio_alsa_sink::work_s16 (int noutput_items, for (unsigned int chan = 0; chan < nchan; chan++) in[chan] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -369,7 +369,7 @@ audio_alsa_sink::work_s32 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 32-1) - 1; - + unsigned int nchan = input_items.size (); const float **in = (const float **) &input_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -393,7 +393,7 @@ audio_alsa_sink::work_s32 (int noutput_items, for (unsigned int chan = 0; chan < nchan; chan++) in[chan] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -411,7 +411,7 @@ audio_alsa_sink::work_s16_1x2 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 16-1) - 1; - + assert (input_items.size () == 1); static const unsigned int nchan = 2; const float **in = (const float **) &input_items[0]; @@ -435,7 +435,7 @@ audio_alsa_sink::work_s16_1x2 (int noutput_items, // update src pointers in[0] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -453,7 +453,7 @@ audio_alsa_sink::work_s32_1x2 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = std::pow(2.0f, 32-1) - 1; - + assert (input_items.size () == 1); static unsigned int nchan = 2; const float **in = (const float **) &input_items[0]; @@ -477,7 +477,7 @@ audio_alsa_sink::work_s32_1x2 (int noutput_items, // update src pointers in[0] += d_period_size; - if (!write_buffer (buf, d_period_size, sizeof_frame)) + if (!write_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. } @@ -496,7 +496,7 @@ audio_alsa_sink::write_buffer (const void *vbuffer, { if (d_ok_to_block == true) continue; // try again - + break; } diff --git a/gr-audio/lib/alsa/audio_alsa_sink.h b/gr-audio/lib/alsa/audio_alsa_sink.h index b33b84644..d456e53de 100644 --- a/gr-audio/lib/alsa/audio_alsa_sink.h +++ b/gr-audio/lib/alsa/audio_alsa_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, @@ -74,7 +74,7 @@ public: bool ok_to_block); ~audio_alsa_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/alsa/audio_alsa_source.cc b/gr-audio/lib/alsa/audio_alsa_source.cc index a90552ff5..9fdf80b43 100644 --- a/gr-audio/lib/alsa/audio_alsa_source.cc +++ b/gr-audio/lib/alsa/audio_alsa_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, @@ -50,7 +50,7 @@ static snd_pcm_format_t acceptable_formats[] = { #define NELEMS(x) (sizeof(x)/sizeof(x[0])) -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_alsa", "default_input_device", "hw:0,0"); @@ -127,10 +127,10 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, min_chan = 1; d_special_case_stereo_to_mono = true; } - + set_output_signature (gr_make_io_signature (min_chan, max_chan, sizeof (float))); - + // fill in portions of the d_hw_params that we know now... // Specify the access methods we implement @@ -155,14 +155,14 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, "audio_alsa_source", CHATTY_DEBUG)) throw std::runtime_error ("audio_alsa_source"); - + // sampling rate unsigned int orig_sampling_rate = d_sampling_rate; if ((error = snd_pcm_hw_params_set_rate_near (d_pcm_handle, d_hw_params, &d_sampling_rate, 0)) < 0) bail ("failed to set rate near", error); - + if (orig_sampling_rate != d_sampling_rate){ fprintf (stderr, "audio_alsa_source[%s]: unable to support sampling rate %d\n", snd_pcm_name (d_pcm_handle), orig_sampling_rate); @@ -204,7 +204,7 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, &d_period_size, &dir); if (error < 0) bail ("get_period_size failed", error); - + set_output_multiple (d_period_size); } @@ -309,7 +309,7 @@ audio_alsa_source::work_s16 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 16-1); - + unsigned int nchan = output_items.size (); float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -321,7 +321,7 @@ audio_alsa_source::work_s16 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -347,7 +347,7 @@ audio_alsa_source::work_s16_2x1 (int noutput_items, { typedef gr_int16 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 16-1); - + float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; int bi; @@ -360,7 +360,7 @@ audio_alsa_source::work_s16_2x1 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -385,7 +385,7 @@ audio_alsa_source::work_s32 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 32-1); - + unsigned int nchan = output_items.size (); float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; @@ -397,7 +397,7 @@ audio_alsa_source::work_s32 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. @@ -423,7 +423,7 @@ audio_alsa_source::work_s32_2x1 (int noutput_items, { typedef gr_int32 sample_t; // the type of samples we're creating static const float scale_factor = 1.0 / std::pow(2.0f, 32-1); - + float **out = (float **) &output_items[0]; sample_t *buf = (sample_t *) d_buffer; int bi; @@ -436,7 +436,7 @@ audio_alsa_source::work_s32_2x1 (int noutput_items, // To minimize latency, return at most a single period's worth of samples. // [We could also read the first one in a blocking mode and subsequent // ones in non-blocking mode, but we'll leave that for later (or never).] - + if (!read_buffer (buf, d_period_size, sizeof_frame)) return -1; // No fixing this problem. Say we're done. diff --git a/gr-audio/lib/alsa/audio_alsa_source.h b/gr-audio/lib/alsa/audio_alsa_source.h index 142ae711a..320d49bd2 100644 --- a/gr-audio/lib/alsa/audio_alsa_source.h +++ b/gr-audio/lib/alsa/audio_alsa_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, @@ -77,7 +77,7 @@ public: bool ok_to_block); ~audio_alsa_source (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/alsa/gri_alsa.cc b/gr-audio/lib/alsa/gri_alsa.cc index d9fda0f7d..7bae0937d 100644 --- a/gr-audio/lib/alsa/gri_alsa.cc +++ b/gr-audio/lib/alsa/gri_alsa.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 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, @@ -87,7 +87,7 @@ void gri_alsa_dump_hw_params (snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams, FILE *fp) { fprintf (fp, "PCM name: %s\n", snd_pcm_name (pcm)); - + fprintf (fp, "Access types:\n"); for (unsigned i = 0; i < NELEMS (access_types); i++){ snd_pcm_access_t at = access_types[i]; @@ -168,7 +168,7 @@ gri_alsa_pick_acceptable_format (snd_pcm_t *pcm, return true; } } - + fprintf (stderr, "%s[%s]: failed to find acceptable format", error_msg_tag, snd_pcm_name (pcm)); return false; diff --git a/gr-audio/lib/alsa/gri_alsa.h b/gr-audio/lib/alsa/gri_alsa.h index 3d72fd950..9c64e2c36 100644 --- a/gr-audio/lib/alsa/gri_alsa.h +++ b/gr-audio/lib/alsa/gri_alsa.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2004 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, @@ -26,7 +26,7 @@ #include <stdio.h> #include <alsa/asoundlib.h> -void +void gri_alsa_dump_hw_params (snd_pcm_t *pcm, snd_pcm_hw_params_t *hwparams, FILE *fp); diff --git a/gr-audio/lib/gr_audio_registry.cc b/gr-audio/lib/gr_audio_registry.cc index da4b16b35..e07bf844a 100644 --- a/gr-audio/lib/gr_audio_registry.cc +++ b/gr-audio/lib/gr_audio_registry.cc @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/lib/gr_audio_registry.h b/gr-audio/lib/gr_audio_registry.h index ec341e95e..c40e15657 100644 --- a/gr-audio/lib/gr_audio_registry.h +++ b/gr-audio/lib/gr_audio_registry.h @@ -1,18 +1,18 @@ /* * Copyright 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, diff --git a/gr-audio/lib/jack/audio_jack_sink.cc b/gr-audio/lib/jack/audio_jack_sink.cc index f06e77bd5..9caabe8e2 100644 --- a/gr-audio/lib/jack/audio_jack_sink.cc +++ b/gr-audio/lib/jack/audio_jack_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-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, @@ -50,7 +50,7 @@ typedef jack_default_audio_sample_t sample_t; // TODO: make it to match at least the quantity of items passed by work() static const unsigned int N_BUFFERS = 16; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_jack", "default_output_device", "gr_sink"); @@ -77,7 +77,7 @@ jack_sink_process (jack_nframes_t nframes, void *arg) // Tell the sink thread there is room in the ringbuffer. // If it is already running, the lock will not be available. // We can't wait here in the process() thread, but we don't - // need to signal in that case, because the sink thread will + // need to signal in that case, because the sink thread will // check for room availability. if (pthread_mutex_trylock (&self->d_jack_process_lock) == 0) { @@ -108,7 +108,7 @@ audio_jack_sink::audio_jack_sink (int sampling_rate, pthread_cond_init(&d_ringbuffer_ready, NULL);; pthread_mutex_init(&d_jack_process_lock, NULL); #endif - + // try to become a client of the JACK server jack_options_t options = JackNullOption; jack_status_t status; @@ -130,9 +130,9 @@ audio_jack_sink::audio_jack_sink (int sampling_rate, // just decides to stop calling us. //jack_on_shutdown (d_jack_client, &jack_shutdown, (void*)this); - - d_jack_output_port = - jack_port_register (d_jack_client, "out", + + d_jack_output_port = + jack_port_register (d_jack_client, "out", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); @@ -165,7 +165,7 @@ audio_jack_sink::check_topology (int ninputs, int noutputs) if (ninputs != 1) return false; - // tell the JACK server that we are ready to roll + // tell the JACK server that we are ready to roll if (jack_activate (d_jack_client)) throw std::runtime_error ("audio_jack_sink"); @@ -191,7 +191,7 @@ audio_jack_sink::work (int noutput_items, unsigned int write_space; // bytes #ifdef NO_PTHREAD - while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < + while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { usleep(1000000*((d_jack_buffer_size-write_space/sizeof(sample_t))/d_sampling_rate)); } @@ -199,7 +199,7 @@ audio_jack_sink::work (int noutput_items, // JACK actually requires POSIX pthread_mutex_lock (&d_jack_process_lock); - while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < + while ((write_space=jack_ringbuffer_write_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { // wait until jack_sink_process() signals more room diff --git a/gr-audio/lib/jack/audio_jack_sink.h b/gr-audio/lib/jack/audio_jack_sink.h index 5500b3641..8cc343937 100644 --- a/gr-audio/lib/jack/audio_jack_sink.h +++ b/gr-audio/lib/jack/audio_jack_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-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, @@ -69,7 +69,7 @@ public: audio_jack_sink (int sampling_rate, const std::string device_name, bool ok_to_block); ~audio_jack_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/jack/audio_jack_source.cc b/gr-audio/lib/jack/audio_jack_source.cc index dcd41c3ac..137fd538e 100644 --- a/gr-audio/lib/jack/audio_jack_source.cc +++ b/gr-audio/lib/jack/audio_jack_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005,2006,2010 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, @@ -50,7 +50,7 @@ typedef jack_default_audio_sample_t sample_t; // TODO: make it to match at least the quantity of items passed to work() static const unsigned int N_BUFFERS = 16; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_jack", "default_input_device", "gr_source"); @@ -78,7 +78,7 @@ jack_source_process (jack_nframes_t nframes, void *arg) // Tell the source thread there is data in the ringbuffer. // If it is already running, the lock will not be available. // We can't wait here in the process() thread, but we don't - // need to signal in that case, because the source thread will + // need to signal in that case, because the source thread will // check for data availability. if (pthread_mutex_trylock (&self->d_jack_process_lock) == 0) { @@ -131,8 +131,8 @@ audio_jack_source::audio_jack_source (int sampling_rate, // just decides to stop calling us. //jack_on_shutdown (d_jack_client, &jack_shutdown, (void*)this); - - d_jack_input_port = jack_port_register (d_jack_client, "in", + + d_jack_input_port = jack_port_register (d_jack_client, "in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); @@ -162,7 +162,7 @@ audio_jack_source::audio_jack_source (int sampling_rate, bool audio_jack_source::check_topology (int ninputs, int noutputs) { - // tell the JACK server that we are ready to roll + // tell the JACK server that we are ready to roll if (jack_activate (d_jack_client)) throw std::runtime_error ("audio_jack_source"); @@ -192,7 +192,7 @@ audio_jack_source::work (int noutput_items, unsigned int read_space; // bytes #ifdef NO_PTHREAD - while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < + while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { usleep(1000000*((d_jack_buffer_size-read_space/sizeof(sample_t))/d_sampling_rate)); } @@ -200,7 +200,7 @@ audio_jack_source::work (int noutput_items, // JACK actually requires POSIX pthread_mutex_lock (&d_jack_process_lock); - while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < + while ((read_space=jack_ringbuffer_read_space (d_ringbuffer)) < d_jack_buffer_size*sizeof(sample_t)) { // wait until jack_source_process() signals more data diff --git a/gr-audio/lib/jack/audio_jack_source.h b/gr-audio/lib/jack/audio_jack_source.h index a155bf95b..2849c84b0 100644 --- a/gr-audio/lib/jack/audio_jack_source.h +++ b/gr-audio/lib/jack/audio_jack_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005-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, @@ -69,7 +69,7 @@ public: audio_jack_source (int sampling_rate, const std::string device_name, bool ok_to_block); ~audio_jack_source (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/jack/gri_jack.cc b/gr-audio/lib/jack/gri_jack.cc index fef1c58a6..793ed8336 100644 --- a/gr-audio/lib/jack/gri_jack.cc +++ b/gr-audio/lib/jack/gri_jack.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, diff --git a/gr-audio/lib/jack/gri_jack.h b/gr-audio/lib/jack/gri_jack.h index ddc0b744d..5dcd3b811 100644 --- a/gr-audio/lib/jack/gri_jack.h +++ b/gr-audio/lib/jack/gri_jack.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2005 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, 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); diff --git a/gr-audio/lib/osx/audio_osx.h b/gr-audio/lib/osx/audio_osx.h index 79e79e36c..0a98b71ef 100644 --- a/gr-audio/lib/osx/audio_osx.h +++ b/gr-audio/lib/osx/audio_osx.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-audio/lib/osx/audio_osx_sink.cc b/gr-audio/lib/osx/audio_osx_sink.cc index 901881da6..939e5e0a1 100644 --- a/gr-audio/lib/osx/audio_osx_sink.cc +++ b/gr-audio/lib/osx/audio_osx_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -144,10 +144,10 @@ audio_osx_sink::audio_osx_sink (int sample_rate, input.inputProcRefCon = this; err = AudioUnitSetProperty (d_OutputAU, - kAudioUnitProperty_SetRenderCallback, + kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, - 0, - &input, + 0, + &input, sizeof (input)); CheckErrorAndThrow (err, "AudioUnitSetProperty Render Callback", "audio_osx_sink::audio_osx_sink"); @@ -355,11 +355,11 @@ audio_osx_sink::work (int noutput_items, } OSStatus audio_osx_sink::AUOutputCallback -(void *inRefCon, - AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, +(void *inRefCon, + AudioUnitRenderActionFlags *ioActionFlags, + const AudioTimeStamp *inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, AudioBufferList *ioData) { audio_osx_sink* This = (audio_osx_sink*) inRefCon; diff --git a/gr-audio/lib/osx/audio_osx_sink.h b/gr-audio/lib/osx/audio_osx_sink.h index e7598097d..73b3db40d 100644 --- a/gr-audio/lib/osx/audio_osx_sink.h +++ b/gr-audio/lib/osx/audio_osx_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -69,11 +69,11 @@ public: gr_vector_void_star &output_items); private: - static OSStatus AUOutputCallback (void *inRefCon, - AudioUnitRenderActionFlags *ioActionFlags, - const AudioTimeStamp *inTimeStamp, - UInt32 inBusNumber, - UInt32 inNumberFrames, + static OSStatus AUOutputCallback (void *inRefCon, + AudioUnitRenderActionFlags *ioActionFlags, + const AudioTimeStamp *inTimeStamp, + UInt32 inBusNumber, + UInt32 inNumberFrames, AudioBufferList *ioData); }; diff --git a/gr-audio/lib/osx/audio_osx_source.cc b/gr-audio/lib/osx/audio_osx_source.cc index 6c5609d20..29f0ac381 100644 --- a/gr-audio/lib/osx/audio_osx_source.cc +++ b/gr-audio/lib/osx/audio_osx_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -134,7 +134,7 @@ audio_osx_source::audio_osx_source (int sample_rate, #else ComponentDescription InputDesc; #endif - + InputDesc.componentType = kAudioUnitType_Output; InputDesc.componentSubType = kAudioUnitSubType_HALOutput; @@ -147,7 +147,7 @@ audio_osx_source::audio_osx_source (int sample_rate, #else Component comp = FindNextComponent (NULL, &InputDesc); #endif - + if (comp == NULL) { #ifndef GR_USE_OLD_AUDIO_UNIT std::cerr << "AudioComponentFindNext Error" << std::endl; @@ -166,11 +166,11 @@ audio_osx_source::audio_osx_source (int sample_rate, CheckErrorAndThrow (err, "OpenAComponent", "audio_osx_source::audio_osx_source"); #endif - + UInt32 enableIO; -// must enable the AUHAL for input and disable output +// must enable the AUHAL for input and disable output // before setting the AUHAL's current device // Enable input on the AUHAL @@ -392,7 +392,7 @@ audio_osx_source::audio_osx_source (int sample_rate, // UInt32 ACPrimeMethod = kConverterPrimeMethod_None; UInt32 ACPrimeMethod = kConverterPrimeMethod_Pre; propertySize = sizeof (ACPrimeMethod); - err = AudioConverterSetProperty (d_AudioConverter, + err = AudioConverterSetProperty (d_AudioConverter, kAudioConverterPrimeMethod, propertySize, &ACPrimeMethod); @@ -400,12 +400,12 @@ audio_osx_source::audio_osx_source (int sample_rate, "audio_osx_source::audio_osx_source"); // Get the size of the I/O buffer(s) to allow for pre-allocated buffers - + // lead frame info (trail frame info is ignored) AudioConverterPrimeInfo ACPrimeInfo = {0, 0}; propertySize = sizeof (ACPrimeInfo); - err = AudioConverterGetProperty (d_AudioConverter, + err = AudioConverterGetProperty (d_AudioConverter, kAudioConverterPrimeInfo, &propertySize, &ACPrimeInfo); @@ -981,7 +981,7 @@ audio_osx_source::SetDefaultInputDeviceAsCurrent #if _OSX_DO_LISTENERS_ OSStatus audio_osx_source::HardwareListener -(AudioHardwarePropertyID inPropertyID, +(AudioHardwarePropertyID inPropertyID, void *inClientData) { OSStatus err = noErr; @@ -1012,7 +1012,7 @@ audio_osx_source::UnitListener { OSStatus err = noErr; audio_osx_source* This = static_cast<audio_osx_source*>(inRefCon); - AudioStreamBasicDescription asbd; + AudioStreamBasicDescription asbd; std::cerr << "a_o_s::UnitListener" << std::endl; diff --git a/gr-audio/lib/osx/audio_osx_source.h b/gr-audio/lib/osx/audio_osx_source.h index 435172a2c..bb34d972c 100644 --- a/gr-audio/lib/osx/audio_osx_source.h +++ b/gr-audio/lib/osx/audio_osx_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -108,7 +108,7 @@ private: AudioUnitScope inScope, AudioUnitElement inElement); - static OSStatus HardwareListener (AudioHardwarePropertyID inPropertyID, + static OSStatus HardwareListener (AudioHardwarePropertyID inPropertyID, void *inClientData); #endif }; diff --git a/gr-audio/lib/osx/circular_buffer.h b/gr-audio/lib/osx/circular_buffer.h index 48758bf87..65788d482 100644 --- a/gr-audio/lib/osx/circular_buffer.h +++ b/gr-audio/lib/osx/circular_buffer.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006,2009,2010 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, diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.cc b/gr-audio/lib/portaudio/audio_portaudio_sink.cc index 7fdb99577..af7f1e48c 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_sink.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_sink.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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 he 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, @@ -49,7 +49,7 @@ typedef float sample_t; // Number of portaudio buffers in the ringbuffer static const unsigned int N_BUFFERS = 4; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_portaudio", "default_output_device", ""); @@ -59,7 +59,7 @@ void audio_portaudio_sink::create_ringbuffer(void) { int bufsize_samples = d_portaudio_buffer_size_frames * d_output_parameters.channelCount; - + if (d_verbose) fprintf(stderr,"ring buffer size = %d frames\n", N_BUFFERS*bufsize_samples/d_output_parameters.channelCount); @@ -89,7 +89,7 @@ portaudio_sink_callback (const void *inputBuffer, framesPerBuffer * self->d_output_parameters.channelCount; int navail_samples = self->d_reader->items_available(); - + if (nreqd_samples <= navail_samples) { // We've got enough data... { gruel::scoped_lock guard(self->d_ringbuffer_mutex); @@ -167,7 +167,7 @@ audio_portaudio_sink::audio_portaudio_sink(int sampling_rate, if (numDevices == 0) bail("no devices available", 0); - if (d_device_name.empty()) + if (d_device_name.empty()) { // FIXME Get smarter about picking something fprintf(stderr,"\nUsing Default Device\n"); @@ -259,7 +259,7 @@ audio_portaudio_sink::check_topology (int ninputs, int noutputs) return false; } -#if 0 +#if 0 const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); d_portaudio_buffer_size_frames = (int)(d_output_parameters.suggestedLatency * psi->sampleRate); @@ -332,11 +332,11 @@ audio_portaudio_sink::work (int noutput_items, int nf = std::min(noutput_items - k, nframes); float *p = (float *) d_writer->write_pointer(); - + for (int i = 0; i < nf; i++) for (unsigned int c = 0; c < nchan; c++) *p++ = in[c][k + i]; - + d_writer->update_write_pointer(nf * nchan); k += nf; diff --git a/gr-audio/lib/portaudio/audio_portaudio_sink.h b/gr-audio/lib/portaudio/audio_portaudio_sink.h index 04a881f7e..cf64d3da0 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_sink.h +++ b/gr-audio/lib/portaudio/audio_portaudio_sink.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -75,7 +75,7 @@ public: bool ok_to_block); ~audio_portaudio_sink (); - + bool check_topology (int ninputs, int noutputs); int work (int noutput_items, diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.cc b/gr-audio/lib/portaudio/audio_portaudio_source.cc index 55828ad21..ddb1a6fb6 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_source.cc +++ b/gr-audio/lib/portaudio/audio_portaudio_source.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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 he 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, @@ -49,7 +49,7 @@ typedef float sample_t; // Number of portaudio buffers in the ringbuffer static const unsigned int N_BUFFERS = 4; -static std::string +static std::string default_device_name () { return gr_prefs::singleton()->get_string("audio_portaudio", "default_input_device", ""); @@ -59,7 +59,7 @@ void audio_portaudio_source::create_ringbuffer(void) { int bufsize_samples = d_portaudio_buffer_size_frames * d_input_parameters.channelCount; - + if (d_verbose) fprintf(stderr, "ring buffer size = %d frames\n", N_BUFFERS*bufsize_samples/d_input_parameters.channelCount); @@ -101,7 +101,7 @@ portaudio_source_callback (const void *inputBuffer, inputBuffer, nframes_to_copy * nchan * sizeof(sample_t)); self->d_writer->update_write_pointer(nframes_to_copy * nchan); - + // Tell the source thread there is new data in the ringbuffer. self->d_ringbuffer_ready = true; } @@ -167,7 +167,7 @@ audio_portaudio_source::audio_portaudio_source(int sampling_rate, if (numDevices == 0) bail("no devices available", 0); - if (d_device_name.empty()) + if (d_device_name.empty()) { // FIXME Get smarter about picking something device = Pa_GetDefaultInputDevice(); @@ -178,7 +178,7 @@ audio_portaudio_source::audio_portaudio_source(int sampling_rate, else { bool found = false; - + for (i=0;i<numDevices;i++) { deviceInfo = Pa_GetDeviceInfo( i ); fprintf(stderr,"Testing device name: %s",deviceInfo->name); @@ -257,7 +257,7 @@ audio_portaudio_source::check_topology (int ninputs, int noutputs) return false; } -#if 0 +#if 0 const PaStreamInfo *psi = Pa_GetStreamInfo(d_stream); d_portaudio_buffer_size_frames = (int)(d_input_parameters.suggestedLatency * psi->sampleRate); @@ -309,7 +309,7 @@ audio_portaudio_source::work (int noutput_items, d_ringbuffer_cond.wait(guard); // block here, then try again continue; } - + assert(k == 0); // There's no data and we're not allowed to block. @@ -343,7 +343,7 @@ audio_portaudio_source::work (int noutput_items, gruel::scoped_lock guard(d_ringbuffer_mutex); int nf = std::min(noutput_items - k, nframes); - + const float *p = (const float *) d_reader->read_pointer(); for (int i = 0; i < nf; i++){ for (unsigned int c = 0; c < nchan; c++){ diff --git a/gr-audio/lib/portaudio/audio_portaudio_source.h b/gr-audio/lib/portaudio/audio_portaudio_source.h index b555bc759..e81389a3b 100644 --- a/gr-audio/lib/portaudio/audio_portaudio_source.h +++ b/gr-audio/lib/portaudio/audio_portaudio_source.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006-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, @@ -73,7 +73,7 @@ public: bool ok_to_block); ~audio_portaudio_source (); - + bool check_topology (int ninputs, int noutputs); int work (int ninput_items, diff --git a/gr-audio/lib/portaudio/gri_portaudio.cc b/gr-audio/lib/portaudio/gri_portaudio.cc index faa472337..66f3d4647 100644 --- a/gr-audio/lib/portaudio/gri_portaudio.cc +++ b/gr-audio/lib/portaudio/gri_portaudio.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, @@ -80,7 +80,7 @@ gri_print_devices() printf( "[ Default %s Input", hostInfo->name ); defaultDisplayed = 1; } - + if( i == Pa_GetDefaultOutputDevice() ) { printf( (defaultDisplayed ? "," : "[") ); @@ -90,7 +90,7 @@ gri_print_devices() else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultOutputDevice ) { const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); - printf( (defaultDisplayed ? "," : "[") ); + printf( (defaultDisplayed ? "," : "[") ); printf( " Default %s Output", hostInfo->name ); defaultDisplayed = 1; } diff --git a/gr-audio/lib/portaudio/gri_portaudio.h b/gr-audio/lib/portaudio/gri_portaudio.h index 36191e25a..c3ea7d064 100644 --- a/gr-audio/lib/portaudio/gri_portaudio.h +++ b/gr-audio/lib/portaudio/gri_portaudio.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2006 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, diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt index 8a3258f66..4997ca3f7 100644 --- a/gr-audio/swig/CMakeLists.txt +++ b/gr-audio/swig/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 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, diff --git a/gr-audio/swig/__init__.py b/gr-audio/swig/__init__.py index c1b9a0493..ff10a8976 100644 --- a/gr-audio/swig/__init__.py +++ b/gr-audio/swig/__init__.py @@ -1,18 +1,18 @@ # # Copyright 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, diff --git a/gr-audio/swig/audio_swig.i b/gr-audio/swig/audio_swig.i index 71db0ae09..089055dac 100644 --- a/gr-audio/swig/audio_swig.i +++ b/gr-audio/swig/audio_swig.i @@ -1,18 +1,18 @@ /* * Copyright 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, |