Fix build with GCC.
This commit is contained in:
parent
b44b45cca0
commit
9713abc002
|
@ -138,10 +138,6 @@ void SoundedPreview::subscribeToUpdates(Fn<void()> callback) {
|
||||||
return std::clamp(float64(low) / high, 0., 1.);
|
return std::clamp(float64(low) / high, 0., 1.);
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] crl::time Duration(int samples) {
|
|
||||||
return samples * crl::time(1000) / ::Media::Player::kDefaultFrequency;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] auto FormatVoiceDuration(int samples) {
|
[[nodiscard]] auto FormatVoiceDuration(int samples) {
|
||||||
const int duration = kPrecision
|
const int duration = kPrecision
|
||||||
* (float64(samples) / ::Media::Player::kDefaultFrequency);
|
* (float64(samples) / ::Media::Player::kDefaultFrequency);
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct ReadBytesWrap {
|
||||||
}
|
}
|
||||||
return toRead;
|
return toRead;
|
||||||
};
|
};
|
||||||
static int64 Seek(void *opaque, int64_t offset, int whence) {
|
static int64_t Seek(void *opaque, int64_t offset, int whence) {
|
||||||
auto wrap = static_cast<ReadBytesWrap*>(opaque);
|
auto wrap = static_cast<ReadBytesWrap*>(opaque);
|
||||||
auto updated = int64(-1);
|
auto updated = int64(-1);
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
|
@ -253,9 +253,9 @@ int RoundVideoRecorder::Private::write(uint8_t *buf, int buf_size) {
|
||||||
int64_t RoundVideoRecorder::Private::seek(int64_t offset, int whence) {
|
int64_t RoundVideoRecorder::Private::seek(int64_t offset, int whence) {
|
||||||
const auto checkedSeek = [&](int64_t offset) {
|
const auto checkedSeek = [&](int64_t offset) {
|
||||||
if (offset < 0 || offset > int64(_result.size())) {
|
if (offset < 0 || offset > int64(_result.size())) {
|
||||||
return int64(-1);
|
return int64_t(-1);
|
||||||
}
|
}
|
||||||
return (_resultOffset = offset);
|
return int64_t(_resultOffset = offset);
|
||||||
};
|
};
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case SEEK_SET: return checkedSeek(offset);
|
case SEEK_SET: return checkedSeek(offset);
|
||||||
|
|
Loading…
Reference in New Issue