vfs: check userland buffers before reading them.
[haiku.git] / src / kits / media / legacy / OldAudioModule.cpp
blobb6ffdad17390f64f6afbc7fce693942c6668031b
1 /*
2 * Copyright 2002, Marcus Overhagen. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 // This is deprecated API that is not even implemented - no need to export
8 // it on a GCC4 build (BeIDE needs it to run, though, so it's worthwhile for
9 // GCC2)
10 #if __GNUC__ < 3
13 #include "OldAudioModule.h"
15 #include <debug.h>
18 /*************************************************************
19 * public BAudioEvent
20 *************************************************************/
22 BAudioEvent::BAudioEvent(int32 frames, bool stereo, float *samples)
24 UNIMPLEMENTED();
28 BAudioEvent::~BAudioEvent()
30 UNIMPLEMENTED();
34 mk_time
35 BAudioEvent::Start()
37 UNIMPLEMENTED();
39 return 0;
43 void
44 BAudioEvent::SetStart(mk_time)
46 UNIMPLEMENTED();
50 mk_time
51 BAudioEvent::Duration()
53 UNIMPLEMENTED();
55 return 0;
59 int32
60 BAudioEvent::Frames()
62 UNIMPLEMENTED();
64 return 0;
68 float *
69 BAudioEvent::Samples()
71 UNIMPLEMENTED();
72 return NULL;
76 int32
77 BAudioEvent::ChannelCount()
79 UNIMPLEMENTED();
81 return 0;
85 float
86 BAudioEvent::Gain()
88 UNIMPLEMENTED();
90 return 0.0f;
94 void
95 BAudioEvent::SetGain(float)
97 UNIMPLEMENTED();
101 int32
102 BAudioEvent::Destination()
104 UNIMPLEMENTED();
106 return 0;
110 void
111 BAudioEvent::SetDestination(int32)
113 UNIMPLEMENTED();
117 bool
118 BAudioEvent::MixIn(float *dst, int32 frames, mk_time time)
120 UNIMPLEMENTED();
122 return false;
126 BMediaEvent *
127 BAudioEvent::Clone()
129 UNIMPLEMENTED();
130 return NULL;
134 bigtime_t
135 BAudioEvent::CaptureTime()
137 UNIMPLEMENTED();
139 return 0;
143 void
144 BAudioEvent::SetCaptureTime(bigtime_t)
146 UNIMPLEMENTED();
150 /*************************************************************
151 * public BDACRenderer
152 *************************************************************/
154 BDACRenderer::BDACRenderer(const char *name)
156 UNIMPLEMENTED();
160 BDACRenderer::~BDACRenderer()
162 UNIMPLEMENTED();
166 mk_rate
167 BDACRenderer::Units()
169 UNIMPLEMENTED();
171 return 0;
175 mk_time
176 BDACRenderer::Latency()
178 UNIMPLEMENTED();
180 return 0;
184 mk_time
185 BDACRenderer::Start()
187 UNIMPLEMENTED();
189 return 0;
193 mk_time
194 BDACRenderer::Duration()
196 UNIMPLEMENTED();
198 return 0;
202 BTimeBase *
203 BDACRenderer::TimeBase()
205 UNIMPLEMENTED();
206 return NULL;
210 void
211 BDACRenderer::Open()
213 UNIMPLEMENTED();
217 void
218 BDACRenderer::Close()
220 UNIMPLEMENTED();
224 void
225 BDACRenderer::Wakeup()
227 UNIMPLEMENTED();
231 void
232 BDACRenderer::TransportChanged(mk_time time, mk_rate rate,
233 transport_status status)
235 UNIMPLEMENTED();
239 void
240 BDACRenderer::StreamChanged()
242 UNIMPLEMENTED();
246 BMediaChannel *
247 BDACRenderer::Channel()
249 UNIMPLEMENTED();
250 return NULL;
253 /*************************************************************
254 * private BDACRenderer
255 *************************************************************/
258 bool
259 BDACRenderer::_WriteDAC(void *arg, char *buf, uint32 bytes, void *header)
261 UNIMPLEMENTED();
263 return false;
267 bool
268 BDACRenderer::WriteDAC(short *buf, int32 frames, audio_buffer_header *header)
270 UNIMPLEMENTED();
272 return false;
276 bool
277 BDACRenderer::MixActiveSegments(mk_time start)
279 UNIMPLEMENTED();
281 return false;
285 void
286 BDACRenderer::MixOutput(short *dst)
288 UNIMPLEMENTED();
292 /*************************************************************
293 * public BAudioFileStream
294 *************************************************************/
296 BAudioFileStream::BAudioFileStream(BMediaChannel *channel, BFile *file,
297 mk_time start)
299 UNIMPLEMENTED();
303 BAudioFileStream::~BAudioFileStream()
305 UNIMPLEMENTED();
309 BMediaEvent *
310 BAudioFileStream::GetEvent(BMediaChannel *channel)
312 UNIMPLEMENTED();
313 return NULL;
317 BMediaEvent *
318 BAudioFileStream::PeekEvent(BMediaChannel *channel, mk_time asap)
320 UNIMPLEMENTED();
321 return NULL;
325 status_t
326 BAudioFileStream::SeekToTime(BMediaChannel *channel, mk_time time)
328 UNIMPLEMENTED();
330 return B_ERROR;
334 void
335 BAudioFileStream::SetStart(mk_time start)
337 UNIMPLEMENTED();
341 bigtime_t
342 BAudioFileStream::CaptureTime()
344 UNIMPLEMENTED();
346 return 0;
350 BMediaChannel *
351 BAudioFileStream::Channel()
353 UNIMPLEMENTED();
354 return NULL;
357 /*************************************************************
358 * public BADCSource
359 *************************************************************/
361 BADCSource::BADCSource(BMediaChannel *channel, mk_time start)
363 fEventLock("BADCSource lock")
365 UNIMPLEMENTED();
369 BADCSource::~BADCSource()
371 UNIMPLEMENTED();
375 BMediaEvent *
376 BADCSource::GetEvent(BMediaChannel *channel)
378 UNIMPLEMENTED();
379 return NULL;
383 BMediaEvent *
384 BADCSource::PeekEvent(BMediaChannel *channel, mk_time asap)
386 UNIMPLEMENTED();
387 return NULL;
391 status_t
392 BADCSource::SeekToTime(BMediaChannel *channel, mk_time time)
394 UNIMPLEMENTED();
396 return B_ERROR;
400 void
401 BADCSource::SetStart(mk_time start)
403 UNIMPLEMENTED();
407 BMediaChannel *
408 BADCSource::Channel()
410 UNIMPLEMENTED();
411 return NULL;
414 /*************************************************************
415 * private BADCSource
416 *************************************************************/
418 bool
419 BADCSource::_ReadADC(void *arg, char *buf, uint32 bytes, void *header)
421 UNIMPLEMENTED();
423 return false;
427 void
428 BADCSource::ReadADC(short *buf, int32 frames, audio_buffer_header *header)
430 UNIMPLEMENTED();
434 #endif // __GNUC__ < 3