Mercurial > octave
comparison libinterp/dldfcn/audiodevinfo.cc @ 21103:5a83a422d8a7
Don't set 3rd argument to err_disabled_feature within core Octave.
* audiodevinfo.cc, audioread.cc: Call err_disabled_feature (A, B) and
use default for 3rd argument which is "Octave".
author | Rik <rik@octave.org> |
---|---|
date | Tue, 19 Jan 2016 08:43:03 -0800 |
parents | e39e05d90788 |
children | 8f76684324b5 |
comparison
equal
deleted
inserted
replaced
21102:dfcb9d74b253 | 21103:5a83a422d8a7 |
---|---|
405 | 405 |
406 return retval; | 406 return retval; |
407 | 407 |
408 #else | 408 #else |
409 err_disabled_feature ("audiodevinfo", | 409 err_disabled_feature ("audiodevinfo", |
410 "audio playback and recording through PortAudio", | 410 "audio playback and recording through PortAudio"); |
411 "Octave"); | |
412 #endif | 411 #endif |
413 } | 412 } |
414 | 413 |
415 /* | 414 /* |
416 %!testif HAVE_PORTAUDIO | 415 %!testif HAVE_PORTAUDIO |
1811 { | 1810 { |
1812 octave_value retval; | 1811 octave_value retval; |
1813 | 1812 |
1814 #ifndef HAVE_PORTAUDIO | 1813 #ifndef HAVE_PORTAUDIO |
1815 err_disabled_feature ("__recorder_audiorecorder__", | 1814 err_disabled_feature ("__recorder_audiorecorder__", |
1816 "audio playback and recording through PortAudio", | 1815 "audio playback and recording through PortAudio"); |
1817 "Octave"); | |
1818 #else | 1816 #else |
1819 | 1817 |
1820 int nargin = args.length (); | 1818 int nargin = args.length (); |
1821 | 1819 |
1822 audiorecorder* recorder = new audiorecorder (); | 1820 audiorecorder* recorder = new audiorecorder (); |
1875 @end deftypefn") | 1873 @end deftypefn") |
1876 { | 1874 { |
1877 octave_value retval; | 1875 octave_value retval; |
1878 #ifndef HAVE_PORTAUDIO | 1876 #ifndef HAVE_PORTAUDIO |
1879 err_disabled_feature ("__recorder_getaudiodata__", | 1877 err_disabled_feature ("__recorder_getaudiodata__", |
1880 "audio playback and recording through PortAudio", | 1878 "audio playback and recording through PortAudio"); |
1881 "Octave"); | |
1882 #else | 1879 #else |
1883 retval = get_recorder (args(0))->getaudiodata (); | 1880 retval = get_recorder (args(0))->getaudiodata (); |
1884 #endif | 1881 #endif |
1885 return retval; | 1882 return retval; |
1886 } | 1883 } |
1892 @end deftypefn") | 1889 @end deftypefn") |
1893 { | 1890 { |
1894 octave_value retval; | 1891 octave_value retval; |
1895 #ifndef HAVE_PORTAUDIO | 1892 #ifndef HAVE_PORTAUDIO |
1896 err_disabled_feature ("__recorder_get_channels__", | 1893 err_disabled_feature ("__recorder_get_channels__", |
1897 "audio playback and recording through PortAudio", | 1894 "audio playback and recording through PortAudio"); |
1898 "Octave"); | |
1899 #else | 1895 #else |
1900 retval = get_recorder (args(0))->get_channels (); | 1896 retval = get_recorder (args(0))->get_channels (); |
1901 #endif | 1897 #endif |
1902 return retval; | 1898 return retval; |
1903 } | 1899 } |
1909 @end deftypefn") | 1905 @end deftypefn") |
1910 { | 1906 { |
1911 octave_value retval; | 1907 octave_value retval; |
1912 #ifndef HAVE_PORTAUDIO | 1908 #ifndef HAVE_PORTAUDIO |
1913 err_disabled_feature ("__recorder_get_fs__", | 1909 err_disabled_feature ("__recorder_get_fs__", |
1914 "audio playback and recording through PortAudio", | 1910 "audio playback and recording through PortAudio"); |
1915 "Octave"); | |
1916 #else | 1911 #else |
1917 retval = get_recorder (args(0))->get_fs (); | 1912 retval = get_recorder (args(0))->get_fs (); |
1918 #endif | 1913 #endif |
1919 return retval; | 1914 return retval; |
1920 } | 1915 } |
1926 @end deftypefn") | 1921 @end deftypefn") |
1927 { | 1922 { |
1928 octave_value retval; | 1923 octave_value retval; |
1929 #ifndef HAVE_PORTAUDIO | 1924 #ifndef HAVE_PORTAUDIO |
1930 err_disabled_feature ("__recorder_get_id__", | 1925 err_disabled_feature ("__recorder_get_id__", |
1931 "audio playback and recording through PortAudio", | 1926 "audio playback and recording through PortAudio"); |
1932 "Octave"); | |
1933 #else | 1927 #else |
1934 retval = get_recorder (args(0))->get_id (); | 1928 retval = get_recorder (args(0))->get_id (); |
1935 #endif | 1929 #endif |
1936 return retval; | 1930 return retval; |
1937 } | 1931 } |
1943 @end deftypefn") | 1937 @end deftypefn") |
1944 { | 1938 { |
1945 octave_value retval; | 1939 octave_value retval; |
1946 #ifndef HAVE_PORTAUDIO | 1940 #ifndef HAVE_PORTAUDIO |
1947 err_disabled_feature ("__recorder_get_nbits__", | 1941 err_disabled_feature ("__recorder_get_nbits__", |
1948 "audio playback and recording through PortAudio", | 1942 "audio playback and recording through PortAudio"); |
1949 "Octave"); | |
1950 #else | 1943 #else |
1951 retval = get_recorder (args(0))->get_nbits (); | 1944 retval = get_recorder (args(0))->get_nbits (); |
1952 #endif | 1945 #endif |
1953 return retval; | 1946 return retval; |
1954 } | 1947 } |
1960 @end deftypefn") | 1953 @end deftypefn") |
1961 { | 1954 { |
1962 octave_value retval; | 1955 octave_value retval; |
1963 #ifndef HAVE_PORTAUDIO | 1956 #ifndef HAVE_PORTAUDIO |
1964 err_disabled_feature ("__recorder_get_sample_number__", | 1957 err_disabled_feature ("__recorder_get_sample_number__", |
1965 "audio playback and recording through PortAudio", | 1958 "audio playback and recording through PortAudio"); |
1966 "Octave"); | |
1967 #else | 1959 #else |
1968 retval = get_recorder (args(0))->get_sample_number (); | 1960 retval = get_recorder (args(0))->get_sample_number (); |
1969 #endif | 1961 #endif |
1970 return retval; | 1962 return retval; |
1971 } | 1963 } |
1977 @end deftypefn") | 1969 @end deftypefn") |
1978 { | 1970 { |
1979 octave_value retval; | 1971 octave_value retval; |
1980 #ifndef HAVE_PORTAUDIO | 1972 #ifndef HAVE_PORTAUDIO |
1981 err_disabled_feature ("__recorder_get_tag__", | 1973 err_disabled_feature ("__recorder_get_tag__", |
1982 "audio playback and recording through PortAudio", | 1974 "audio playback and recording through PortAudio"); |
1983 "Octave"); | |
1984 #else | 1975 #else |
1985 retval = get_recorder (args(0))->get_tag (); | 1976 retval = get_recorder (args(0))->get_tag (); |
1986 #endif | 1977 #endif |
1987 return retval; | 1978 return retval; |
1988 } | 1979 } |
1994 @end deftypefn") | 1985 @end deftypefn") |
1995 { | 1986 { |
1996 octave_value retval; | 1987 octave_value retval; |
1997 #ifndef HAVE_PORTAUDIO | 1988 #ifndef HAVE_PORTAUDIO |
1998 err_disabled_feature ("__recorder_get_total_samples__", | 1989 err_disabled_feature ("__recorder_get_total_samples__", |
1999 "audio playback and recording through PortAudio", | 1990 "audio playback and recording through PortAudio"); |
2000 "Octave"); | |
2001 #else | 1991 #else |
2002 retval = get_recorder (args(0))->get_total_samples (); | 1992 retval = get_recorder (args(0))->get_total_samples (); |
2003 #endif | 1993 #endif |
2004 return retval; | 1994 return retval; |
2005 } | 1995 } |
2011 @end deftypefn") | 2001 @end deftypefn") |
2012 { | 2002 { |
2013 octave_value retval; | 2003 octave_value retval; |
2014 #ifndef HAVE_PORTAUDIO | 2004 #ifndef HAVE_PORTAUDIO |
2015 err_disabled_feature ("__recorder_get_userdata__", | 2005 err_disabled_feature ("__recorder_get_userdata__", |
2016 "audio playback and recording through PortAudio", | 2006 "audio playback and recording through PortAudio"); |
2017 "Octave"); | |
2018 #else | 2007 #else |
2019 retval = get_recorder (args(0))->get_userdata (); | 2008 retval = get_recorder (args(0))->get_userdata (); |
2020 #endif | 2009 #endif |
2021 return retval; | 2010 return retval; |
2022 } | 2011 } |
2028 @end deftypefn") | 2017 @end deftypefn") |
2029 { | 2018 { |
2030 octave_value retval; | 2019 octave_value retval; |
2031 #ifndef HAVE_PORTAUDIO | 2020 #ifndef HAVE_PORTAUDIO |
2032 err_disabled_feature ("__recorder_isrecording__", | 2021 err_disabled_feature ("__recorder_isrecording__", |
2033 "audio playback and recording through PortAudio", | 2022 "audio playback and recording through PortAudio"); |
2034 "Octave"); | |
2035 #else | 2023 #else |
2036 retval = get_recorder (args(0))->isrecording (); | 2024 retval = get_recorder (args(0))->isrecording (); |
2037 #endif | 2025 #endif |
2038 return retval; | 2026 return retval; |
2039 } | 2027 } |
2044 Undocumented internal function.\n\ | 2032 Undocumented internal function.\n\ |
2045 @end deftypefn") | 2033 @end deftypefn") |
2046 { | 2034 { |
2047 #ifndef HAVE_PORTAUDIO | 2035 #ifndef HAVE_PORTAUDIO |
2048 err_disabled_feature ("__recorder_pause__", | 2036 err_disabled_feature ("__recorder_pause__", |
2049 "audio playback and recording through PortAudio", | 2037 "audio playback and recording through PortAudio"); |
2050 "Octave"); | |
2051 #else | 2038 #else |
2052 get_recorder (args(0))->pause (); | 2039 get_recorder (args(0))->pause (); |
2053 #endif | 2040 #endif |
2054 return octave_value (); | 2041 return octave_value (); |
2055 } | 2042 } |
2060 Undocumented internal function.\n\ | 2047 Undocumented internal function.\n\ |
2061 @end deftypefn") | 2048 @end deftypefn") |
2062 { | 2049 { |
2063 #ifndef HAVE_PORTAUDIO | 2050 #ifndef HAVE_PORTAUDIO |
2064 err_disabled_feature ("__recorder_recordblocking__", | 2051 err_disabled_feature ("__recorder_recordblocking__", |
2065 "audio playback and recording through PortAudio", | 2052 "audio playback and recording through PortAudio"); |
2066 "Octave"); | |
2067 #else | 2053 #else |
2068 float seconds = args(1).float_value (); | 2054 float seconds = args(1).float_value (); |
2069 get_recorder (args(0))->recordblocking (seconds); | 2055 get_recorder (args(0))->recordblocking (seconds); |
2070 #endif | 2056 #endif |
2071 return octave_value (); | 2057 return octave_value (); |
2078 Undocumented internal function.\n\ | 2064 Undocumented internal function.\n\ |
2079 @end deftypefn") | 2065 @end deftypefn") |
2080 { | 2066 { |
2081 #ifndef HAVE_PORTAUDIO | 2067 #ifndef HAVE_PORTAUDIO |
2082 err_disabled_feature ("__recorder_record__", | 2068 err_disabled_feature ("__recorder_record__", |
2083 "audio playback and recording through PortAudio", | 2069 "audio playback and recording through PortAudio"); |
2084 "Octave"); | |
2085 #else | 2070 #else |
2086 audiorecorder *recorder = get_recorder (args(0)); | 2071 audiorecorder *recorder = get_recorder (args(0)); |
2087 | 2072 |
2088 if (args.length () == 2) | 2073 if (args.length () == 2) |
2089 recorder->set_end_sample (args(1).int_value () * recorder->get_fs ()); | 2074 recorder->set_end_sample (args(1).int_value () * recorder->get_fs ()); |
2099 Undocumented internal function.\n\ | 2084 Undocumented internal function.\n\ |
2100 @end deftypefn") | 2085 @end deftypefn") |
2101 { | 2086 { |
2102 #ifndef HAVE_PORTAUDIO | 2087 #ifndef HAVE_PORTAUDIO |
2103 err_disabled_feature ("__recorder_resume__", | 2088 err_disabled_feature ("__recorder_resume__", |
2104 "audio playback and recording through PortAudio", | 2089 "audio playback and recording through PortAudio"); |
2105 "Octave"); | |
2106 #else | 2090 #else |
2107 if (args.length () == 1) | 2091 if (args.length () == 1) |
2108 get_recorder (args(0))->resume (); | 2092 get_recorder (args(0))->resume (); |
2109 #endif | 2093 #endif |
2110 return octave_value (); | 2094 return octave_value (); |
2116 Undocumented internal function.\n\ | 2100 Undocumented internal function.\n\ |
2117 @end deftypefn") | 2101 @end deftypefn") |
2118 { | 2102 { |
2119 #ifndef HAVE_PORTAUDIO | 2103 #ifndef HAVE_PORTAUDIO |
2120 err_disabled_feature ("__recorder_set_fs__", | 2104 err_disabled_feature ("__recorder_set_fs__", |
2121 "audio playback and recording through PortAudio", | 2105 "audio playback and recording through PortAudio"); |
2122 "Octave"); | |
2123 #else | 2106 #else |
2124 if (args.length () == 2) | 2107 if (args.length () == 2) |
2125 get_recorder (args(0))->set_fs (args(1).int_value ()); | 2108 get_recorder (args(0))->set_fs (args(1).int_value ()); |
2126 #endif | 2109 #endif |
2127 return octave_value (); | 2110 return octave_value (); |
2133 Undocumented internal function.\n\ | 2116 Undocumented internal function.\n\ |
2134 @end deftypefn") | 2117 @end deftypefn") |
2135 { | 2118 { |
2136 #ifndef HAVE_PORTAUDIO | 2119 #ifndef HAVE_PORTAUDIO |
2137 err_disabled_feature ("__recorder_set_tag__", | 2120 err_disabled_feature ("__recorder_set_tag__", |
2138 "audio playback and recording through PortAudio", | 2121 "audio playback and recording through PortAudio"); |
2139 "Octave"); | |
2140 #else | 2122 #else |
2141 if (args.length () == 2) | 2123 if (args.length () == 2) |
2142 get_recorder (args(0))->set_tag (args(1).char_matrix_value ()); | 2124 get_recorder (args(0))->set_tag (args(1).char_matrix_value ()); |
2143 #endif | 2125 #endif |
2144 return octave_value (); | 2126 return octave_value (); |
2150 Undocumented internal function.\n\ | 2132 Undocumented internal function.\n\ |
2151 @end deftypefn") | 2133 @end deftypefn") |
2152 { | 2134 { |
2153 #ifndef HAVE_PORTAUDIO | 2135 #ifndef HAVE_PORTAUDIO |
2154 err_disabled_feature ("__recorder_set_userdata__", | 2136 err_disabled_feature ("__recorder_set_userdata__", |
2155 "audio playback and recording through PortAudio", | 2137 "audio playback and recording through PortAudio"); |
2156 "Octave"); | |
2157 #else | 2138 #else |
2158 if (args.length () == 2) | 2139 if (args.length () == 2) |
2159 get_recorder (args(0))->set_userdata (args(1)); | 2140 get_recorder (args(0))->set_userdata (args(1)); |
2160 #endif | 2141 #endif |
2161 return octave_value (); | 2142 return octave_value (); |
2167 Undocumented internal function.\n\ | 2148 Undocumented internal function.\n\ |
2168 @end deftypefn") | 2149 @end deftypefn") |
2169 { | 2150 { |
2170 #ifndef HAVE_PORTAUDIO | 2151 #ifndef HAVE_PORTAUDIO |
2171 err_disabled_feature ("__recorder_stop__", | 2152 err_disabled_feature ("__recorder_stop__", |
2172 "audio playback and recording through PortAudio", | 2153 "audio playback and recording through PortAudio"); |
2173 "Octave"); | |
2174 #else | 2154 #else |
2175 if (args.length () == 1) | 2155 if (args.length () == 1) |
2176 get_recorder (args(0))->stop (); | 2156 get_recorder (args(0))->stop (); |
2177 #endif | 2157 #endif |
2178 return octave_value (); | 2158 return octave_value (); |
2187 @end deftypefn") | 2167 @end deftypefn") |
2188 { | 2168 { |
2189 octave_value retval; | 2169 octave_value retval; |
2190 #ifndef HAVE_PORTAUDIO | 2170 #ifndef HAVE_PORTAUDIO |
2191 err_disabled_feature ("__player_audioplayer__", | 2171 err_disabled_feature ("__player_audioplayer__", |
2192 "audio playback and recording through PortAudio", | 2172 "audio playback and recording through PortAudio"); |
2193 "Octave"); | |
2194 #else | 2173 #else |
2195 | 2174 |
2196 int nargin = args.length (); | 2175 int nargin = args.length (); |
2197 | 2176 |
2198 audioplayer* recorder = new audioplayer (); | 2177 audioplayer* recorder = new audioplayer (); |
2256 @end deftypefn") | 2235 @end deftypefn") |
2257 { | 2236 { |
2258 octave_value retval; | 2237 octave_value retval; |
2259 #ifndef HAVE_PORTAUDIO | 2238 #ifndef HAVE_PORTAUDIO |
2260 err_disabled_feature ("__player_get_channels__", | 2239 err_disabled_feature ("__player_get_channels__", |
2261 "audio playback and recording through PortAudio", | 2240 "audio playback and recording through PortAudio"); |
2262 "Octave"); | |
2263 #else | 2241 #else |
2264 if (args.length () == 1) | 2242 if (args.length () == 1) |
2265 retval = get_player (args(0))->get_channels (); | 2243 retval = get_player (args(0))->get_channels (); |
2266 #endif | 2244 #endif |
2267 return retval; | 2245 return retval; |
2274 @end deftypefn") | 2252 @end deftypefn") |
2275 { | 2253 { |
2276 octave_value retval; | 2254 octave_value retval; |
2277 #ifndef HAVE_PORTAUDIO | 2255 #ifndef HAVE_PORTAUDIO |
2278 err_disabled_feature ("__player_get_fs__", | 2256 err_disabled_feature ("__player_get_fs__", |
2279 "audio playback and recording through PortAudio", | 2257 "audio playback and recording through PortAudio"); |
2280 "Octave"); | |
2281 #else | 2258 #else |
2282 if (args.length () == 1) | 2259 if (args.length () == 1) |
2283 retval = get_player (args(0))->get_fs (); | 2260 retval = get_player (args(0))->get_fs (); |
2284 #endif | 2261 #endif |
2285 return retval; | 2262 return retval; |
2292 @end deftypefn") | 2269 @end deftypefn") |
2293 { | 2270 { |
2294 octave_value retval; | 2271 octave_value retval; |
2295 #ifndef HAVE_PORTAUDIO | 2272 #ifndef HAVE_PORTAUDIO |
2296 err_disabled_feature ("__player_get_id__", | 2273 err_disabled_feature ("__player_get_id__", |
2297 "audio playback and recording through PortAudio", | 2274 "audio playback and recording through PortAudio"); |
2298 "Octave"); | |
2299 #else | 2275 #else |
2300 if (args.length () == 1) | 2276 if (args.length () == 1) |
2301 retval = get_player (args(0))->get_id (); | 2277 retval = get_player (args(0))->get_id (); |
2302 #endif | 2278 #endif |
2303 return retval; | 2279 return retval; |
2310 @end deftypefn") | 2286 @end deftypefn") |
2311 { | 2287 { |
2312 octave_value retval; | 2288 octave_value retval; |
2313 #ifndef HAVE_PORTAUDIO | 2289 #ifndef HAVE_PORTAUDIO |
2314 err_disabled_feature ("__player_get_nbits__", | 2290 err_disabled_feature ("__player_get_nbits__", |
2315 "audio playback and recording through PortAudio", | 2291 "audio playback and recording through PortAudio"); |
2316 "Octave"); | |
2317 #else | 2292 #else |
2318 if (args.length () == 1) | 2293 if (args.length () == 1) |
2319 retval = get_player (args(0))->get_nbits (); | 2294 retval = get_player (args(0))->get_nbits (); |
2320 #endif | 2295 #endif |
2321 return retval; | 2296 return retval; |
2328 @end deftypefn") | 2303 @end deftypefn") |
2329 { | 2304 { |
2330 octave_value retval; | 2305 octave_value retval; |
2331 #ifndef HAVE_PORTAUDIO | 2306 #ifndef HAVE_PORTAUDIO |
2332 err_disabled_feature ("__player_get_sample_number__", | 2307 err_disabled_feature ("__player_get_sample_number__", |
2333 "audio playback and recording through PortAudio", | 2308 "audio playback and recording through PortAudio"); |
2334 "Octave"); | |
2335 #else | 2309 #else |
2336 if (args.length () == 1) | 2310 if (args.length () == 1) |
2337 retval = get_player (args(0))->get_sample_number (); | 2311 retval = get_player (args(0))->get_sample_number (); |
2338 #endif | 2312 #endif |
2339 return retval; | 2313 return retval; |
2346 @end deftypefn") | 2320 @end deftypefn") |
2347 { | 2321 { |
2348 octave_value retval; | 2322 octave_value retval; |
2349 #ifndef HAVE_PORTAUDIO | 2323 #ifndef HAVE_PORTAUDIO |
2350 err_disabled_feature ("__player_get_tag__", | 2324 err_disabled_feature ("__player_get_tag__", |
2351 "audio playback and recording through PortAudio", | 2325 "audio playback and recording through PortAudio"); |
2352 "Octave"); | |
2353 #else | 2326 #else |
2354 if (args.length () == 1) | 2327 if (args.length () == 1) |
2355 retval = get_player (args(0))->get_tag (); | 2328 retval = get_player (args(0))->get_tag (); |
2356 #endif | 2329 #endif |
2357 return retval; | 2330 return retval; |
2364 @end deftypefn") | 2337 @end deftypefn") |
2365 { | 2338 { |
2366 octave_value retval; | 2339 octave_value retval; |
2367 #ifndef HAVE_PORTAUDIO | 2340 #ifndef HAVE_PORTAUDIO |
2368 err_disabled_feature ("__player_get_total_samples__", | 2341 err_disabled_feature ("__player_get_total_samples__", |
2369 "audio playback and recording through PortAudio", | 2342 "audio playback and recording through PortAudio"); |
2370 "Octave"); | |
2371 #else | 2343 #else |
2372 if (args.length () == 1) | 2344 if (args.length () == 1) |
2373 retval = get_player (args(0))->get_total_samples (); | 2345 retval = get_player (args(0))->get_total_samples (); |
2374 #endif | 2346 #endif |
2375 return retval; | 2347 return retval; |
2382 @end deftypefn") | 2354 @end deftypefn") |
2383 { | 2355 { |
2384 octave_value retval; | 2356 octave_value retval; |
2385 #ifndef HAVE_PORTAUDIO | 2357 #ifndef HAVE_PORTAUDIO |
2386 err_disabled_feature ("__player_get_userdata__", | 2358 err_disabled_feature ("__player_get_userdata__", |
2387 "audio playback and recording through PortAudio", | 2359 "audio playback and recording through PortAudio"); |
2388 "Octave"); | |
2389 #else | 2360 #else |
2390 if (args.length () == 1) | 2361 if (args.length () == 1) |
2391 retval = get_player (args(0))->get_userdata (); | 2362 retval = get_player (args(0))->get_userdata (); |
2392 #endif | 2363 #endif |
2393 return retval; | 2364 return retval; |
2400 @end deftypefn") | 2371 @end deftypefn") |
2401 { | 2372 { |
2402 octave_value retval; | 2373 octave_value retval; |
2403 #ifndef HAVE_PORTAUDIO | 2374 #ifndef HAVE_PORTAUDIO |
2404 err_disabled_feature ("__player_isplaying__", | 2375 err_disabled_feature ("__player_isplaying__", |
2405 "audio playback and recording through PortAudio", | 2376 "audio playback and recording through PortAudio"); |
2406 "Octave"); | |
2407 #else | 2377 #else |
2408 if (args.length () == 1) | 2378 if (args.length () == 1) |
2409 retval = get_player (args(0))->isplaying (); | 2379 retval = get_player (args(0))->isplaying (); |
2410 #endif | 2380 #endif |
2411 return retval; | 2381 return retval; |
2417 Undocumented internal function.\n\ | 2387 Undocumented internal function.\n\ |
2418 @end deftypefn") | 2388 @end deftypefn") |
2419 { | 2389 { |
2420 #ifndef HAVE_PORTAUDIO | 2390 #ifndef HAVE_PORTAUDIO |
2421 err_disabled_feature ("__player_pause__", | 2391 err_disabled_feature ("__player_pause__", |
2422 "audio playback and recording through PortAudio", | 2392 "audio playback and recording through PortAudio"); |
2423 "Octave"); | |
2424 #else | 2393 #else |
2425 if (args.length () == 1) | 2394 if (args.length () == 1) |
2426 get_player (args(0))->pause (); | 2395 get_player (args(0))->pause (); |
2427 #endif | 2396 #endif |
2428 return octave_value (); | 2397 return octave_value (); |
2436 Undocumented internal function.\n\ | 2405 Undocumented internal function.\n\ |
2437 @end deftypefn") | 2406 @end deftypefn") |
2438 { | 2407 { |
2439 #ifndef HAVE_PORTAUDIO | 2408 #ifndef HAVE_PORTAUDIO |
2440 err_disabled_feature ("__player_playblocking__", | 2409 err_disabled_feature ("__player_playblocking__", |
2441 "audio playback and recording through PortAudio", | 2410 "audio playback and recording through PortAudio"); |
2442 "Octave"); | |
2443 #else | 2411 #else |
2444 | 2412 |
2445 audioplayer *player = get_player (args(0)); | 2413 audioplayer *player = get_player (args(0)); |
2446 | 2414 |
2447 if (args.length () == 1) | 2415 if (args.length () == 1) |
2490 Undocumented internal function.\n\ | 2458 Undocumented internal function.\n\ |
2491 @end deftypefn") | 2459 @end deftypefn") |
2492 { | 2460 { |
2493 #ifndef HAVE_PORTAUDIO | 2461 #ifndef HAVE_PORTAUDIO |
2494 err_disabled_feature ("__player_play__", | 2462 err_disabled_feature ("__player_play__", |
2495 "audio playback and recording through PortAudio", | 2463 "audio playback and recording through PortAudio"); |
2496 "Octave"); | |
2497 #else | 2464 #else |
2498 | 2465 |
2499 if (args.length () == 1) | 2466 if (args.length () == 1) |
2500 { | 2467 { |
2501 get_player (args(0))->play (); | 2468 get_player (args(0))->play (); |
2542 Undocumented internal function.\n\ | 2509 Undocumented internal function.\n\ |
2543 @end deftypefn") | 2510 @end deftypefn") |
2544 { | 2511 { |
2545 #ifndef HAVE_PORTAUDIO | 2512 #ifndef HAVE_PORTAUDIO |
2546 err_disabled_feature ("__player_resume__", | 2513 err_disabled_feature ("__player_resume__", |
2547 "audio playback and recording through PortAudio", | 2514 "audio playback and recording through PortAudio"); |
2548 "Octave"); | |
2549 #else | 2515 #else |
2550 if (args.length () == 1) | 2516 if (args.length () == 1) |
2551 get_player (args(0))->resume (); | 2517 get_player (args(0))->resume (); |
2552 #endif | 2518 #endif |
2553 return octave_value (); | 2519 return octave_value (); |
2559 Undocumented internal function.\n\ | 2525 Undocumented internal function.\n\ |
2560 @end deftypefn") | 2526 @end deftypefn") |
2561 { | 2527 { |
2562 #ifndef HAVE_PORTAUDIO | 2528 #ifndef HAVE_PORTAUDIO |
2563 err_disabled_feature ("__player_set_fs__", | 2529 err_disabled_feature ("__player_set_fs__", |
2564 "audio playback and recording through PortAudio", | 2530 "audio playback and recording through PortAudio"); |
2565 "Octave"); | |
2566 #else | 2531 #else |
2567 if (args.length () == 2) | 2532 if (args.length () == 2) |
2568 get_player (args(0))->set_fs (args(1).int_value ()); | 2533 get_player (args(0))->set_fs (args(1).int_value ()); |
2569 #endif | 2534 #endif |
2570 return octave_value (); | 2535 return octave_value (); |
2576 Undocumented internal function.\n\ | 2541 Undocumented internal function.\n\ |
2577 @end deftypefn") | 2542 @end deftypefn") |
2578 { | 2543 { |
2579 #ifndef HAVE_PORTAUDIO | 2544 #ifndef HAVE_PORTAUDIO |
2580 err_disabled_feature ("__player_set_tag__", | 2545 err_disabled_feature ("__player_set_tag__", |
2581 "audio playback and recording through PortAudio", | 2546 "audio playback and recording through PortAudio"); |
2582 "Octave"); | |
2583 #else | 2547 #else |
2584 if (args.length () == 2) | 2548 if (args.length () == 2) |
2585 get_player (args(0))->set_tag (args(1).char_matrix_value ()); | 2549 get_player (args(0))->set_tag (args(1).char_matrix_value ()); |
2586 #endif | 2550 #endif |
2587 return octave_value (); | 2551 return octave_value (); |
2593 Undocumented internal function.\n\ | 2557 Undocumented internal function.\n\ |
2594 @end deftypefn") | 2558 @end deftypefn") |
2595 { | 2559 { |
2596 #ifndef HAVE_PORTAUDIO | 2560 #ifndef HAVE_PORTAUDIO |
2597 err_disabled_feature ("__player_set_userdata__", | 2561 err_disabled_feature ("__player_set_userdata__", |
2598 "audio playback and recording through PortAudio", | 2562 "audio playback and recording through PortAudio"); |
2599 "Octave"); | |
2600 #else | 2563 #else |
2601 if (args.length () == 2) | 2564 if (args.length () == 2) |
2602 get_player (args(0))->set_userdata (args(1)); | 2565 get_player (args(0))->set_userdata (args(1)); |
2603 #endif | 2566 #endif |
2604 return octave_value (); | 2567 return octave_value (); |
2610 Undocumented internal function.\n\ | 2573 Undocumented internal function.\n\ |
2611 @end deftypefn") | 2574 @end deftypefn") |
2612 { | 2575 { |
2613 #ifndef HAVE_PORTAUDIO | 2576 #ifndef HAVE_PORTAUDIO |
2614 err_disabled_feature ("__player_stop__", | 2577 err_disabled_feature ("__player_stop__", |
2615 "audio playback and recording through PortAudio", | 2578 "audio playback and recording through PortAudio"); |
2616 "Octave"); | |
2617 #else | 2579 #else |
2618 if (args.length () == 1) | 2580 if (args.length () == 1) |
2619 get_player (args(0))->stop (); | 2581 get_player (args(0))->stop (); |
2620 #endif | 2582 #endif |
2621 return octave_value (); | 2583 return octave_value (); |