mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 18:16:35 +01:00
Add "seekable" SoundFile info (in prep for mp3 import)
This commit is contained in:
parent
227de8c1b0
commit
bef74c267e
3 changed files with 3 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ struct LIBARDOUR_API SoundFileInfo {
|
|||
int64_t length;
|
||||
std::string format_name;
|
||||
int64_t timecode;
|
||||
bool seekable; // non-seekable files must be converted/imported
|
||||
};
|
||||
|
||||
class LIBARDOUR_API AudioFileSource : public AudioSource, public FileSource {
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string&)
|
|||
|
||||
_info.samplerate = absd.mSampleRate;
|
||||
_info.channels = absd.mChannelsPerFrame;
|
||||
_info.seekable = true;
|
||||
|
||||
size = sizeof(_info.length);
|
||||
if (ExtAudioFileGetProperty(af, kExtAudioFileProperty_FileLengthFrames, &size, &_info.length) != noErr) {
|
||||
|
|
|
|||
|
|
@ -1117,6 +1117,7 @@ SndFileSource::get_soundfile_info (const string& path, SoundFileInfo& info, stri
|
|||
}
|
||||
|
||||
info.timecode = binfo.load_from_file (sf) ? binfo.get_time_reference() : 0;
|
||||
info.seekable = true;
|
||||
|
||||
sf_close (sf);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue