diff options
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"); +} |
