diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-03-31 15:24:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-03-31 15:24:38 +0100 |
| commit | 5920000d247ab3ef7fb9ba29c6ba238b323cf909 (patch) | |
| tree | b4ca56096992df06dc2daad9e859165542f9443d /src/lib/sndfile_content.cc | |
| parent | 127672223cca569986e35c91265e269ed5a6561c (diff) | |
Allow adding of content.
Diffstat (limited to 'src/lib/sndfile_content.cc')
| -rw-r--r-- | src/lib/sndfile_content.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index 8f5b28901..53df4deea 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -5,6 +5,13 @@ using namespace std; +SndfileContent::SndfileContent (boost::filesystem::path f) + : Content (f) + , AudioContent (f) +{ + +} + string SndfileContent::summary () const { @@ -39,3 +46,12 @@ SndfileContent::audio_channel_layout () const return 0; } + +bool +SndfileContent::valid_file (boost::filesystem::path f) +{ + /* XXX: more extensions */ + string ext = f.extension().string(); + transform (ext.begin(), ext.end(), ext.begin(), ::tolower); + return (ext == ".wav" || ext == ".aif" || ext == ".aiff"); +} |
