diff --git a/src/xenia/apu/xma_context.h b/src/xenia/apu/xma_context.h index 86eca8c1c..96d059188 100644 --- a/src/xenia/apu/xma_context.h +++ b/src/xenia/apu/xma_context.h @@ -167,8 +167,10 @@ class XmaContext { private: static int GetSampleRate(int id); - size_t SavePartial(uint8_t* packet, uint32_t frame_offset_bits, size_t frame_size_bits, bool append); - bool ValidFrameOffset(uint8_t* block, size_t size_bytes, size_t frame_offset_bits); + size_t SavePartial(uint8_t* packet, uint32_t frame_offset_bits, + size_t frame_size_bits, bool append); + bool ValidFrameOffset(uint8_t* block, size_t size_bytes, + size_t frame_offset_bits); void DecodePackets(XMA_CONTEXT_DATA* data); uint32_t GetFramePacketNumber(uint8_t* block, size_t size, size_t bit_offset); int PrepareDecoder(uint8_t* block, size_t size, int sample_rate, @@ -205,12 +207,13 @@ class XmaContext { bool partial_frame_size_known_ = false; size_t partial_frame_total_size_bits_ = 0; size_t partial_frame_start_offset_bits_ = 0; - size_t partial_frame_offset_bits_ = 0; // blah internal don't use this + size_t partial_frame_offset_bits_ = 0; // blah internal don't use this std::vector partial_frame_buffer_; - // If we didn't finish writing a frame to the output buffer, this is the offset. + // If we didn't finish writing a frame to the output buffer, this is the + // offset. size_t current_frame_pos_ = 0; - uint32_t last_input_read_pos_ = 0; // Last seen read buffer pos + uint32_t last_input_read_pos_ = 0; // Last seen read buffer pos uint8_t* current_frame_ = nullptr; uint32_t frame_samples_size_ = 0; }; diff --git a/src/xenia/apu/xma_decoder.cc b/src/xenia/apu/xma_decoder.cc index 0c73236db..a33968ef9 100644 --- a/src/xenia/apu/xma_decoder.cc +++ b/src/xenia/apu/xma_decoder.cc @@ -137,8 +137,8 @@ void XmaDecoder::WorkerThreadMain() { // TODO: Need thread safety to do this. // Probably not too important though. - //registers_.current_context = n; - //registers_.next_context = (n + 1) % kContextCount; + // registers_.current_context = n; + // registers_.next_context = (n + 1) % kContextCount; } } } diff --git a/src/xenia/apu/xma_helpers.h b/src/xenia/apu/xma_helpers.h index 50a6d0678..c22c70c25 100644 --- a/src/xenia/apu/xma_helpers.h +++ b/src/xenia/apu/xma_helpers.h @@ -25,7 +25,8 @@ uint32_t GetPacketFrameCount(uint8_t* packet) { // Get the first frame offset in bits uint32_t GetPacketFrameOffset(uint8_t* packet) { - uint32_t val = (uint16_t)(((packet[0] & 0x3) << 13) | (packet[1] << 5) | (packet[2] >> 3)); + uint32_t val = (uint16_t)(((packet[0] & 0x3) << 13) | (packet[1] << 5) | + (packet[2] >> 3)); if (val == 0x7FFF) { return -1; } else { @@ -37,12 +38,10 @@ uint32_t GetPacketMetadata(uint8_t* packet) { return (uint8_t)(packet[2] & 0x7); } -uint32_t GetPacketSkipCount(uint8_t* packet) { - return (uint8_t)(packet[3]); -} +uint32_t GetPacketSkipCount(uint8_t* packet) { return (uint8_t)(packet[3]); } -} // namespace xma -} // namespace apu -} // namespace xe +} // namespace xma +} // namespace apu +} // namespace xe #endif // XENIA_APU_XMA_HELPERS_H_ diff --git a/src/xenia/base/bit_stream.h b/src/xenia/base/bit_stream.h index 64cc2704b..ad84379d4 100644 --- a/src/xenia/base/bit_stream.h +++ b/src/xenia/base/bit_stream.h @@ -30,7 +30,7 @@ class BitStream { // Note: num_bits MUST be in the range 0-57 (inclusive) uint64_t Peek(size_t num_bits); uint64_t Read(size_t num_bits); - bool Write(uint64_t val, size_t num_bits); // TODO: Not tested! + bool Write(uint64_t val, size_t num_bits); // TODO: Not tested! size_t Copy(uint8_t* dest_buffer, size_t num_bits);