mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-07 22:52:53 -04:00
Added wav file viewer
Fileman open now allows going into subdirectories Updated binary
This commit is contained in:
parent
40a71d32a2
commit
6e7b2c751f
11 changed files with 397 additions and 11 deletions
|
@ -97,6 +97,10 @@ uint32_t WAVFileReader::ms_duration() {
|
|||
return ((data_size_ * 1000) / sample_rate_) / bytes_per_sample;
|
||||
}
|
||||
|
||||
void WAVFileReader::data_seek(const uint64_t Offset) {
|
||||
file.seek(data_start + (Offset * bytes_per_sample));
|
||||
}
|
||||
|
||||
/*int WAVFileReader::seek_mss(const uint16_t minutes, const uint8_t seconds, const uint32_t samples) {
|
||||
const auto result = file.seek(data_start + ((((minutes * 60) + seconds) * sample_rate_) + samples) * bytes_per_sample);
|
||||
|
||||
|
@ -118,6 +122,10 @@ uint32_t WAVFileReader::data_size() {
|
|||
return data_size_;
|
||||
}
|
||||
|
||||
uint32_t WAVFileReader::sample_count() {
|
||||
return data_size_ / bytes_per_sample;
|
||||
}
|
||||
|
||||
uint16_t WAVFileReader::bits_per_sample() {
|
||||
return header.fmt.wBitsPerSample;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue