Mercurial > octave-nkf
comparison libinterp/dldfcn/audiodevinfo.cc @ 19594:e75df9e43e63
disable Octave audio callback functions
* audiodevinfo.cc (F__recorder_audiorecorder__,
F__player_audioplayer__): Error if argument is a function.
* audioplayer.m, audiorecorder.m: Remove function callbacks from
documentation. Comment out callback tests.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 09 Jan 2015 15:03:01 -0500 |
parents | 0b068273340f |
children | 0d3e67f27d57 |
comparison
equal
deleted
inserted
replaced
19593:701b43ce4467 | 19594:e75df9e43e63 |
---|---|
1830 { | 1830 { |
1831 bool is_function = args(0).is_string () || args(0).is_function_handle () || args(0).is_inline_function (); | 1831 bool is_function = args(0).is_string () || args(0).is_function_handle () || args(0).is_inline_function (); |
1832 | 1832 |
1833 if (is_function) | 1833 if (is_function) |
1834 { | 1834 { |
1835 recorder->octave_callback_function = args(0).function_value (); | 1835 error ("audioplayer: callbacks not yet implemented"); |
1836 offset = 1; | 1836 return retval; |
1837 | |
1838 // recorder->octave_callback_function = args(0).function_value (); | |
1839 // offset = 1; | |
1837 } | 1840 } |
1838 } | 1841 } |
1839 | 1842 |
1840 switch (nargin - offset) | 1843 switch (nargin - offset) |
1841 { | 1844 { |
2351 audioplayer* recorder = new audioplayer (); | 2354 audioplayer* recorder = new audioplayer (); |
2352 | 2355 |
2353 bool is_function = args(0).is_string () || args(0).is_function_handle () || args(0).is_inline_function (); | 2356 bool is_function = args(0).is_string () || args(0).is_function_handle () || args(0).is_inline_function (); |
2354 | 2357 |
2355 if (is_function) | 2358 if (is_function) |
2356 recorder->set_y (args(0).function_value ()); | 2359 { |
2360 error ("audioplayer: callbacks not yet implemented"); | |
2361 return retval; | |
2362 | |
2363 // recorder->set_y (args(0).function_value ()); | |
2364 } | |
2357 else | 2365 else |
2358 recorder->set_y (args(0)); | 2366 recorder->set_y (args(0)); |
2359 | 2367 |
2360 recorder->set_fs (args(1).int_value ()); | 2368 recorder->set_fs (args(1).int_value ()); |
2361 | 2369 |