~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/output/audioData.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  describes a paket oriented audioData, because Im fed up
 
3
  Copyright (C) 1999  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
 
 
16
#include "audioData.h"
 
17
 
 
18
 
 
19
 
 
20
AudioData::AudioData() {
 
21
  pcmLen=0;
 
22
  audioTime=new AudioTime();
 
23
  start=new TimeStamp();
 
24
  end=new TimeStamp();
 
25
  writeStamp=new TimeStamp();
 
26
}
 
27
 
 
28
 
 
29
AudioData::~AudioData() {
 
30
  delete audioTime;
 
31
  delete start;
 
32
  delete end;
 
33
  delete writeStamp;
 
34
}
 
35
 
 
36
 
 
37
void AudioData::copyTo(AudioData* dest) {
 
38
  dest->setAudioTime(getAudioTime());
 
39
  dest->setStart(getStart());
 
40
  dest->setEnd(getEnd());
 
41
  dest->setWrite(getWrite());
 
42
  dest->setPCMLen(getPCMLen());
 
43
}
 
44
 
 
45
 
 
46
int AudioData::getPCMLen(){
 
47
  return pcmLen;
 
48
}
 
49
 
 
50
void AudioData::setPCMLen(int pcmLen) {
 
51
  this->pcmLen=pcmLen;
 
52
}
 
53
 
 
54
void AudioData::setAudioTime(AudioTime* aTime) {
 
55
  aTime->copyTo(audioTime);
 
56
}
 
57
 
 
58
AudioTime* AudioData::getAudioTime() {
 
59
  return audioTime;
 
60
}
 
61
 
 
62
 
 
63
void AudioData::setStart(TimeStamp* s) {
 
64
  s->copyTo(start);
 
65
}
 
66
 
 
67
 
 
68
TimeStamp* AudioData::getStart() {
 
69
  return start;
 
70
}
 
71
 
 
72
void AudioData::setEnd(TimeStamp* e) {
 
73
  e->copyTo(end);
 
74
}
 
75
 
 
76
  
 
77
TimeStamp* AudioData::getEnd() {
 
78
  return end;
 
79
}
 
80
 
 
81
void AudioData::setWrite(TimeStamp* e) {
 
82
  e->copyTo(writeStamp);
 
83
}
 
84
 
 
85
 
 
86
TimeStamp* AudioData::getWrite() {
 
87
  return writeStamp;
 
88
}
 
89
 
 
90
 
 
91
 
 
92
void AudioData::print() {
 
93
  cout << "AudioData::print [START]"<<endl;
 
94
  start->print("audioData start");
 
95
  end->print("audioData end");
 
96
  cout << "pcmlen:"<<pcmLen<<endl;
 
97
  cout << "AudioData::print [END]"<<endl;
 
98
}