| 690 | } |
| 691 | |
| 692 | void FrameMapper::PrintMapping(std::ostream* out) |
| 693 | { |
| 694 | // Check if mappings are dirty (and need to be recalculated) |
| 695 | if (is_dirty) |
| 696 | // Recalculate mappings |
| 697 | Init(); |
| 698 | |
| 699 | // Loop through frame mappings |
| 700 | for (float map = 1; map <= frames.size(); map++) |
| 701 | { |
| 702 | MappedFrame frame = frames[map - 1]; |
| 703 | *out << "Target frame #: " << map |
| 704 | << " mapped to original frame #:\t(" |
| 705 | << frame.Odd.Frame << " odd, " |
| 706 | << frame.Even.Frame << " even)" << std::endl; |
| 707 | |
| 708 | *out << " - Audio samples mapped to frame " |
| 709 | << frame.Samples.frame_start << ":" |
| 710 | << frame.Samples.sample_start << " to frame " |
| 711 | << frame.Samples.frame_end << ":" |
| 712 | << frame.Samples.sample_end << endl; |
| 713 | } |
| 714 | |
| 715 | } |
| 716 | |
| 717 | // Determine if reader is open or closed |
| 718 | bool FrameMapper::IsOpen() { |