mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 06:19:02 +02:00
minor cleanup
This commit is contained in:
parent
7a5ec429d1
commit
1eba20bc3b
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ typedef double float64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Audio format structure (uncompressed streams only)
|
// Audio format structure (currently for uncompressed streams only)
|
||||||
//
|
//
|
||||||
|
|
||||||
struct AudioFormat {
|
struct AudioFormat {
|
||||||
|
@ -62,7 +62,7 @@ struct AudioFormat {
|
||||||
|
|
||||||
void setCanonicalFloat32(uint32_t channels) {
|
void setCanonicalFloat32(uint32_t channels) {
|
||||||
assert(channels > 0 && channels <= 2);
|
assert(channels > 0 && channels <= 2);
|
||||||
_sampleRate = SAMPLE_RATE;
|
_sampleRate = SAMPLE_RATE; // todo: create audio constants header
|
||||||
_bitsPerChannel = sizeof(float32_t) * 8;
|
_bitsPerChannel = sizeof(float32_t) * 8;
|
||||||
_channelsPerFrame = channels;
|
_channelsPerFrame = channels;
|
||||||
_bytesPerFrame = _channelsPerFrame * _bitsPerChannel / 8;
|
_bytesPerFrame = _channelsPerFrame * _bitsPerChannel / 8;
|
||||||
|
@ -72,7 +72,7 @@ struct AudioFormat {
|
||||||
|
|
||||||
void setCanonicalInt16(uint32_t channels) {
|
void setCanonicalInt16(uint32_t channels) {
|
||||||
assert(channels > 0 && channels <= 2);
|
assert(channels > 0 && channels <= 2);
|
||||||
_sampleRate = SAMPLE_RATE;
|
_sampleRate = SAMPLE_RATE; // todo: create audio constants header
|
||||||
_bitsPerChannel = sizeof(int16_t) * 8;
|
_bitsPerChannel = sizeof(int16_t) * 8;
|
||||||
_channelsPerFrame = channels;
|
_channelsPerFrame = channels;
|
||||||
_bytesPerFrame = _channelsPerFrame * _bitsPerChannel / 8;
|
_bytesPerFrame = _channelsPerFrame * _bitsPerChannel / 8;
|
||||||
|
|
Loading…
Reference in a new issue