diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-11 22:52:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-11 22:52:47 +0100 |
| commit | bc09fbc79580f56c93e35de25230af18b30e0e1e (patch) | |
| tree | 8e640910c78d04b4e234668c7d8c7f1feac60873 /src/dcp.cc | |
| parent | 2cd9086c95686117ffbce92188d50d525ed488bb (diff) | |
Access sound asset sampling rate, channels; access sound asset from DCP; fix bad cast to float.
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -418,3 +418,16 @@ DCP::picture_asset () const return shared_ptr<const PictureAsset> (); } + +shared_ptr<const SoundAsset> +DCP::sound_asset () const +{ + for (list<shared_ptr<Asset> >::const_iterator i = _assets.begin(); i != _assets.end(); ++i) { + shared_ptr<SoundAsset> s = dynamic_pointer_cast<SoundAsset> (*i); + if (s) { + return s; + } + } + + return shared_ptr<const SoundAsset> (); +} |
