Changeset 98
- Timestamp:
- 05/16/05 03:31:33 (19 years ago)
- Files:
-
- trunk/freebob/tests/stream_format.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freebob/tests/stream_format.cpp
r91 r98 590 590 virtual bool deserialize( IISDeserialize& de ); 591 591 virtual FormatInformationStreamsSync* clone() const; 592 593 594 reserved_t m_reserved0; 595 sampling_frequency_t m_samplingFrequency; 596 rate_control_t m_rateControl; 597 reserved_t m_reserved1; 592 598 }; 593 599 594 600 FormatInformationStreamsSync::FormatInformationStreamsSync() 595 601 : FormatInformationStreams() 602 , m_reserved0( 0xff ) 603 , m_samplingFrequency( eSF_DontCare ) 604 , m_rateControl( eRC_DontCare ) 605 , m_reserved1( 0xff ) 596 606 { 597 607 } … … 600 610 FormatInformationStreamsSync::serialize( IOSSerialize& se ) 601 611 { 612 se.write( m_reserved0, "FormatInformationStreamsSync reserved" ); 613 614 // we have to clobber some bits 615 byte_t operand = ( m_samplingFrequency << 4 ) | 0x0e; 616 if ( m_rateControl == eRC_DontCare) { 617 operand |= 0x1; 618 } 619 se.write( operand, "FormatInformationStreamsSync sampling frequency and rate control" ); 620 621 se.write( m_reserved1, "FormatInformationStreamsSync reserved" ); 602 622 return true; 603 623 } … … 606 626 FormatInformationStreamsSync::deserialize( IISDeserialize& de ) 607 627 { 628 de.read( &m_reserved0 ); 629 630 byte_t operand; 631 de.read( &operand ); 632 m_samplingFrequency = operand >> 4; 633 m_rateControl = operand & 0x01; 634 635 de.read( &m_reserved1 ); 608 636 return true; 609 637 }