blob: 53df4deeacda2ea12d7fa127d80d39c3ac61f4e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#include "sndfile_content.h"
#include "compose.hpp"
#include "i18n.h"
using namespace std;
SndfileContent::SndfileContent (boost::filesystem::path f)
: Content (f)
, AudioContent (f)
{
}
string
SndfileContent::summary () const
{
return String::compose (_("Sound file: %1"), file().filename ());
}
int
SndfileContent::audio_channels () const
{
/* XXX */
return 0;
}
ContentAudioFrame
SndfileContent::audio_length () const
{
/* XXX */
return 0;
}
int
SndfileContent::audio_frame_rate () const
{
/* XXX */
return 0;
}
int64_t
SndfileContent::audio_channel_layout () const
{
/* XXX */
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");
}
|