annotate scripts/audio/@audiorecorder/audiorecorder.m @ 19609:7f5006dfa2eb

* audiorecorder.m: Fix test.
author John W. Eaton <jwe@octave.org>
date Tue, 13 Jan 2015 23:06:08 -0500
parents 72304a4e010a
children b2fe4dbe5266
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19534
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
1 ## Copyright (C) 2013 Vytautas JanĨauskas
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
2 ##
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
3 ## This file is part of Octave.
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
4 ##
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
6 ## under the terms of the GNU General Public License as published by
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
8 ## your option) any later version.
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
9 ##
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
13 ## General Public License for more details.
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
14 ##
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
15 ## You should have received a copy of the GNU General Public License
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
17 ## <http://www.gnu.org/licenses/>.
8bb399569393 Add Octave copyright header block to audio project files
Mike Miller <mtmiller@ieee.org>
parents: 19531
diff changeset
18
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
19 ## -*- texinfo -*-
19605
72304a4e010a Use Octave coding conventions for documentation of audio functions.
Rik <rik@octave.org>
parents: 19594
diff changeset
20 ## @deftypefn {Function File} {@var{recorder} =} audiorecorder ()
19540
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
21 ## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{fs}, @var{nbits}, @var{channels})
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
22 ## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{fs}, @var{nbits}, @var{channels}, @var{id})
19539
ce02743b6f2a Fix texinfo docstring syntax for all audio functions
Mike Miller <mtmiller@ieee.org>
parents: 19537
diff changeset
23 ## Create an audiorecorder object recording 8 bit mono audio at 8000 Hz
19540
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
24 ## sample rate. The optional arguments @var{fs}, @var{nbits},
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
25 ## @var{channels}, and @var{id} specify the sample rate, bit depth,
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
26 ## number of channels and recording device id, respectively. Device IDs
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
27 ## may be found using the audiodevinfo function.
19594
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
28 ## @end deftypefn
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
29
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
30 ## FIXME: callbacks don't work properly, apparently because portaudio
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
31 ## will execute the callbacks in a separate thread, and calling Octave
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
32 ## functions in a separate thread which is likely to cause trouble with
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
33 ## all of Octave's global data...
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
34 ##
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
35 ## @deftypefnx {Function File} {@var{recorder} =} audiorecorder (@var{function}, @dots{})
e75df9e43e63 disable Octave audio callback functions
John W. Eaton <jwe@octave.org>
parents: 19562
diff changeset
36 ##
19540
fdb8a62ef17a fix docstring style in .m files
John W. Eaton <jwe@octave.org>
parents: 19539
diff changeset
37 ## Given a function handle, use that function to process the audio.
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
38
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
39 function recorder = audiorecorder (varargin)
19557
5802ea7037d4 style fixes for audioplayer and audiorecorder classes
John W. Eaton <jwe@octave.org>
parents: 19543
diff changeset
40
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
41 if (nargin > 5)
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
42 print_usage ();
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
43 endif
19557
5802ea7037d4 style fixes for audioplayer and audiorecorder classes
John W. Eaton <jwe@octave.org>
parents: 19543
diff changeset
44
19541
dac3191a5301 style fixes for audioplayer and audiorecorder .m files
John W. Eaton <jwe@octave.org>
parents: 19540
diff changeset
45 if (nargin > 0 && ischar (varargin{1}))
19537
36a26a131209 Apply Octave coding style to audio project additions
Mike Miller <mtmiller@ieee.org>
parents: 19534
diff changeset
46 varargin{1} = str2func (varargin{1});
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
47 endif
19557
5802ea7037d4 style fixes for audioplayer and audiorecorder classes
John W. Eaton <jwe@octave.org>
parents: 19543
diff changeset
48
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
49 recorder.recorder = __recorder_audiorecorder__ (varargin{:});
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
50 recorder = class (recorder, "audiorecorder");
19557
5802ea7037d4 style fixes for audioplayer and audiorecorder classes
John W. Eaton <jwe@octave.org>
parents: 19543
diff changeset
51
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
52 endfunction
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
53
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
54 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
55 %! recorder = audiorecorder (44100, 16, 2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
56 %! recordblocking (recorder, 1);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
57 %! data = getaudiodata (recorder, "int16");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
58 %! assert (strcmp (class (data), "int16"));
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
59 %! data = getaudiodata (recorder, "int8");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
60 %! assert (strcmp (class (data), "int8"));
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
61 %! data = getaudiodata (recorder, "uint8");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
62 %! assert (strcmp (class (data), "uint8"));
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
63 %! assert (size (data)(1), recorder.TotalSamples);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
64 %! assert (size (data)(2), 2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
65 %! assert (size (data)(1) != 0);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
66
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
67 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
68 %! recorder = audiorecorder (44100, 16, 2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
69 %! record (recorder, 1)
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
70 %! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
71 %! record (recorder, 1);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
72 %! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
73 %! data = getaudiodata (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
74 %! assert (size (data)(1) < 44100 * 2);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
75
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
76 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
77 %! recorder = audiorecorder (44100, 16, 2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
78 %! record (recorder, 1);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
79 %! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
80 %! player1 = audioplayer (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
81 %! player2 = getplayer (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
82 %! play (player1);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
83 %! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
84 %! play (player2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
85 %! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
86 %! assert (player1.TotalSamples, recorder.TotalSamples);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
87 %! assert (player2.TotalSamples, recorder.TotalSamples);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
88
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
89 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
90 %! recorder = audiorecorder;
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
91 %! set (recorder, {"SampleRate", "Tag", "UserData"}, {8000, "tag", [1, 2; 3, 4]});
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
92 %! assert (recorder.SampleRate, 8000);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
93 %! assert (recorder.Tag, "tag");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
94 %! assert (recorder.UserData, [1, 2; 3, 4]);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
95
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
96 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
97 %! recorder = audiorecorder;
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
98 %! settable = set (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
99 %! settable.SampleRate = 8000;
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
100 %! settable.Tag = "tag";
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
101 %! settable.UserData = [1, 2; 3, 4];
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
102 %! set (recorder, settable);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
103 %! assert (recorder.SampleRate, 8000);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
104 %! assert (recorder.Tag, "tag");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
105 %! assert (recorder.UserData, [1, 2; 3, 4]);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
106
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
107 %!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
108 %! recorder = audiorecorder;
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
109 %! recorder.SampleRate = 8000;
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
110 %! recorder.Tag = "tag";
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
111 %! recorder.UserData = [1, 2; 3, 4];
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
112 %! properties = get (recorder, {"SampleRate", "Tag", "UserData"});
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
113 %! assert (properties, {8000, "tag", [1, 2; 3, 4]});
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
114
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
115 #%!function status = callback_record (sound)
19537
36a26a131209 Apply Octave coding style to audio project additions
Mike Miller <mtmiller@ieee.org>
parents: 19534
diff changeset
116 #%! fid = fopen ("record.txt", "at");
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
117 #%! for index = 1:rows(sound)
19537
36a26a131209 Apply Octave coding style to audio project additions
Mike Miller <mtmiller@ieee.org>
parents: 19534
diff changeset
118 #%! fprintf (fid, "%.4f, %.4f\n", sound(index, 1), sound(index, 2));
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
119 #%! endfor
19537
36a26a131209 Apply Octave coding style to audio project additions
Mike Miller <mtmiller@ieee.org>
parents: 19534
diff changeset
120 #%! fclose (fid);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
121 #%! status = 0;
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
122 #%!endfunction
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
123
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
124 #%!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
125 #%! recorder = audiorecorder (@callback_record, 44100);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
126 #%! unlink ("record.txt")
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
127 #%! record (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
128 #%! sleep (2);
19609
7f5006dfa2eb * audiorecorder.m: Fix test.
John W. Eaton <jwe@octave.org>
parents: 19605
diff changeset
129 #%! stop (recorder);
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
130 #%! s = stat ("record.txt");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
131 #%! assert (s.size > 0);
19510
e1f98e402a7e New files - @audiorecorder and @audioplayer classes
Vytautas Jančauskas <unaudio@gmail.com>
parents:
diff changeset
132
19562
4f615cd9a68d Use "testif HAVE_PORTAUDIO" for new audio function tests
Andreas Weber <andy.weber.aw@gmail.com>
parents: 19557
diff changeset
133 #%!testif HAVE_PORTAUDIO
19543
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
134 #%! recorder = audiorecorder (@callback_record, 44100);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
135 #%! unlink ("record.txt")
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
136 #%! record (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
137 #%! sleep (2);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
138 #%! stop (recorder);
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
139 #%! s = stat ("record.txt");
2a16dac2176f fix audioplayer tests
John W. Eaton <jwe@octave.org>
parents: 19541
diff changeset
140 #%! assert (s.size > 0);