Go to the documentation of this file.
6 #ifndef CNOID_MEDIA_PLUGIN_AUDIO_ITEM_H
7 #define CNOID_MEDIA_PLUGIN_AUDIO_ITEM_H
12 #include "exportdecl.h"
29 return samplingData_->size() / numChannels_;
33 return numFrames() / samplingRate_;
40 void setOffsetTime(
double offset);
47 return offsetTime_ * samplingRate_;
51 return *samplingData_;
57 virtual Item* doDuplicate()
const;
59 virtual bool store(
Archive& archive);
60 virtual bool restore(
const Archive& archive);
63 std::shared_ptr< std::vector<float> > samplingData_;
68 std::string copyright;
74 bool loadAudioFile(
const std::string& filename, std::ostream& os,
Item* parentItem);
int numChannels()
Definition: AudioItem.h:24
int numFrames()
Definition: AudioItem.h:28
Definition: ExtensionManager.h:23
Definition: PutPropertyFunction.h:51
ref_ptr< AudioItem > AudioItemPtr
Definition: AudioItem.h:77
Definition: AudioItem.h:16
Definition: Referenced.h:103
double samplingRate()
Definition: AudioItem.h:36
int offsetFrame()
Definition: AudioItem.h:46
Definition: AbstractSceneLoader.h:11
double timeLength()
Definition: AudioItem.h:32
const std::vector< float > & samplingData()
Definition: AudioItem.h:50
double offsetTime()
Definition: AudioItem.h:42