Repository: chxuan/CZPlayer Branch: master Commit: 4b290c95f718 Files: 916 Total size: 7.0 MB Directory structure: gitextract_c_rmr097/ ├── 3rdParty/ │ ├── equalizer/ │ │ ├── eq.cpp │ │ ├── eq.h │ │ ├── iir.h │ │ ├── iir_cfs.cpp │ │ ├── iir_cfs.h │ │ ├── iir_fpu.cpp │ │ └── iir_fpu.h │ ├── libmad/ │ │ ├── include/ │ │ │ ├── bit.c │ │ │ ├── bit.h │ │ │ ├── config.h │ │ │ ├── decoder.c │ │ │ ├── decoder.h │ │ │ ├── fixed.c │ │ │ ├── fixed.h │ │ │ ├── frame.c │ │ │ ├── frame.h │ │ │ ├── global.h │ │ │ ├── huffman.c │ │ │ ├── huffman.h │ │ │ ├── layer12.c │ │ │ ├── layer12.h │ │ │ ├── layer3.c │ │ │ ├── layer3.h │ │ │ ├── mad.h │ │ │ ├── stream.c │ │ │ ├── stream.h │ │ │ ├── synth.c │ │ │ ├── synth.h │ │ │ ├── timer.c │ │ │ ├── timer.h │ │ │ ├── version.c │ │ │ └── version.h │ │ └── lib/ │ │ ├── libmad.lib │ │ └── libmadd.lib │ ├── libogg/ │ │ ├── include/ │ │ │ ├── ogg.h │ │ │ └── os_types.h │ │ └── lib/ │ │ ├── libogg.lib │ │ └── liboggd.lib │ ├── libvorbis/ │ │ ├── include/ │ │ │ ├── analysis.c │ │ │ ├── backends.h │ │ │ ├── bitrate.c │ │ │ ├── bitrate.h │ │ │ ├── block.c │ │ │ ├── codebook.c │ │ │ ├── codebook.h │ │ │ ├── codec.h │ │ │ ├── codec_internal.h │ │ │ ├── envelope.c │ │ │ ├── envelope.h │ │ │ ├── floor0.c │ │ │ ├── floor1.c │ │ │ ├── floor_all.h │ │ │ ├── highlevel.h │ │ │ ├── info.c │ │ │ ├── lookup.c │ │ │ ├── lookup.h │ │ │ ├── lookup_data.h │ │ │ ├── lpc.c │ │ │ ├── lpc.h │ │ │ ├── lsp.c │ │ │ ├── lsp.h │ │ │ ├── mapping0.c │ │ │ ├── masking.h │ │ │ ├── mdct.c │ │ │ ├── mdct.h │ │ │ ├── misc.h │ │ │ ├── os.h │ │ │ ├── psy.c │ │ │ ├── psy.h │ │ │ ├── psych_11.h │ │ │ ├── psych_16.h │ │ │ ├── psych_44.h │ │ │ ├── psych_8.h │ │ │ ├── psytune.c │ │ │ ├── registry.c │ │ │ ├── registry.h │ │ │ ├── res0.c │ │ │ ├── residue_16.h │ │ │ ├── residue_44.h │ │ │ ├── residue_44u.h │ │ │ ├── residue_8.h │ │ │ ├── scales.h │ │ │ ├── setup_11.h │ │ │ ├── setup_16.h │ │ │ ├── setup_22.h │ │ │ ├── setup_32.h │ │ │ ├── setup_44.h │ │ │ ├── setup_44u.h │ │ │ ├── setup_8.h │ │ │ ├── setup_X.h │ │ │ ├── sharedbook.c │ │ │ ├── smallft.c │ │ │ ├── smallft.h │ │ │ ├── synthesis.c │ │ │ ├── tone.c │ │ │ ├── vorbisenc.c │ │ │ ├── vorbisenc.h │ │ │ ├── vorbisfile.c │ │ │ ├── vorbisfile.h │ │ │ ├── window.c │ │ │ └── window.h │ │ └── lib/ │ │ ├── libvorbis.lib │ │ └── libvorbisd.lib │ ├── qdeviceWatcher/ │ │ ├── include/ │ │ │ ├── qdevicechangeevent.cpp │ │ │ ├── qdevicechangeevent.h │ │ │ ├── qdevicewatcher.cpp │ │ │ ├── qdevicewatcher.h │ │ │ ├── qdevicewatcher_global.h │ │ │ ├── qdevicewatcher_linux.cpp │ │ │ ├── qdevicewatcher_p.h │ │ │ ├── qdevicewatcher_win32.cpp │ │ │ └── qdevicewatcher_wince.cpp │ │ └── lib/ │ │ └── QDeviceWatcherd2.lib │ ├── qtsingleapplication/ │ │ ├── QtLockedFile │ │ ├── QtSingleApplication │ │ ├── qtlocalpeer.cpp │ │ ├── qtlocalpeer.h │ │ ├── qtlockedfile.cpp │ │ ├── qtlockedfile.h │ │ ├── qtlockedfile_unix.cpp │ │ ├── qtlockedfile_win.cpp │ │ ├── qtsingleapplication.cpp │ │ ├── qtsingleapplication.h │ │ ├── qtsingleapplication.pri │ │ ├── qtsinglecoreapplication.cpp │ │ ├── qtsinglecoreapplication.h │ │ └── qtsinglecoreapplication.pri │ └── qxtglobalshortcut/ │ ├── qxtglobal.h │ ├── qxtglobalshortcut.cpp │ ├── qxtglobalshortcut.h │ ├── qxtglobalshortcut.pri │ ├── qxtglobalshortcut_mac.cpp │ ├── qxtglobalshortcut_p.h │ ├── qxtglobalshortcut_win.cpp │ └── qxtglobalshortcut_x11.cpp ├── AboutPanel/ │ ├── AboutPage.cpp │ ├── AboutPage.h │ ├── AboutPanel.cpp │ ├── AboutPanel.h │ ├── AboutPanel.pri │ ├── AuthorPage.cpp │ ├── AuthorPage.h │ ├── ThanksPage.cpp │ └── ThanksPage.h ├── CZPlayer.pro ├── ConfigPanel/ │ ├── ConfigDialog.cpp │ ├── ConfigDialog.h │ ├── ConfigPanel.pri │ ├── DownloadSettingsPage.cpp │ ├── DownloadSettingsPage.h │ ├── EditHotkeyDialog.cpp │ ├── EditHotkeyDialog.h │ ├── GeneralSettingsPage.cpp │ ├── GeneralSettingsPage.h │ ├── Global.cpp │ ├── Global.h │ ├── GlobalConfig.cpp │ ├── GlobalConfig.h │ ├── HotkeysSettingsPage.cpp │ ├── HotkeysSettingsPage.h │ ├── HotkeysTableWidget.cpp │ ├── HotkeysTableWidget.h │ ├── LrcDemo.cpp │ ├── LrcDemo.h │ ├── LrcSettingsPage.cpp │ ├── LrcSettingsPage.h │ ├── UpdatePage.cpp │ └── UpdatePage.h ├── Copyright ├── Core/ │ ├── AutoStart.cpp │ ├── AutoStart.h │ ├── AutoStartHandle.cpp │ ├── AutoStartHandle.h │ ├── ChineseToLetter.h │ ├── Core.pri │ ├── FileRelation.cpp │ ├── FileRelation.h │ ├── FileRelationHandle.cpp │ ├── FileRelationHandle.h │ ├── GlobalHotkey.cpp │ ├── GlobalHotkey.h │ ├── NoFocusDelegate.cpp │ ├── NoFocusDelegate.h │ ├── StatusDefine.h │ ├── TR.h │ └── signal_slot.h ├── DB/ │ ├── DB.pri │ ├── DBModule.cpp │ └── DBModule.h ├── Doxyfile ├── Engine/ │ ├── AudioStream.cpp │ ├── AudioStream.h │ ├── BasicPlayer.cpp │ ├── BasicPlayer.h │ ├── CriticalSection.h │ ├── Engine.pri │ ├── FastFourierTransform.cpp │ ├── FastFourierTransform.h │ ├── IO.cpp │ ├── IO.h │ ├── SoundControl.cpp │ ├── SoundControl.h │ ├── SpectroGraph.cpp │ ├── SpectroGraph.h │ ├── Stream.cpp │ ├── Stream.h │ ├── Thread.h │ ├── Utils.cpp │ ├── Utils.h │ └── WMWrapper.cpp ├── Entity/ │ ├── Entity.pri │ ├── MusicInfoEntity.cpp │ ├── MusicInfoEntity.h │ ├── MusicListSaveFormatEntity.cpp │ ├── MusicListSaveFormatEntity.h │ ├── RadioInfoEntity.cpp │ └── RadioInfoEntity.h ├── ExecDir/ │ ├── AutoUpdate/ │ │ └── qt.conf │ ├── CZPlayer.exe.embed.manifest │ ├── RadioInfo.xml │ ├── qt.conf │ └── update.xml ├── LICENSE ├── LrcLabel/ │ ├── LrcLabel.pri │ ├── MusicLrc.cpp │ └── MusicLrc.h ├── MainWidget/ │ ├── MainWidget.cpp │ ├── MainWidget.h │ └── MainWidget.pri ├── MediaWidget/ │ ├── CollectionPanel.cpp │ ├── CollectionPanel.h │ ├── DownloadListPanel.cpp │ ├── DownloadListPanel.h │ ├── LrcPortraitPanel.cpp │ ├── LrcPortraitPanel.h │ ├── MediaWidget.cpp │ ├── MediaWidget.h │ ├── MediaWidget.pri │ ├── RadioPanel.cpp │ ├── RadioPanel.h │ ├── RankingPanel.cpp │ ├── RankingPanel.h │ ├── SearchPanel.cpp │ └── SearchPanel.h ├── MinWidget/ │ ├── MinMusicWidget.cpp │ ├── MinMusicWidget.h │ └── MinWidget.pri ├── MusicList/ │ ├── MusicList.cpp │ ├── MusicList.h │ ├── MusicList.pri │ ├── MusicListWidget.cpp │ ├── MusicListWidget.h │ ├── SharedDialog.cpp │ └── SharedDialog.h ├── README.md ├── Resources/ │ ├── CZPlayer.qrc │ ├── CZPlayer.rc │ ├── audio/ │ │ └── README │ ├── qss/ │ │ └── CZPlayer.qss │ └── xml/ │ ├── README │ ├── RadioInfo.xml │ └── update.xml ├── TODO ├── Thread/ │ ├── AlbumThread.cpp │ ├── AlbumThread.h │ ├── DownloadMusicThread.cpp │ ├── DownloadMusicThread.h │ ├── LoadMusicThread.cpp │ ├── LoadMusicThread.h │ ├── LrcThread.cpp │ ├── LrcThread.h │ ├── SearchThread.cpp │ ├── SearchThread.h │ └── Thread.pri ├── doc/ │ ├── _about_page_8cpp.html │ ├── _about_page_8h.html │ ├── _about_page_8h_source.html │ ├── _about_panel_8cpp.html │ ├── _about_panel_8h.html │ ├── _about_panel_8h_source.html │ ├── _album_thread_8cpp.html │ ├── _album_thread_8h.html │ ├── _album_thread_8h_source.html │ ├── _audio_stream_8h_source.html │ ├── _author_page_8cpp.html │ ├── _author_page_8h.html │ ├── _author_page_8h_source.html │ ├── _basic_player_8cpp.html │ ├── _basic_player_8h.html │ ├── _basic_player_8h_source.html │ ├── _collection_panel_8cpp.html │ ├── _collection_panel_8h.html │ ├── _collection_panel_8h_source.html │ ├── _config_dialog_8cpp.html │ ├── _config_dialog_8h.html │ ├── _config_dialog_8h_source.html │ ├── _critical_section_8h_source.html │ ├── _d_b_module_8cpp.html │ ├── _d_b_module_8h.html │ ├── _d_b_module_8h_source.html │ ├── _download_list_panel_8cpp.html │ ├── _download_list_panel_8h.html │ ├── _download_list_panel_8h_source.html │ ├── _download_settings_page_8cpp.html │ ├── _download_settings_page_8h.html │ ├── _download_settings_page_8h_source.html │ ├── _edit_hotkey_dialog_8cpp.html │ ├── _edit_hotkey_dialog_8h.html │ ├── _edit_hotkey_dialog_8h_source.html │ ├── _fast_fourier_transform_8h_source.html │ ├── _general_settings_page_8cpp.html │ ├── _general_settings_page_8h.html │ ├── _general_settings_page_8h_source.html │ ├── _global_8h_source.html │ ├── _global_config_8cpp.html │ ├── _global_config_8h.html │ ├── _global_config_8h_source.html │ ├── _global_hotkey_8cpp.html │ ├── _global_hotkey_8h.html │ ├── _global_hotkey_8h_source.html │ ├── _hotkeys_settings_page_8cpp.html │ ├── _hotkeys_settings_page_8h.html │ ├── _hotkeys_settings_page_8h_source.html │ ├── _hotkeys_table_widget_8cpp.html │ ├── _hotkeys_table_widget_8h.html │ ├── _hotkeys_table_widget_8h_source.html │ ├── _i_o_8h_source.html │ ├── _load_music_thread_8cpp.html │ ├── _load_music_thread_8h.html │ ├── _load_music_thread_8h_source.html │ ├── _lrc_demo_8cpp.html │ ├── _lrc_demo_8h.html │ ├── _lrc_demo_8h_source.html │ ├── _lrc_portrait_panel_8cpp.html │ ├── _lrc_portrait_panel_8h.html │ ├── _lrc_portrait_panel_8h_source.html │ ├── _lrc_settings_page_8cpp.html │ ├── _lrc_settings_page_8h.html │ ├── _lrc_settings_page_8h_source.html │ ├── _lrc_thread_8cpp.html │ ├── _lrc_thread_8h.html │ ├── _lrc_thread_8h_source.html │ ├── _main_widget_8h.html │ ├── _main_widget_8h_source.html │ ├── _media_widget_8cpp.html │ ├── _media_widget_8h.html │ ├── _media_widget_8h_source.html │ ├── _min_music_widget_8cpp.html │ ├── _min_music_widget_8h.html │ ├── _min_music_widget_8h_source.html │ ├── _music_info_entity_8cpp.html │ ├── _music_info_entity_8h.html │ ├── _music_info_entity_8h_source.html │ ├── _music_list_8cpp.html │ ├── _music_list_8h.html │ ├── _music_list_8h_source.html │ ├── _music_list_save_format_entity_8cpp.html │ ├── _music_list_save_format_entity_8h.html │ ├── _music_list_save_format_entity_8h_source.html │ ├── _music_list_widget_8cpp.html │ ├── _music_list_widget_8h.html │ ├── _music_list_widget_8h_source.html │ ├── _music_lrc_8cpp.html │ ├── _music_lrc_8h.html │ ├── _music_lrc_8h_source.html │ ├── _no_focus_delegate_8h_source.html │ ├── _radio_panel_8cpp.html │ ├── _radio_panel_8h.html │ ├── _radio_panel_8h_source.html │ ├── _ranking_panel_8cpp.html │ ├── _ranking_panel_8h.html │ ├── _ranking_panel_8h_source.html │ ├── _search_panel_8cpp.html │ ├── _search_panel_8h.html │ ├── _search_panel_8h_source.html │ ├── _shared_dialog_8cpp.html │ ├── _shared_dialog_8h.html │ ├── _shared_dialog_8h_source.html │ ├── _sound_control_8cpp.html │ ├── _sound_control_8h.html │ ├── _sound_control_8h_source.html │ ├── _spectro_graph_8cpp.html │ ├── _spectro_graph_8h.html │ ├── _spectro_graph_8h_source.html │ ├── _status_define_8h.html │ ├── _status_define_8h_source.html │ ├── _stream_8h_source.html │ ├── _t_r_8h.html │ ├── _t_r_8h_source.html │ ├── _thanks_page_8cpp.html │ ├── _thanks_page_8h.html │ ├── _thanks_page_8h_source.html │ ├── _thread_8h_source.html │ ├── _update_page_8cpp.html │ ├── _update_page_8h.html │ ├── _update_page_8h_source.html │ ├── _utils_8h_source.html │ ├── annotated.html │ ├── class_about_page-members.html │ ├── class_about_page.html │ ├── class_about_panel-members.html │ ├── class_about_panel.html │ ├── class_album_thread-members.html │ ├── class_album_thread.html │ ├── class_author_page-members.html │ ├── class_author_page.html │ ├── class_c_audio_stream-members.html │ ├── class_c_audio_stream.html │ ├── class_c_basic_player-members.html │ ├── class_c_basic_player.html │ ├── class_c_critical_section-members.html │ ├── class_c_critical_section.html │ ├── class_c_custom_memory_stream-members.html │ ├── class_c_custom_memory_stream.html │ ├── class_c_fast_fourier_transform-members.html │ ├── class_c_fast_fourier_transform.html │ ├── class_c_file_input-members.html │ ├── class_c_file_input.html │ ├── class_c_file_stream-members.html │ ├── class_c_file_stream.html │ ├── class_c_handle_stream-members.html │ ├── class_c_handle_stream.html │ ├── class_c_input-members.html │ ├── class_c_input.html │ ├── class_c_memory_stream-members.html │ ├── class_c_memory_stream.html │ ├── class_c_mp3_input-members.html │ ├── class_c_mp3_input.html │ ├── class_c_play_thread-members.html │ ├── class_c_play_thread.html │ ├── class_c_spectrum_analyser-members.html │ ├── class_c_spectrum_analyser.html │ ├── class_c_spectrum_analyser_thread-members.html │ ├── class_c_spectrum_analyser_thread.html │ ├── class_c_stream-members.html │ ├── class_c_stream.html │ ├── class_c_streamed_input-members.html │ ├── class_c_streamed_input.html │ ├── class_c_system-members.html │ ├── class_c_system.html │ ├── class_c_thread-members.html │ ├── class_c_thread.html │ ├── class_c_vorbis_input-members.html │ ├── class_c_vorbis_input.html │ ├── class_c_wave_converter-members.html │ ├── class_c_wave_converter.html │ ├── class_c_wave_input-members.html │ ├── class_c_wave_input.html │ ├── class_c_wma_input-members.html │ ├── class_c_wma_input.html │ ├── class_collection_panel-members.html │ ├── class_collection_panel.html │ ├── class_config_dialog-members.html │ ├── class_config_dialog.html │ ├── class_d_b_module-members.html │ ├── class_d_b_module.html │ ├── class_d_s___start_buffer_helper-members.html │ ├── class_d_s___start_buffer_helper.html │ ├── class_d_s___start_buffer_helper_1_1_data-members.html │ ├── class_d_s___start_buffer_helper_1_1_data.html │ ├── class_download_list_panel-members.html │ ├── class_download_list_panel.html │ ├── class_download_settings_page-members.html │ ├── class_download_settings_page.html │ ├── class_edit_hotkey_dialog-members.html │ ├── class_edit_hotkey_dialog.html │ ├── class_general_settings_page-members.html │ ├── class_general_settings_page.html │ ├── class_global_config-members.html │ ├── class_global_config.html │ ├── class_global_hot_key-members.html │ ├── class_global_hot_key.html │ ├── class_hot_keys_settings_page-members.html │ ├── class_hot_keys_settings_page.html │ ├── class_hot_keys_table_widget-members.html │ ├── class_hot_keys_table_widget.html │ ├── class_load_music_thread-members.html │ ├── class_load_music_thread.html │ ├── class_load_music_thread_event-members.html │ ├── class_load_music_thread_event.html │ ├── class_lrc_demo-members.html │ ├── class_lrc_demo.html │ ├── class_lrc_portrait_panel-members.html │ ├── class_lrc_portrait_panel.html │ ├── class_lrc_settings_page-members.html │ ├── class_lrc_settings_page.html │ ├── class_lrc_thread-members.html │ ├── class_lrc_thread.html │ ├── class_main_widget-members.html │ ├── class_main_widget.html │ ├── class_media_widget-members.html │ ├── class_media_widget.html │ ├── class_min_music_widget-members.html │ ├── class_min_music_widget.html │ ├── class_music_info_entity-members.html │ ├── class_music_info_entity.html │ ├── class_music_list-members.html │ ├── class_music_list.html │ ├── class_music_list_save_format_entity-members.html │ ├── class_music_list_save_format_entity.html │ ├── class_music_list_widget-members.html │ ├── class_music_list_widget.html │ ├── class_music_lrc-members.html │ ├── class_music_lrc.html │ ├── class_no_focus_delegate-members.html │ ├── class_no_focus_delegate.html │ ├── class_radio_panel-members.html │ ├── class_radio_panel.html │ ├── class_ranking_panel-members.html │ ├── class_ranking_panel.html │ ├── class_search_panel-members.html │ ├── class_search_panel.html │ ├── class_shared_dialog-members.html │ ├── class_shared_dialog.html │ ├── class_signal-members.html │ ├── class_signal.html │ ├── class_signal1-members.html │ ├── class_signal1.html │ ├── class_signal2-members.html │ ├── class_signal2.html │ ├── class_signal3-members.html │ ├── class_signal3.html │ ├── class_signal4-members.html │ ├── class_signal4.html │ ├── class_signal5-members.html │ ├── class_signal5.html │ ├── class_signal6-members.html │ ├── class_signal6.html │ ├── class_signal7-members.html │ ├── class_signal7.html │ ├── class_signal8-members.html │ ├── class_signal8.html │ ├── class_signal9-members.html │ ├── class_signal9.html │ ├── class_slot-members.html │ ├── class_slot.html │ ├── class_slot1-members.html │ ├── class_slot1.html │ ├── class_slot2-members.html │ ├── class_slot2.html │ ├── class_slot3-members.html │ ├── class_slot3.html │ ├── class_slot4-members.html │ ├── class_slot4.html │ ├── class_slot5-members.html │ ├── class_slot5.html │ ├── class_slot6-members.html │ ├── class_slot6.html │ ├── class_slot7-members.html │ ├── class_slot7.html │ ├── class_slot8-members.html │ ├── class_slot8.html │ ├── class_slot9-members.html │ ├── class_slot9.html │ ├── class_slot_base-members.html │ ├── class_slot_base.html │ ├── class_slot_base1-members.html │ ├── class_slot_base1.html │ ├── class_slot_base2-members.html │ ├── class_slot_base2.html │ ├── class_slot_base3-members.html │ ├── class_slot_base3.html │ ├── class_slot_base4-members.html │ ├── class_slot_base4.html │ ├── class_slot_base5-members.html │ ├── class_slot_base5.html │ ├── class_slot_base6-members.html │ ├── class_slot_base6.html │ ├── class_slot_base7-members.html │ ├── class_slot_base7.html │ ├── class_slot_base8-members.html │ ├── class_slot_base8.html │ ├── class_slot_base9-members.html │ ├── class_slot_base9.html │ ├── class_slot_impl-members.html │ ├── class_slot_impl.html │ ├── class_slot_impl1-members.html │ ├── class_slot_impl1.html │ ├── class_slot_impl2-members.html │ ├── class_slot_impl2.html │ ├── class_slot_impl3-members.html │ ├── class_slot_impl3.html │ ├── class_slot_impl4-members.html │ ├── class_slot_impl4.html │ ├── class_slot_impl5-members.html │ ├── class_slot_impl5.html │ ├── class_slot_impl6-members.html │ ├── class_slot_impl6.html │ ├── class_slot_impl7-members.html │ ├── class_slot_impl7.html │ ├── class_slot_impl8-members.html │ ├── class_slot_impl8.html │ ├── class_slot_impl9-members.html │ ├── class_slot_impl9.html │ ├── class_sound_control-members.html │ ├── class_sound_control.html │ ├── class_spectrograph-members.html │ ├── class_spectrograph.html │ ├── class_thanks_page-members.html │ ├── class_thanks_page.html │ ├── class_update_page-members.html │ ├── class_update_page.html │ ├── classes.html │ ├── dir_0b6ee6e7e9547e675db4add2e5de97da.html │ ├── dir_39ce8d35579d5eb10e41a1450265d156.html │ ├── dir_4d857fb7e9085ae5b88ad2c12868c8c8.html │ ├── dir_800159ee4c5072e219532c73d0742501.html │ ├── dir_8f184a2117dd7a79280d84efd9c8507d.html │ ├── dir_9ee117705b853058628419415d05a484.html │ ├── dir_a625c670f828dfaff80322b07e1365a6.html │ ├── dir_abd33bfc052dc4b28a34b6a77a4d5bc7.html │ ├── dir_bbfe1637124d83753e4f60ab7a9ad152.html │ ├── dir_c211989d999a6a303a2b08461c3c22b8.html │ ├── dir_c6310732a22f63c0c2fc5595561e68f1.html │ ├── dir_db9980dfd90e37473d4dfba3eb448642.html │ ├── doxygen.css │ ├── dynsections.js │ ├── files.html │ ├── functions.html │ ├── functions_a.html │ ├── functions_c.html │ ├── functions_d.html │ ├── functions_e.html │ ├── functions_f.html │ ├── functions_func.html │ ├── functions_func_c.html │ ├── functions_func_d.html │ ├── functions_func_e.html │ ├── functions_func_f.html │ ├── functions_func_g.html │ ├── functions_func_h.html │ ├── functions_func_i.html │ ├── functions_func_l.html │ ├── functions_func_m.html │ ├── functions_func_n.html │ ├── functions_func_o.html │ ├── functions_func_p.html │ ├── functions_func_r.html │ ├── functions_func_s.html │ ├── functions_func_t.html │ ├── functions_func_u.html │ ├── functions_func_v.html │ ├── functions_func_~.html │ ├── functions_g.html │ ├── functions_h.html │ ├── functions_i.html │ ├── functions_l.html │ ├── functions_m.html │ ├── functions_n.html │ ├── functions_o.html │ ├── functions_p.html │ ├── functions_r.html │ ├── functions_s.html │ ├── functions_t.html │ ├── functions_u.html │ ├── functions_v.html │ ├── functions_vars.html │ ├── functions_~.html │ ├── globals.html │ ├── globals_defs.html │ ├── globals_enum.html │ ├── globals_eval.html │ ├── globals_vars.html │ ├── hierarchy.html │ ├── index.html │ ├── jquery.js │ ├── main_8cpp.html │ ├── search/ │ │ ├── all_0.html │ │ ├── all_0.js │ │ ├── all_1.html │ │ ├── all_1.js │ │ ├── all_10.html │ │ ├── all_10.js │ │ ├── all_11.html │ │ ├── all_11.js │ │ ├── all_12.html │ │ ├── all_12.js │ │ ├── all_13.html │ │ ├── all_13.js │ │ ├── all_14.html │ │ ├── all_14.js │ │ ├── all_15.html │ │ ├── all_15.js │ │ ├── all_16.html │ │ ├── all_16.js │ │ ├── all_17.html │ │ ├── all_17.js │ │ ├── all_2.html │ │ ├── all_2.js │ │ ├── all_3.html │ │ ├── all_3.js │ │ ├── all_4.html │ │ ├── all_4.js │ │ ├── all_5.html │ │ ├── all_5.js │ │ ├── all_6.html │ │ ├── all_6.js │ │ ├── all_7.html │ │ ├── all_7.js │ │ ├── all_8.html │ │ ├── all_8.js │ │ ├── all_9.html │ │ ├── all_9.js │ │ ├── all_a.html │ │ ├── all_a.js │ │ ├── all_b.html │ │ ├── all_b.js │ │ ├── all_c.html │ │ ├── all_c.js │ │ ├── all_d.html │ │ ├── all_d.js │ │ ├── all_e.html │ │ ├── all_e.js │ │ ├── all_f.html │ │ ├── all_f.js │ │ ├── classes_0.html │ │ ├── classes_0.js │ │ ├── classes_1.html │ │ ├── classes_1.js │ │ ├── classes_2.html │ │ ├── classes_2.js │ │ ├── classes_3.html │ │ ├── classes_3.js │ │ ├── classes_4.html │ │ ├── classes_4.js │ │ ├── classes_5.html │ │ ├── classes_5.js │ │ ├── classes_6.html │ │ ├── classes_6.js │ │ ├── classes_7.html │ │ ├── classes_7.js │ │ ├── classes_8.html │ │ ├── classes_8.js │ │ ├── classes_9.html │ │ ├── classes_9.js │ │ ├── classes_a.html │ │ ├── classes_a.js │ │ ├── classes_b.html │ │ ├── classes_b.js │ │ ├── classes_c.html │ │ ├── classes_c.js │ │ ├── classes_d.html │ │ ├── classes_d.js │ │ ├── classes_e.html │ │ ├── classes_e.js │ │ ├── classes_f.html │ │ ├── classes_f.js │ │ ├── defines_0.html │ │ ├── defines_0.js │ │ ├── defines_1.html │ │ ├── defines_1.js │ │ ├── defines_2.html │ │ ├── defines_2.js │ │ ├── defines_3.html │ │ ├── defines_3.js │ │ ├── defines_4.html │ │ ├── defines_4.js │ │ ├── defines_5.html │ │ ├── defines_5.js │ │ ├── defines_6.html │ │ ├── defines_6.js │ │ ├── defines_7.html │ │ ├── defines_7.js │ │ ├── defines_8.html │ │ ├── defines_8.js │ │ ├── defines_9.html │ │ ├── defines_9.js │ │ ├── defines_a.html │ │ ├── defines_a.js │ │ ├── defines_b.html │ │ ├── defines_b.js │ │ ├── defines_c.html │ │ ├── defines_c.js │ │ ├── enums_0.html │ │ ├── enums_0.js │ │ ├── enums_1.html │ │ ├── enums_1.js │ │ ├── enumvalues_0.html │ │ ├── enumvalues_0.js │ │ ├── enumvalues_1.html │ │ ├── enumvalues_1.js │ │ ├── files_0.html │ │ ├── files_0.js │ │ ├── files_1.html │ │ ├── files_1.js │ │ ├── files_2.html │ │ ├── files_2.js │ │ ├── files_3.html │ │ ├── files_3.js │ │ ├── files_4.html │ │ ├── files_4.js │ │ ├── files_5.html │ │ ├── files_5.js │ │ ├── files_6.html │ │ ├── files_6.js │ │ ├── files_7.html │ │ ├── files_7.js │ │ ├── files_8.html │ │ ├── files_8.js │ │ ├── files_9.html │ │ ├── files_9.js │ │ ├── files_a.html │ │ ├── files_a.js │ │ ├── files_b.html │ │ ├── files_b.js │ │ ├── files_c.html │ │ ├── files_c.js │ │ ├── functions_0.html │ │ ├── functions_0.js │ │ ├── functions_1.html │ │ ├── functions_1.js │ │ ├── functions_10.html │ │ ├── functions_10.js │ │ ├── functions_11.html │ │ ├── functions_11.js │ │ ├── functions_12.html │ │ ├── functions_12.js │ │ ├── functions_2.html │ │ ├── functions_2.js │ │ ├── functions_3.html │ │ ├── functions_3.js │ │ ├── functions_4.html │ │ ├── functions_4.js │ │ ├── functions_5.html │ │ ├── functions_5.js │ │ ├── functions_6.html │ │ ├── functions_6.js │ │ ├── functions_7.html │ │ ├── functions_7.js │ │ ├── functions_8.html │ │ ├── functions_8.js │ │ ├── functions_9.html │ │ ├── functions_9.js │ │ ├── functions_a.html │ │ ├── functions_a.js │ │ ├── functions_b.html │ │ ├── functions_b.js │ │ ├── functions_c.html │ │ ├── functions_c.js │ │ ├── functions_d.html │ │ ├── functions_d.js │ │ ├── functions_e.html │ │ ├── functions_e.js │ │ ├── functions_f.html │ │ ├── functions_f.js │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── variables_0.html │ │ ├── variables_0.js │ │ ├── variables_1.html │ │ ├── variables_1.js │ │ ├── variables_2.html │ │ ├── variables_2.js │ │ ├── variables_3.html │ │ ├── variables_3.js │ │ ├── variables_4.html │ │ ├── variables_4.js │ │ ├── variables_5.html │ │ ├── variables_5.js │ │ ├── variables_6.html │ │ └── variables_6.js │ ├── signal__slot_8h_source.html │ ├── struct___a_c_m_wave_format-members.html │ ├── struct___a_c_m_wave_format.html │ ├── struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o-members.html │ ├── struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o.html │ ├── struct___d_v_i___a_d_p_c_m___i_n_f_o-members.html │ ├── struct___d_v_i___a_d_p_c_m___i_n_f_o.html │ ├── struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o-members.html │ ├── struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o.html │ ├── struct___d_v_i_a_d_p_c_m_block_header-members.html │ ├── struct___d_v_i_a_d_p_c_m_block_header.html │ ├── struct___d_v_i_a_d_p_c_m_header-members.html │ ├── struct___d_v_i_a_d_p_c_m_header.html │ ├── struct___i_d3_tag-members.html │ ├── struct___i_d3_tag.html │ ├── struct___i_d3v2_frame-members.html │ ├── struct___i_d3v2_frame.html │ ├── struct___i_d3v2_tag-members.html │ ├── struct___i_d3v2_tag.html │ ├── struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t-members.html │ ├── struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t.html │ ├── struct___m_s___a_d_p_c_m___i_n_f_o-members.html │ ├── struct___m_s___a_d_p_c_m___i_n_f_o.html │ ├── struct___m_s_a_d_p_c_m_block_header_mono-members.html │ ├── struct___m_s_a_d_p_c_m_block_header_mono.html │ ├── struct___m_s_a_d_p_c_m_block_header_stereo-members.html │ ├── struct___m_s_a_d_p_c_m_block_header_stereo.html │ ├── struct___riff_header-members.html │ ├── struct___riff_header.html │ ├── struct___w_m_a___s_y_n_c___r_e_a_d_e_r-members.html │ ├── struct___w_m_a___s_y_n_c___r_e_a_d_e_r.html │ ├── struct___w_m_a_format_spec-members.html │ ├── struct___w_m_a_format_spec.html │ ├── struct___wave_header-members.html │ ├── struct___wave_header.html │ ├── struct___wave_header_ex-members.html │ ├── struct___wave_header_ex.html │ ├── struct_d_s___audio_device_cache-members.html │ ├── struct_d_s___audio_device_cache.html │ ├── struct_d_s___info-members.html │ ├── struct_d_s___info.html │ ├── struct_d_s___refresh_cache_struct-members.html │ ├── struct_d_s___refresh_cache_struct.html │ ├── struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e-members.html │ ├── struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e.html │ ├── structdither-members.html │ ├── structdither.html │ ├── structtag___direct_audio_device_description-members.html │ ├── structtag___direct_audio_device_description.html │ ├── structxing-members.html │ ├── structxing.html │ └── tabs.css ├── doc.bat └── main.cpp ================================================ FILE CONTENTS ================================================ ================================================ FILE: 3rdParty/equalizer/eq.cpp ================================================ /* * PCM time-domain equalizer * * Copyright (C) 2002-2006 Felipe Rivera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: eq.c,v 1.12 2006/01/15 00:13:49 liebremx Exp $ */ #include "iir.h" #include #include #include #include "eq.h" static bool on = false; void init_equliazer(int nBand) { if(nBand != 0 && nBand < EQ_MAX_BANDS) { //nBand = nBand; } else { nBand = 10; } init_iir(nBand); } void uninit_equliazer() { clean_history(); } void set_eq_value(float value, int index, int chn) { /* Map the gain and preamp values */ if (index >= 0) { set_gain(index, chn, 2.5220207857061455181125E-01 * exp(8.0178361802353992349168E-02 * value) - 2.5220207852836562523180E-01 , value); } else { /* -12dB .. 12dB mapping */ set_preamp(chn, 9.9999946497217584440165E-01 * exp(6.9314738656671842642609E-02 * value) + 3.7119444716771825623636E-07); } } /* * The main stuff */ int do_equliazer(short * d, int length, int srate, int nch) { return iir(d, length, srate, nch); } ================================================ FILE: 3rdParty/equalizer/eq.h ================================================ /* * PCM time-domain equalizer * * Copyright (C) 2002 Felipe Rivera * * 19.08.2002 Initial release for XMMS * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: eq.h,v 1.6 2006/01/15 00:16:08 liebremx Exp $ */ #ifndef EQ_H #define EQ_H void init_equliazer(int nBand = 0 ); void uninit_equliazer() ; void set_eq_value(float value, int index, int chn); int do_equliazer(short * d, int length, int srate, int nch); int get_eq_band_count(); float get_eq_value(int index , int chn); #endif ================================================ FILE: 3rdParty/equalizer/iir.h ================================================ /* * PCM time-domain equalizer * * Copyright (C) 2002-2006 Felipe Rivera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: iir.h,v 1.13 2006/01/15 00:26:32 liebremx Exp $ */ #ifndef IIR_H #define IIR_H #include "iir_cfs.h" /* * Flush-to-zero to avoid flooding the CPU with underflow exceptions */ #ifdef SSE_MATH #define FTZ 0x8000 #define FTZ_ON { \ unsigned int mxcsr; \ __asm__ __volatile__ ("stmxcsr %0" : "=m" (*&mxcsr)); \ mxcsr |= FTZ; \ __asm__ __volatile__ ("ldmxcsr %0" : : "m" (*&mxcsr)); \ } #define FTZ_OFF { \ unsigned int mxcsr; \ __asm__ __volatile__ ("stmxcsr %0" : "=m" (*&mxcsr)); \ mxcsr &= ~FTZ; \ __asm__ __volatile__ ("ldmxcsr %0" : : "m" (*&mxcsr)); \ } #else #define FTZ_ON #define FTZ_OFF #endif typedef double sample_t; typedef sample_t level_t; /* Max bands supported by the code FIXME: 31 bands processing IS HARD ON THE PROCESSOR On a PIII@900Mhz I got ~45% of CPU usage Have to improve the filter implementation Got it down to ~20% for 31 Bands Still MMX/3DNow!/SSE whatever, can bring it down */ #define EQ_MAX_BANDS 32 /* Number of channels (Stereo) */ #define EQ_CHANNELS 2 #define EXTRA_FILTER true /* * Function prototypes */ void init_iir(int nBand); void clean_history(); void set_gain(int index, int chn, double val , float rawValue); void set_preamp(int chn, double val); int iir(short * d, int length, int srate, int nch); //extern sIIRCoefficients *iir_cf; #endif /* #define IIR_H */ ================================================ FILE: 3rdParty/equalizer/iir_cfs.cpp ================================================ /* * Copyright (C) 2002-2006 Felipe Rivera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * Coefficient stuff * * $Id: iir_cfs.c,v 1.2 2006/01/15 00:17:46 liebremx Exp $ */ #include "iir_cfs.h" #include #include /*************************** * IIR filter coefficients * ***************************/ #pragma pack(push,1) static sIIRCoefficients iir_cf10_11k_11025[10] ; static sIIRCoefficients iir_cf10_22k_22050[10] ; static sIIRCoefficients iir_cforiginal10_44100[10] ; static sIIRCoefficients iir_cforiginal10_48000[10] ; static sIIRCoefficients iir_cf10_44100[10] ; static sIIRCoefficients iir_cf10_48000[10] ; static sIIRCoefficients iir_cf15_44100[15] ; static sIIRCoefficients iir_cf15_48000[15] ; static sIIRCoefficients iir_cf25_44100[25] ; static sIIRCoefficients iir_cf25_48000[25] ; static sIIRCoefficients iir_cf31_44100[31] ; static sIIRCoefficients iir_cf31_48000[31] ; #pragma pack(pop) /****************************************************************** * Definitions and data structures to calculate the coefficients ******************************************************************/ static const double band_f011k[] = { 31, 62, 125, 250, 500, 1000, 2000, 3000, 4000, 5500 }; static const double band_f022k[] = { 31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, 11000 }; static const double band_f010[] = { 31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, 16000 }; static const double band_original_f010[] = { 60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000 }; static const double band_f015[] = { 25,40,63,100,160,250,400,630,1000,1600,2500,4000,6300,10000,16000 }; static const double band_f025[] = { 20,31.5,40,50,80,100,125,160,250,315,400,500,800, 1000,1250,1600,2500,3150,4000,5000,8000,10000,12500,16000,20000 }; static const double band_f031[] = { 20,25,31.5,40,50,63,80,100,125,160,200,250,315,400,500,630,800, 1000,1250,1600,2000,2500,3150,4000,5000,6300,8000,10000,12500,16000,20000 }; #define GAIN_F0 1.0 #define GAIN_F1 GAIN_F0 / M_SQRT2 #define SAMPLING_FREQ 44100.0 #define TETA(f) (2*M_PI*(double)f/bands[n].sfreq) #define TWOPOWER(value) (value * value) #define BETA2(tf0, tf) \ (TWOPOWER(GAIN_F1)*TWOPOWER(cos(tf0)) \ - 2.0 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \ + TWOPOWER(GAIN_F1) \ - TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf))) #define BETA1(tf0, tf) \ (2.0 * TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf)) \ + TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf0)) \ - 2.0 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \ - TWOPOWER(GAIN_F1) + TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf))) #define BETA0(tf0, tf) \ (0.25 * TWOPOWER(GAIN_F1) * TWOPOWER(cos(tf0)) \ - 0.5 * TWOPOWER(GAIN_F1) * cos(tf) * cos(tf0) \ + 0.25 * TWOPOWER(GAIN_F1) \ - 0.25 * TWOPOWER(GAIN_F0) * TWOPOWER(sin(tf))) #define GAMMA(beta, tf0) ((0.5 + beta) * cos(tf0)) #define ALPHA(beta) ((0.5 - beta)/2.0) struct { sIIRCoefficients *coeffs; const double *cfs; double octave; int band_count; double sfreq; } bands[] = { { iir_cf10_11k_11025, band_f011k, 1.0, 10, 11025.0 }, { iir_cf10_22k_22050, band_f022k, 1.0, 10, 22050.0 }, { iir_cforiginal10_44100, band_original_f010, 1.0, 10, 44100.0 }, { iir_cforiginal10_48000, band_original_f010, 1.0, 10, 48000.0 }, { iir_cf10_44100, band_f010, 1.0, 10, 44100.0 }, { iir_cf10_48000, band_f010, 1.0, 10, 48000.0 }, { iir_cf15_44100, band_f015, 2.0/3.0, 15, 44100.0 }, { iir_cf15_48000, band_f015, 2.0/3.0, 15, 48000.0 }, { iir_cf25_44100, band_f025, 1.0/3.0, 25, 44100.0 }, { iir_cf25_48000, band_f025, 1.0/3.0, 25, 48000.0 }, { iir_cf31_44100, band_f031, 1.0/3.0, 31, 44100.0 }, { iir_cf31_48000, band_f031, 1.0/3.0, 31, 48000.0 }, { 0 } }; /************* * Functions * *************/ /* Get the coeffs for a given number of bands and sampling frequency */ sIIRCoefficients* get_coeffs(int *bands, int sfreq, bool use_xmms_original_freqs) { sIIRCoefficients *iir_cf = 0; switch(sfreq) { case 11025: iir_cf = iir_cf10_11k_11025; *bands = 10; break; case 22050: iir_cf = iir_cf10_22k_22050; *bands = 10; break; case 48000: switch(*bands) { case 31: iir_cf = iir_cf31_48000; break; case 25: iir_cf = iir_cf25_48000; break; case 15: iir_cf = iir_cf15_48000; break; default: iir_cf = use_xmms_original_freqs ? iir_cforiginal10_48000 : iir_cf10_48000; break; } break; default: switch(*bands) { case 31: iir_cf = iir_cf31_44100; break; case 25: iir_cf = iir_cf25_44100; break; case 15: iir_cf = iir_cf15_44100; break; default: iir_cf = use_xmms_original_freqs ? iir_cforiginal10_44100 : iir_cf10_44100; break; } break; } return iir_cf; } /* Get the freqs at both sides of F0. These will be cut at -3dB */ static void find_f1_and_f2(double f0, double octave_percent, double *f1, double *f2) { double octave_factor = pow(2.0, octave_percent/2.0); *f1 = f0/octave_factor; *f2 = f0*octave_factor; } /* Find the quadratic root * Always return the smallest root */ static int find_root(double a, double b, double c, double *x0) { double k = c-((b*b)/(4.*a)); double h = -(b/(2.*a)); double x1 = 0.; if (-(k/a) < 0.) return -1; *x0 = h - sqrt(-(k/a)); x1 = h + sqrt(-(k/a)); if (x1 < *x0) *x0 = x1; return 0; } /* Calculate all the coefficients as specified in the bands[] array */ void calc_coeffs() { int i, n; double f1, f2; double x0; n = 0; for (; bands[n].cfs; n++) { double *freqs = (double *)bands[n].cfs; for (i=0; i * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: iir_cfs.h,v 1.2 2006/01/15 00:17:46 liebremx Exp $ */ #ifndef IIR_CFS_H #define IIR_CFS_H #include #define M_SQRT2 1.41421356237309504880 #define M_PI 3.1415926 /* Coefficients entry */ typedef struct { float beta; float alpha; float gamma; float dummy; // Word alignment }sIIRCoefficients; sIIRCoefficients* get_coeffs(int *bands, int sfreq, bool use_xmms_original_freqs); void calc_coeffs(); #endif ================================================ FILE: 3rdParty/equalizer/iir_fpu.cpp ================================================ /* * PCM time-domain equalizer * * Copyright (C) 2002-2006 Felipe Rivera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: iir_fpu.c,v 1.4 2006/01/15 00:26:32 liebremx Exp $ */ #include #include #include #include #include "iir.h" #include "eq.h" #include "iir_fpu.h" #include static sXYData data_history[EQ_MAX_BANDS][EQ_CHANNELS]; static sXYData data_history2[EQ_MAX_BANDS][EQ_CHANNELS]; float gain[EQ_MAX_BANDS][EQ_CHANNELS]; float gain_raw_value[EQ_MAX_BANDS][EQ_CHANNELS]; /* random noise */ sample_t dither[256]; int di; /* Volume gain * values should be between 0.0 and 1.0 * Use the preamp from XMMS for now * */ #ifdef BENCHMARK #include "benchmark.h" double timex = 0.0; int count = 0; unsigned int blength = 0; #endif /* * Global vars */ sIIRCoefficients *g_iir_cf; float g_preamp[EQ_CHANNELS]; int g_rate; int g_band_count; int get_eq_band_count() { return g_band_count; } void set_preamp(int chn, double val) { g_preamp[chn] = (float)val; } /* Init the filters */ void init_iir(int nBand) { for(int iBand = 0 ; iBand < EQ_MAX_BANDS ; iBand ++) { set_eq_value(20.0f , -iBand , 0) ; set_eq_value(20.0f , -iBand , 1) ; set_eq_value(0.0f , iBand , 0) ; set_eq_value(0.0f , iBand , 1) ; } calc_coeffs(); /* XXX: Take all the eqcfg. stuff out of this file */ g_band_count = nBand; g_rate = 44100; g_iir_cf = get_coeffs(&g_band_count, g_rate, false); clean_history(); } void set_gain(int index, int chn, double val, float rawValue) { gain[index][chn] = (float)val; gain_raw_value[index][chn] = rawValue; } float get_eq_value(int index , int chn) { return gain_raw_value[index][chn] ; } void clean_history() { int n; /* Zero the history arrays */ memset(data_history , 0, sizeof(sXYData) * EQ_MAX_BANDS * EQ_CHANNELS); memset(data_history2, 0, sizeof(sXYData) * EQ_MAX_BANDS * EQ_CHANNELS); /* this is only needed if we use fpu code and there's no other place for the moment to init the dither array*/ for (n = 0; n < 256; n++) { dither[n] = (rand() % 4) - 2; } di = 0; } int iir(short * d, int length, int srate, int nch) { // FTZ_ON; short *data = (short*) d; /* Indexes for the history arrays * These have to be kept between calls to this function * hence they are static */ static int i = 2, j = 1, k = 0; int index, band, channel; int tempgint, halflength; sample_t out[EQ_CHANNELS], pcm[EQ_CHANNELS]; // Load the correct filter table according to the sampling rate if needed if (srate != g_rate) { g_rate = srate; g_iir_cf = get_coeffs(&g_band_count, g_rate, false); clean_history(); } /** * IIR filter equation is * y[n] = 2 * (alpha*(x[n]-x[n-2]) + gamma*y[n-1] - beta*y[n-2]) * * NOTE: The 2 factor was introduced in the coefficients to save * a multiplication * * This algorithm cascades two filters to get nice filtering * at the expense of extra CPU cycles */ /* 16bit, 2 bytes per sample, so divide by two the length of * the buffer (length is in bytes) */ halflength = (length >> 1); for (index = 0; index < halflength; index+=nch) { /* For each channel */ for (channel = 0; channel < nch; channel++) { pcm[channel] = data[index+channel]; /* Preamp gain */ pcm[channel] *= g_preamp[channel]; /* add random noise */ pcm[channel] += dither[di]; out[channel] = 0.; /* For each band */ for (band = 0; band < g_band_count; band++) { /* Store Xi(n) */ data_history[band][channel].x[i] = pcm[channel]; /* Calculate and store Yi(n) */ data_history[band][channel].y[i] = ( /* = alpha * [x(n)-x(n-2)] */ g_iir_cf[band].alpha * ( data_history[band][channel].x[i] - data_history[band][channel].x[k]) /* + gamma * y(n-1) */ /* - beta * y(n-2) */ + g_iir_cf[band].gamma * data_history[band][channel].y[j] - g_iir_cf[band].beta * data_history[band][channel].y[k] ); /* * The multiplication by 2.0 was 'moved' into the coefficients to save * CPU cycles here */ /* Apply the gain */ out[channel] += data_history[band][channel].y[i]*gain[band][channel]; // * 2.0; } /* For each band */ if (EXTRA_FILTER) { /* Filter the sample again */ for (band = 0; band < g_band_count; band++) { /* Store Xi(n) */ data_history2[band][channel].x[i] = out[channel]; /* Calculate and store Yi(n) */ data_history2[band][channel].y[i] = ( /* y(n) = alpha * [x(n)-x(n-2)] */ g_iir_cf[band].alpha * (data_history2[band][channel].x[i] - data_history2[band][channel].x[k]) /* + gamma * y(n-1) */ /* - beta * y(n-2) */ + g_iir_cf[band].gamma * data_history2[band][channel].y[j] - g_iir_cf[band].beta * data_history2[band][channel].y[k] ); /* Apply the gain */ out[channel] += data_history2[band][channel].y[i]*gain[band][channel]; } /* For each band */ } /* Volume stuff Scale down original PCM sample and add it to the filters output. This substitutes the multiplication by 0.25 Go back to use the floating point multiplication before the conversion to give more dynamic range */ out[channel] += pcm[channel]*0.25; /* remove random noise */ out[channel] -= dither[di]*0.25; /* Round and convert to integer */ #ifdef ARCH_PPC tempgint = round_ppc(out[channel]); #else #ifdef ARCH_X86 tempgint = round_trick(out[channel]); #else tempgint = (int)out[channel]; #endif #endif /* Limit the output */ if (tempgint < -32768) data[index+channel] = -32768; else if (tempgint > 32767) data[index+channel] = 32767; else data[index+channel] = tempgint; } /* For each channel */ /* Wrap around the indexes */ i = (i+1)%3; j = (j+1)%3; k = (k+1)%3; /* random noise index */ di = (di + 1) % 256; }/* For each pair of samples */ // FTZ_OFF; return length; } ================================================ FILE: 3rdParty/equalizer/iir_fpu.h ================================================ /* * PCM time-domain equalizer * * Copyright (C) 2002-2006 Felipe Rivera * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: iir_fpu.h,v 1.3 2006/01/15 00:26:32 liebremx Exp $$ */ #ifndef IIR_FPU_H #define IIR_FPU_H #define sample_t double /* * Normal FPU implementation data structures */ /* Coefficient history for the IIR filter */ typedef struct { sample_t x[3]; /* x[n], x[n-1], x[n-2] */ sample_t y[3]; /* y[n], y[n-1], y[n-2] */ sample_t dummy1; // Word alignment sample_t dummy2; }sXYData; #endif ================================================ FILE: 3rdParty/libmad/include/bit.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: bit.c,v 1.12 2004/01/23 09:41:32 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "bit.h" /* * This is the lookup table for computing the CRC-check word. * As described in section 2.4.3.1 and depicted in Figure A.9 * of ISO/IEC 11172-3, the generator polynomial is: * * G(X) = X^16 + X^15 + X^2 + 1 */ static unsigned short const crc_table[256] = { 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041, 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2, 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1, 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1, 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082, 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192, 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1, 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1, 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2, 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151, 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162, 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132, 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101, 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312, 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321, 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371, 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342, 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1, 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2, 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2, 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381, 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291, 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2, 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2, 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1, 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252, 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261, 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231, 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202 }; # define CRC_POLY 0x8005 /* * NAME: bit->init() * DESCRIPTION: initialize bit pointer struct */ void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) { bitptr->byte = byte; bitptr->cache = 0; bitptr->left = CHAR_BIT; } /* * NAME: bit->length() * DESCRIPTION: return number of bits between start and end points */ unsigned int mad_bit_length(struct mad_bitptr const *begin, struct mad_bitptr const *end) { return begin->left + CHAR_BIT * (end->byte - (begin->byte + 1)) + (CHAR_BIT - end->left); } /* * NAME: bit->nextbyte() * DESCRIPTION: return pointer to next unprocessed byte */ unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) { return bitptr->left == CHAR_BIT ? bitptr->byte : bitptr->byte + 1; } /* * NAME: bit->skip() * DESCRIPTION: advance bit pointer */ void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) { bitptr->byte += len / CHAR_BIT; bitptr->left -= len % CHAR_BIT; if (bitptr->left > CHAR_BIT) { bitptr->byte++; bitptr->left += CHAR_BIT; } if (bitptr->left < CHAR_BIT) bitptr->cache = *bitptr->byte; } /* * NAME: bit->read() * DESCRIPTION: read an arbitrary number of bits and return their UIMSBF value */ unsigned long mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) { register unsigned long value; if (bitptr->left == CHAR_BIT) bitptr->cache = *bitptr->byte; if (len < bitptr->left) { value = (bitptr->cache & ((1 << bitptr->left) - 1)) >> (bitptr->left - len); bitptr->left -= len; return value; } /* remaining bits in current byte */ value = bitptr->cache & ((1 << bitptr->left) - 1); len -= bitptr->left; bitptr->byte++; bitptr->left = CHAR_BIT; /* more bytes */ while (len >= CHAR_BIT) { value = (value << CHAR_BIT) | *bitptr->byte++; len -= CHAR_BIT; } if (len > 0) { bitptr->cache = *bitptr->byte; value = (value << len) | (bitptr->cache >> (CHAR_BIT - len)); bitptr->left -= len; } return value; } # if 0 /* * NAME: bit->write() * DESCRIPTION: write an arbitrary number of bits */ void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, unsigned long value) { unsigned char *ptr; ptr = (unsigned char *) bitptr->byte; /* ... */ } # endif /* * NAME: bit->crc() * DESCRIPTION: compute CRC-check word */ unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, unsigned short init) { register unsigned int crc; for (crc = init; len >= 32; len -= 32) { register unsigned long data; data = mad_bit_read(&bitptr, 32); crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 24)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 16)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 8)) & 0xff]; crc = (crc << 8) ^ crc_table[((crc >> 8) ^ (data >> 0)) & 0xff]; } switch (len / 8) { case 3: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; case 2: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; case 1: crc = (crc << 8) ^ crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; len %= 8; case 0: break; } while (len--) { register unsigned int msb; msb = mad_bit_read(&bitptr, 1) ^ (crc >> 15); crc <<= 1; if (msb & 1) crc ^= CRC_POLY; } return crc & 0xffff; } ================================================ FILE: 3rdParty/libmad/include/bit.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_BIT_H # define LIBMAD_BIT_H struct mad_bitptr { unsigned char const *byte; unsigned short cache; unsigned short left; }; void mad_bit_init(struct mad_bitptr *, unsigned char const *); # define mad_bit_finish(bitptr) /* nothing */ unsigned int mad_bit_length(struct mad_bitptr const *, struct mad_bitptr const *); # define mad_bit_bitsleft(bitptr) ((bitptr)->left) unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); void mad_bit_skip(struct mad_bitptr *, unsigned int); unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); # endif ================================================ FILE: 3rdParty/libmad/include/config.h ================================================ /* config.h. Generated by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to enable diagnostic debugging support. */ /* #undef DEBUG */ /* Define to enable experimental code. */ /* #undef EXPERIMENTAL */ /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the `fcntl' function. */ /* #undef HAVE_FCNTL */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if your MIPS CPU supports a 2-operand MADD16 instruction. */ /* #undef HAVE_MADD16_ASM */ /* Define if your MIPS CPU supports a 2-operand MADD instruction. */ /* #undef HAVE_MADD_ASM */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `pipe' function. */ /* #undef HAVE_PIPE */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ /* #undef HAVE_SYS_WAIT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ /* Define to 1 if you have the `waitpid' function. */ /* #undef HAVE_WAITPID */ /* Define to disable debugging assertions. */ /* #undef NDEBUG */ /* Define to optimize for accuracy over speed. */ /* #undef OPT_ACCURACY */ /* Define to optimize for speed over accuracy. */ /* #undef OPT_SPEED */ /* Define to enable a fast subband synthesis approximation optimization. */ /* #undef OPT_SSO */ /* Define to influence a strict interpretation of the ISO/IEC standards, even if this is in opposition with best accepted practices. */ /* #undef OPT_STRICT */ /* Name of package */ #define PACKAGE "libmad" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "support@underbit.com" /* Define to the full name of this package. */ #define PACKAGE_NAME "MPEG Audio Decoder" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "MPEG Audio Decoder 0.15.1b" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libmad" /* Define to the version of this package. */ #define PACKAGE_VERSION "0.15.1b" /* The size of a `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of a `long', as computed by sizeof. */ #define SIZEOF_LONG 4 /* The size of a `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "0.15.1b" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ #define inline __inline /* Define to `int' if does not define. */ /* #undef pid_t */ ================================================ FILE: 3rdParty/libmad/include/decoder.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: decoder.c,v 1.22 2004/01/23 09:41:32 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # ifdef HAVE_SYS_TYPES_H # include # endif # ifdef HAVE_SYS_WAIT_H # include # endif # ifdef HAVE_UNISTD_H # include # endif # ifdef HAVE_FCNTL_H # include # endif # include # ifdef HAVE_ERRNO_H # include # endif # include "stream.h" # include "frame.h" # include "synth.h" # include "decoder.h" /* * NAME: decoder->init() * DESCRIPTION: initialize a decoder object with callback routines */ void mad_decoder_init(struct mad_decoder *decoder, void *data, enum mad_flow (*input_func)(void *, struct mad_stream *), enum mad_flow (*header_func)(void *, struct mad_header const *), enum mad_flow (*filter_func)(void *, struct mad_stream const *, struct mad_frame *), enum mad_flow (*output_func)(void *, struct mad_header const *, struct mad_pcm *), enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *), enum mad_flow (*message_func)(void *, void *, unsigned int *)) { decoder->mode = -1; decoder->options = 0; decoder->async.pid = 0; decoder->async.in = -1; decoder->async.out = -1; decoder->sync = 0; decoder->cb_data = data; decoder->input_func = input_func; decoder->header_func = header_func; decoder->filter_func = filter_func; decoder->output_func = output_func; decoder->error_func = error_func; decoder->message_func = message_func; } int mad_decoder_finish(struct mad_decoder *decoder) { # if defined(USE_ASYNC) if (decoder->mode == MAD_DECODER_MODE_ASYNC && decoder->async.pid) { pid_t pid; int status; close(decoder->async.in); do pid = waitpid(decoder->async.pid, &status, 0); while (pid == -1 && errno == EINTR); decoder->mode = -1; close(decoder->async.out); decoder->async.pid = 0; decoder->async.in = -1; decoder->async.out = -1; if (pid == -1) return -1; return (!WIFEXITED(status) || WEXITSTATUS(status)) ? -1 : 0; } # endif return 0; } # if defined(USE_ASYNC) static enum mad_flow send_io(int fd, void const *data, size_t len) { char const *ptr = data; ssize_t count; while (len) { do count = write(fd, ptr, len); while (count == -1 && errno == EINTR); if (count == -1) return MAD_FLOW_BREAK; len -= count; ptr += count; } return MAD_FLOW_CONTINUE; } static enum mad_flow receive_io(int fd, void *buffer, size_t len) { char *ptr = buffer; ssize_t count; while (len) { do count = read(fd, ptr, len); while (count == -1 && errno == EINTR); if (count == -1) return (errno == EAGAIN) ? MAD_FLOW_IGNORE : MAD_FLOW_BREAK; else if (count == 0) return MAD_FLOW_STOP; len -= count; ptr += count; } return MAD_FLOW_CONTINUE; } static enum mad_flow receive_io_blocking(int fd, void *buffer, size_t len) { int flags, blocking; enum mad_flow result; flags = fcntl(fd, F_GETFL); if (flags == -1) return MAD_FLOW_BREAK; blocking = flags & ~O_NONBLOCK; if (blocking != flags && fcntl(fd, F_SETFL, blocking) == -1) return MAD_FLOW_BREAK; result = receive_io(fd, buffer, len); if (flags != blocking && fcntl(fd, F_SETFL, flags) == -1) return MAD_FLOW_BREAK; return result; } static enum mad_flow send(int fd, void const *message, unsigned int size) { enum mad_flow result; /* send size */ result = send_io(fd, &size, sizeof(size)); /* send message */ if (result == MAD_FLOW_CONTINUE) result = send_io(fd, message, size); return result; } static enum mad_flow receive(int fd, void **message, unsigned int *size) { enum mad_flow result; unsigned int actual; if (*message == 0) *size = 0; /* receive size */ result = receive_io(fd, &actual, sizeof(actual)); /* receive message */ if (result == MAD_FLOW_CONTINUE) { if (actual > *size) actual -= *size; else { *size = actual; actual = 0; } if (*size > 0) { if (*message == 0) { *message = malloc(*size); if (*message == 0) return MAD_FLOW_BREAK; } result = receive_io_blocking(fd, *message, *size); } /* throw away remainder of message */ while (actual && result == MAD_FLOW_CONTINUE) { char sink[256]; unsigned int len; len = actual > sizeof(sink) ? sizeof(sink) : actual; result = receive_io_blocking(fd, sink, len); actual -= len; } } return result; } static enum mad_flow check_message(struct mad_decoder *decoder) { enum mad_flow result; void *message = 0; unsigned int size; result = receive(decoder->async.in, &message, &size); if (result == MAD_FLOW_CONTINUE) { if (decoder->message_func == 0) size = 0; else { result = decoder->message_func(decoder->cb_data, message, &size); if (result == MAD_FLOW_IGNORE || result == MAD_FLOW_BREAK) size = 0; } if (send(decoder->async.out, message, size) != MAD_FLOW_CONTINUE) result = MAD_FLOW_BREAK; } if (message) free(message); return result; } # endif static enum mad_flow error_default(void *data, struct mad_stream *stream, struct mad_frame *frame) { int *bad_last_frame = data; switch (stream->error) { case MAD_ERROR_BADCRC: if (*bad_last_frame) mad_frame_mute(frame); else *bad_last_frame = 1; return MAD_FLOW_IGNORE; default: return MAD_FLOW_CONTINUE; } } static int run_sync(struct mad_decoder *decoder) { enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); void *error_data; int bad_last_frame = 0; struct mad_stream *stream; struct mad_frame *frame; struct mad_synth *synth; int result = 0; if (decoder->input_func == 0) return 0; if (decoder->error_func) { error_func = decoder->error_func; error_data = decoder->cb_data; } else { error_func = error_default; error_data = &bad_last_frame; } stream = &decoder->sync->stream; frame = &decoder->sync->frame; synth = &decoder->sync->synth; mad_stream_init(stream); mad_frame_init(frame); mad_synth_init(synth); mad_stream_options(stream, decoder->options); do { switch (decoder->input_func(decoder->cb_data, stream)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: continue; case MAD_FLOW_CONTINUE: break; } while (1) { # if defined(USE_ASYNC) if (decoder->mode == MAD_DECODER_MODE_ASYNC) { switch (check_message(decoder)) { case MAD_FLOW_IGNORE: case MAD_FLOW_CONTINUE: break; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_STOP: goto done; } } # endif if (decoder->header_func) { if (mad_header_decode(&frame->header, stream) == -1) { if (!MAD_RECOVERABLE(stream->error)) break; switch (error_func(error_data, stream, frame)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: case MAD_FLOW_CONTINUE: default: continue; } } switch (decoder->header_func(decoder->cb_data, &frame->header)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: continue; case MAD_FLOW_CONTINUE: break; } } if (mad_frame_decode(frame, stream) == -1) { if (!MAD_RECOVERABLE(stream->error)) break; switch (error_func(error_data, stream, frame)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: break; case MAD_FLOW_CONTINUE: default: continue; } } else bad_last_frame = 0; if (decoder->filter_func) { switch (decoder->filter_func(decoder->cb_data, stream, frame)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: continue; case MAD_FLOW_CONTINUE: break; } } mad_synth_frame(synth, frame); if (decoder->output_func) { switch (decoder->output_func(decoder->cb_data, &frame->header, &synth->pcm)) { case MAD_FLOW_STOP: goto done; case MAD_FLOW_BREAK: goto fail; case MAD_FLOW_IGNORE: case MAD_FLOW_CONTINUE: break; } } } } while (stream->error == MAD_ERROR_BUFLEN); fail: result = -1; done: mad_synth_finish(synth); mad_frame_finish(frame); mad_stream_finish(stream); return result; } # if defined(USE_ASYNC) static int run_async(struct mad_decoder *decoder) { pid_t pid; int ptoc[2], ctop[2], flags; if (pipe(ptoc) == -1) return -1; if (pipe(ctop) == -1) { close(ptoc[0]); close(ptoc[1]); return -1; } flags = fcntl(ptoc[0], F_GETFL); if (flags == -1 || fcntl(ptoc[0], F_SETFL, flags | O_NONBLOCK) == -1) { close(ctop[0]); close(ctop[1]); close(ptoc[0]); close(ptoc[1]); return -1; } pid = fork(); if (pid == -1) { close(ctop[0]); close(ctop[1]); close(ptoc[0]); close(ptoc[1]); return -1; } decoder->async.pid = pid; if (pid) { /* parent */ close(ptoc[0]); close(ctop[1]); decoder->async.in = ctop[0]; decoder->async.out = ptoc[1]; return 0; } /* child */ close(ptoc[1]); close(ctop[0]); decoder->async.in = ptoc[0]; decoder->async.out = ctop[1]; _exit(run_sync(decoder)); /* not reached */ return -1; } # endif /* * NAME: decoder->run() * DESCRIPTION: run the decoder thread either synchronously or asynchronously */ int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode) { int result; int (*run)(struct mad_decoder *) = 0; switch (decoder->mode = mode) { case MAD_DECODER_MODE_SYNC: run = run_sync; break; case MAD_DECODER_MODE_ASYNC: # if defined(USE_ASYNC) run = run_async; # endif break; } if (run == 0) return -1; decoder->sync = malloc(sizeof(*decoder->sync)); if (decoder->sync == 0) return -1; result = run(decoder); free(decoder->sync); decoder->sync = 0; return result; } /* * NAME: decoder->message() * DESCRIPTION: send a message to and receive a reply from the decoder process */ int mad_decoder_message(struct mad_decoder *decoder, void *message, unsigned int *len) { # if defined(USE_ASYNC) if (decoder->mode != MAD_DECODER_MODE_ASYNC || send(decoder->async.out, message, *len) != MAD_FLOW_CONTINUE || receive(decoder->async.in, &message, len) != MAD_FLOW_CONTINUE) return -1; return 0; # else return -1; # endif } ================================================ FILE: 3rdParty/libmad/include/decoder.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_DECODER_H # define LIBMAD_DECODER_H # include "stream.h" # include "frame.h" # include "synth.h" enum mad_decoder_mode { MAD_DECODER_MODE_SYNC = 0, MAD_DECODER_MODE_ASYNC }; enum mad_flow { MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ }; struct mad_decoder { enum mad_decoder_mode mode; int options; struct { long pid; int in; int out; } async; struct { struct mad_stream stream; struct mad_frame frame; struct mad_synth synth; } *sync; void *cb_data; enum mad_flow (*input_func)(void *, struct mad_stream *); enum mad_flow (*header_func)(void *, struct mad_header const *); enum mad_flow (*filter_func)(void *, struct mad_stream const *, struct mad_frame *); enum mad_flow (*output_func)(void *, struct mad_header const *, struct mad_pcm *); enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); enum mad_flow (*message_func)(void *, void *, unsigned int *); }; void mad_decoder_init(struct mad_decoder *, void *, enum mad_flow (*)(void *, struct mad_stream *), enum mad_flow (*)(void *, struct mad_header const *), enum mad_flow (*)(void *, struct mad_stream const *, struct mad_frame *), enum mad_flow (*)(void *, struct mad_header const *, struct mad_pcm *), enum mad_flow (*)(void *, struct mad_stream *, struct mad_frame *), enum mad_flow (*)(void *, void *, unsigned int *)); int mad_decoder_finish(struct mad_decoder *); # define mad_decoder_options(decoder, opts) \ ((void) ((decoder)->options = (opts))) int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); # endif ================================================ FILE: 3rdParty/libmad/include/fixed.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "fixed.h" /* * NAME: fixed->abs() * DESCRIPTION: return absolute value of a fixed-point number */ mad_fixed_t mad_f_abs(mad_fixed_t x) { return x < 0 ? -x : x; } /* * NAME: fixed->div() * DESCRIPTION: perform division using fixed-point math */ mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) { mad_fixed_t q, r; unsigned int bits; q = mad_f_abs(x / y); if (x < 0) { x = -x; y = -y; } r = x % y; if (y < 0) { x = -x; y = -y; } if (q > mad_f_intpart(MAD_F_MAX) && !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0))) return 0; for (bits = MAD_F_FRACBITS; bits && r; --bits) { q <<= 1, r <<= 1; if (r >= y) r -= y, ++q; } /* round */ if (2 * r >= y) ++q; /* fix sign */ if ((x < 0) != (y < 0)) q = -q; return q << bits; } ================================================ FILE: 3rdParty/libmad/include/fixed.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp $ */ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H # if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; # else typedef signed long mad_fixed_t; typedef signed long mad_fixed64hi_t; typedef unsigned long mad_fixed64lo_t; # endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 # elif 1 || defined(__GNUC__) # define mad_fixed64_t signed long long # endif # if defined(FPM_FLOAT) typedef double mad_sample_t; # else typedef mad_fixed_t mad_sample_t; # endif /* * Fixed-point format: 0xABBBBBBB * A == whole part (sign + 3 bits) * B == fractional part (28 bits) * * Values are signed two's complement, so the effective range is: * 0x80000000 to 0x7fffffff * -8.0 to +7.9999999962747097015380859375 * * The smallest representable value is: * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9) * * 28 bits of fractional accuracy represent about * 8.6 digits of decimal accuracy. * * Fixed-point numbers can be added or subtracted as normal * integers, but multiplication requires shifting the 64-bit result * from 56 fractional bits back to 28 (and rounding.) * * Changing the definition of MAD_F_FRACBITS is only partially * supported, and must be done with care. */ # define MAD_F_FRACBITS 28 # if MAD_F_FRACBITS == 28 # define MAD_F(x) ((mad_fixed_t) (x##L)) # else # if MAD_F_FRACBITS < 28 # warning "MAD_F_FRACBITS < 28" # define MAD_F(x) ((mad_fixed_t) \ (((x##L) + \ (1L << (28 - MAD_F_FRACBITS - 1))) >> \ (28 - MAD_F_FRACBITS))) # elif MAD_F_FRACBITS > 28 # error "MAD_F_FRACBITS > 28 not currently supported" # define MAD_F(x) ((mad_fixed_t) \ ((x##L) << (MAD_F_FRACBITS - 28))) # endif # endif # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) # define MAD_F_ONE MAD_F(0x10000000) # define mad_f_tofixed(x) ((mad_fixed_t) \ ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) # define mad_f_todouble(x) ((double) \ ((x) / (double) (1L << MAD_F_FRACBITS))) # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) /* (x should be positive) */ # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) # define mad_f_add(x, y) ((x) + (y)) # define mad_f_sub(x, y) ((x) - (y)) # if defined(FPM_FLOAT) # error "FPM_FLOAT not yet supported" # undef MAD_F # define MAD_F(x) mad_f_todouble(x) # define mad_f_mul(x, y) ((x) * (y)) # define mad_f_scale64 # undef ASO_ZEROCHECK # elif defined(FPM_64BIT) /* * This version should be the most accurate if 64-bit types are supported by * the compiler, although it may not be the most efficient. */ # if defined(OPT_ACCURACY) # define mad_f_mul(x, y) \ ((mad_fixed_t) \ ((((mad_fixed64_t) (x) * (y)) + \ (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) # else # define mad_f_mul(x, y) \ ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Intel --------------------------------------------------------------- */ # elif defined(FPM_INTEL) # if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4035) /* no return value */ static __forceinline mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) { enum { fracbits = MAD_F_FRACBITS }; __asm { mov eax, x imul y shrd eax, edx, fracbits } /* implicit return of eax */ } # pragma warning(pop) # define mad_f_mul mad_f_mul_inline # define mad_f_scale64 # else /* * This Intel version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("imull %3" \ : "=a" (lo), "=d" (hi) \ : "%a" (x), "rm" (y) \ : "cc") # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addl %2,%0\n\t" \ "adcl %3,%1" \ : "=rm" (lo), "=rm" (hi) \ : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ : "cc"); \ }) # endif /* OPT_ACCURACY */ # if defined(OPT_ACCURACY) /* * Surprisingly, this is faster than SHRD followed by ADC. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed64hi_t __hi_; \ mad_fixed64lo_t __lo_; \ mad_fixed_t __result; \ asm ("addl %4,%2\n\t" \ "adcl %5,%3" \ : "=rm" (__lo_), "=rm" (__hi_) \ : "0" (lo), "1" (hi), \ "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ : "cc"); \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # elif defined(OPT_INTEL) /* * Alternate Intel scaling that may or may not perform better. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrl %3,%1\n\t" \ "shll %4,%2\n\t" \ "orl %2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), \ "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif /* OPT_ACCURACY */ # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- ARM ----------------------------------------------------------------- */ # elif defined(FPM_ARM) /* * This ARM V4 version is as accurate as FPM_64BIT but much faster. The * least significant bit is properly rounded at no CPU cycle cost! */ # if 1 /* * This is faster than the default implementation via MAD_F_MLX() and * mad_f_scale64(). */ # define mad_f_mul(x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ mad_fixed_t __result; \ asm ("smull %0, %1, %3, %4\n\t" \ "movs %0, %0, lsr %5\n\t" \ "adc %2, %0, %1, lsl %6" \ : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ : "%r" (x), "r" (y), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif # define MAD_F_MLX(hi, lo, x, y) \ asm ("smull %0, %1, %2, %3" \ : "=&r" (lo), "=&r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("smlal %0, %1, %2, %3" \ : "+r" (lo), "+r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLN(hi, lo) \ asm ("rsbs %0, %2, #0\n\t" \ "rsc %1, %3, #0" \ : "=r" (lo), "=r" (hi) \ : "0" (lo), "1" (hi) \ : "cc") # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("movs %0, %1, lsr %3\n\t" \ "adc %0, %0, %2, lsl %4" \ : "=&r" (__result) \ : "r" (lo), "r" (hi), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- MIPS ---------------------------------------------------------------- */ # elif defined(FPM_MIPS) /* * This MIPS version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" (x), "r" (y)) # if defined(HAVE_MADD_ASM) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" (x), "r" (y)) # elif defined(HAVE_MADD16_ASM) /* * This loses significant accuracy due to the 16-bit integer limit in the * multiply/accumulate instruction. */ # define MAD_F_ML0(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd16 %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) # endif # if defined(OPT_SPEED) # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- SPARC --------------------------------------------------------------- */ # elif defined(FPM_SPARC) /* * This SPARC V8 version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("smul %2, %3, %0\n\t" \ "rd %%y, %1" \ : "=r" (lo), "=r" (hi) \ : "%r" (x), "rI" (y)) /* --- PowerPC ------------------------------------------------------------- */ # elif defined(FPM_PPC) /* * This PowerPC version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ do { \ asm ("mullw %0,%1,%2" \ : "=r" (lo) \ : "%r" (x), "r" (y)); \ asm ("mulhw %0,%1,%2" \ : "=r" (hi) \ : "%r" (x), "r" (y)); \ } \ while (0) # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addc %0,%2,%3\n\t" \ "adde %1,%4,%5" \ : "=r" (lo), "=r" (hi) \ : "%r" (lo), "r" (__lo), \ "%r" (hi), "r" (__hi) \ : "xer"); \ }) # endif # if defined(OPT_ACCURACY) /* * This is slower than the truncating version below it. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result, __round; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("extrwi %0,%1,1,0" \ : "=r" (__round) \ : "r" (__result)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ asm ("add %0,%1,%2" \ : "=r" (__result) \ : "%r" (__result), "r" (__round)); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ __result; \ }) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Default ------------------------------------------------------------- */ # elif defined(FPM_DEFAULT) /* * This version is the most portable but it loses significant accuracy. * Furthermore, accuracy is biased against the second argument, so care * should be taken when ordering operands. * * The scale factors are constant as this is not used with SSO. * * Pre-rounding is required to stay within the limits of compliance. */ # if defined(OPT_SPEED) # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) # else # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ (((y) + (1L << 15)) >> 16)) # endif /* ------------------------------------------------------------------------- */ # else # error "no FPM selected" # endif /* default implementations */ # if !defined(mad_f_mul) # define mad_f_mul(x, y) \ ({ register mad_fixed64hi_t __hi; \ register mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ mad_f_scale64(__hi, __lo); \ }) # endif # if !defined(MAD_F_MLA) # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # endif # if !defined(MAD_F_ML0) # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) # endif # if !defined(MAD_F_MLN) # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) # endif # if !defined(MAD_F_MLZ) # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) # endif # if !defined(mad_f_scale64) # if defined(OPT_ACCURACY) # define mad_f_scale64(hi, lo) \ ((((mad_fixed_t) \ (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) # else # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) \ (((hi) << (32 - MAD_F_SCALEBITS)) | \ ((lo) >> MAD_F_SCALEBITS))) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* C routines */ mad_fixed_t mad_f_abs(mad_fixed_t); mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); # endif ================================================ FILE: 3rdParty/libmad/include/frame.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include "bit.h" # include "stream.h" # include "frame.h" # include "timer.h" # include "layer12.h" # include "layer3.h" static unsigned long const bitrate_table[5][15] = { /* MPEG-1 */ { 0, 32000, 64000, 96000, 128000, 160000, 192000, 224000, /* Layer I */ 256000, 288000, 320000, 352000, 384000, 416000, 448000 }, { 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer II */ 128000, 160000, 192000, 224000, 256000, 320000, 384000 }, { 0, 32000, 40000, 48000, 56000, 64000, 80000, 96000, /* Layer III */ 112000, 128000, 160000, 192000, 224000, 256000, 320000 }, /* MPEG-2 LSF */ { 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer I */ 128000, 144000, 160000, 176000, 192000, 224000, 256000 }, { 0, 8000, 16000, 24000, 32000, 40000, 48000, 56000, /* Layers */ 64000, 80000, 96000, 112000, 128000, 144000, 160000 } /* II & III */ }; static unsigned int const samplerate_table[3] = { 44100, 48000, 32000 }; static int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = { mad_layer_I, mad_layer_II, mad_layer_III }; /* * NAME: header->init() * DESCRIPTION: initialize header struct */ void mad_header_init(struct mad_header *header) { header->layer = 0; header->mode = 0; header->mode_extension = 0; header->emphasis = 0; header->bitrate = 0; header->samplerate = 0; header->crc_check = 0; header->crc_target = 0; header->flags = 0; header->private_bits = 0; header->duration = mad_timer_zero; } /* * NAME: frame->init() * DESCRIPTION: initialize frame struct */ void mad_frame_init(struct mad_frame *frame) { mad_header_init(&frame->header); frame->options = 0; frame->overlap = 0; mad_frame_mute(frame); } /* * NAME: frame->finish() * DESCRIPTION: deallocate any dynamic memory associated with frame */ void mad_frame_finish(struct mad_frame *frame) { mad_header_finish(&frame->header); if (frame->overlap) { free(frame->overlap); frame->overlap = 0; } } /* * NAME: decode_header() * DESCRIPTION: read header data and following CRC word */ static int decode_header(struct mad_header *header, struct mad_stream *stream) { unsigned int index; header->flags = 0; header->private_bits = 0; /* header() */ /* syncword */ mad_bit_skip(&stream->ptr, 11); /* MPEG 2.5 indicator (really part of syncword) */ if (mad_bit_read(&stream->ptr, 1) == 0) header->flags |= MAD_FLAG_MPEG_2_5_EXT; /* ID */ if (mad_bit_read(&stream->ptr, 1) == 0) header->flags |= MAD_FLAG_LSF_EXT; else if (header->flags & MAD_FLAG_MPEG_2_5_EXT) { stream->error = MAD_ERROR_LOSTSYNC; return -1; } /* layer */ header->layer = 4 - mad_bit_read(&stream->ptr, 2); if (header->layer == 4) { stream->error = MAD_ERROR_BADLAYER; return -1; } /* protection_bit */ if (mad_bit_read(&stream->ptr, 1) == 0) { header->flags |= MAD_FLAG_PROTECTION; header->crc_check = mad_bit_crc(stream->ptr, 16, 0xffff); } /* bitrate_index */ index = mad_bit_read(&stream->ptr, 4); if (index == 15) { stream->error = MAD_ERROR_BADBITRATE; return -1; } if (header->flags & MAD_FLAG_LSF_EXT) header->bitrate = bitrate_table[3 + (header->layer >> 1)][index]; else header->bitrate = bitrate_table[header->layer - 1][index]; /* sampling_frequency */ index = mad_bit_read(&stream->ptr, 2); if (index == 3) { stream->error = MAD_ERROR_BADSAMPLERATE; return -1; } header->samplerate = samplerate_table[index]; if (header->flags & MAD_FLAG_LSF_EXT) { header->samplerate /= 2; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) header->samplerate /= 2; } /* padding_bit */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_PADDING; /* private_bit */ if (mad_bit_read(&stream->ptr, 1)) header->private_bits |= MAD_PRIVATE_HEADER; /* mode */ header->mode = 3 - mad_bit_read(&stream->ptr, 2); /* mode_extension */ header->mode_extension = mad_bit_read(&stream->ptr, 2); /* copyright */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_COPYRIGHT; /* original/copy */ if (mad_bit_read(&stream->ptr, 1)) header->flags |= MAD_FLAG_ORIGINAL; /* emphasis */ header->emphasis = mad_bit_read(&stream->ptr, 2); # if defined(OPT_STRICT) /* * ISO/IEC 11172-3 says this is a reserved emphasis value, but * streams exist which use it anyway. Since the value is not important * to the decoder proper, we allow it unless OPT_STRICT is defined. */ if (header->emphasis == MAD_EMPHASIS_RESERVED) { stream->error = MAD_ERROR_BADEMPHASIS; return -1; } # endif /* error_check() */ /* crc_check */ if (header->flags & MAD_FLAG_PROTECTION) header->crc_target = mad_bit_read(&stream->ptr, 16); return 0; } /* * NAME: free_bitrate() * DESCRIPTION: attempt to discover the bitstream's free bitrate */ static int free_bitrate(struct mad_stream *stream, struct mad_header const *header) { struct mad_bitptr keep_ptr; unsigned long rate = 0; unsigned int pad_slot, slots_per_frame; unsigned char const *ptr = 0; keep_ptr = stream->ptr; pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; slots_per_frame = (header->layer == MAD_LAYER_III && (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; while (mad_stream_sync(stream) == 0) { struct mad_stream peek_stream; struct mad_header peek_header; peek_stream = *stream; peek_header = *header; if (decode_header(&peek_header, &peek_stream) == 0 && peek_header.layer == header->layer && peek_header.samplerate == header->samplerate) { unsigned int N; ptr = mad_bit_nextbyte(&stream->ptr); N = ptr - stream->this_frame; if (header->layer == MAD_LAYER_I) { rate = (unsigned long) header->samplerate * (N - 4 * pad_slot + 4) / 48 / 1000; } else { rate = (unsigned long) header->samplerate * (N - pad_slot + 1) / slots_per_frame / 1000; } if (rate >= 8) break; } mad_bit_skip(&stream->ptr, 8); } stream->ptr = keep_ptr; if (rate < 8 || (header->layer == MAD_LAYER_III && rate > 640)) { stream->error = MAD_ERROR_LOSTSYNC; return -1; } stream->freerate = rate * 1000; return 0; } /* * NAME: header->decode() * DESCRIPTION: read the next frame header from the stream */ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) { register unsigned char const *ptr, *end; unsigned int pad_slot, N; ptr = stream->next_frame; end = stream->bufend; if (ptr == 0) { stream->error = MAD_ERROR_BUFPTR; goto fail; } /* stream skip */ if (stream->skiplen) { if (!stream->sync) ptr = stream->this_frame; if (end - ptr < stream->skiplen) { stream->skiplen -= end - ptr; stream->next_frame = end; stream->error = MAD_ERROR_BUFLEN; goto fail; } ptr += stream->skiplen; stream->skiplen = 0; stream->sync = 1; } sync: /* synchronize */ if (stream->sync) { if (end - ptr < MAD_BUFFER_GUARD) { stream->next_frame = ptr; stream->error = MAD_ERROR_BUFLEN; goto fail; } else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { /* mark point where frame sync word was expected */ stream->this_frame = ptr; stream->next_frame = ptr + 1; stream->error = MAD_ERROR_LOSTSYNC; goto fail; } } else { mad_bit_init(&stream->ptr, ptr); if (mad_stream_sync(stream) == -1) { if (end - stream->next_frame >= MAD_BUFFER_GUARD) stream->next_frame = end - MAD_BUFFER_GUARD; stream->error = MAD_ERROR_BUFLEN; goto fail; } ptr = mad_bit_nextbyte(&stream->ptr); } /* begin processing */ stream->this_frame = ptr; stream->next_frame = ptr + 1; /* possibly bogus sync word */ mad_bit_init(&stream->ptr, stream->this_frame); if (decode_header(header, stream) == -1) goto fail; /* calculate frame duration */ mad_timer_set(&header->duration, 0, 32 * MAD_NSBSAMPLES(header), header->samplerate); /* calculate free bit rate */ if (header->bitrate == 0) { if ((stream->freerate == 0 || !stream->sync || (header->layer == MAD_LAYER_III && stream->freerate > 640000)) && free_bitrate(stream, header) == -1) goto fail; header->bitrate = stream->freerate; header->flags |= MAD_FLAG_FREEFORMAT; } /* calculate beginning of next frame */ pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; if (header->layer == MAD_LAYER_I) N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4; else { unsigned int slots_per_frame; slots_per_frame = (header->layer == MAD_LAYER_III && (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot; } /* verify there is enough data left in buffer to decode this frame */ if (N + MAD_BUFFER_GUARD > end - stream->this_frame) { stream->next_frame = stream->this_frame; stream->error = MAD_ERROR_BUFLEN; goto fail; } stream->next_frame = stream->this_frame + N; if (!stream->sync) { /* check that a valid frame header follows this frame */ ptr = stream->next_frame; if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) { ptr = stream->next_frame = stream->this_frame + 1; goto sync; } stream->sync = 1; } header->flags |= MAD_FLAG_INCOMPLETE; return 0; fail: stream->sync = 0; return -1; } /* * NAME: frame->decode() * DESCRIPTION: decode a single frame from a bitstream */ int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream) { frame->options = stream->options; /* header() */ /* error_check() */ if (!(frame->header.flags & MAD_FLAG_INCOMPLETE) && mad_header_decode(&frame->header, stream) == -1) goto fail; /* audio_data() */ frame->header.flags &= ~MAD_FLAG_INCOMPLETE; if (decoder_table[frame->header.layer - 1](stream, frame) == -1) { if (!MAD_RECOVERABLE(stream->error)) stream->next_frame = stream->this_frame; goto fail; } /* ancillary_data() */ if (frame->header.layer != MAD_LAYER_III) { struct mad_bitptr next_frame; mad_bit_init(&next_frame, stream->next_frame); stream->anc_ptr = stream->ptr; stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame); mad_bit_finish(&next_frame); } return 0; fail: stream->anc_bitlen = 0; return -1; } /* * NAME: frame->mute() * DESCRIPTION: zero all subband values so the frame becomes silent */ void mad_frame_mute(struct mad_frame *frame) { unsigned int s, sb; for (s = 0; s < 36; ++s) { for (sb = 0; sb < 32; ++sb) { frame->sbsample[0][s][sb] = frame->sbsample[1][s][sb] = 0; } } if (frame->overlap) { for (s = 0; s < 18; ++s) { for (sb = 0; sb < 32; ++sb) { (*frame->overlap)[0][sb][s] = (*frame->overlap)[1][sb][s] = 0; } } } } ================================================ FILE: 3rdParty/libmad/include/frame.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_FRAME_H # define LIBMAD_FRAME_H # include "fixed.h" # include "timer.h" # include "stream.h" enum mad_layer { MAD_LAYER_I = 1, /* Layer I */ MAD_LAYER_II = 2, /* Layer II */ MAD_LAYER_III = 3 /* Layer III */ }; enum mad_mode { MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ MAD_MODE_STEREO = 3 /* normal LR stereo */ }; enum mad_emphasis { MAD_EMPHASIS_NONE = 0, /* no emphasis */ MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ }; struct mad_header { enum mad_layer layer; /* audio layer (1, 2, or 3) */ enum mad_mode mode; /* channel mode (see above) */ int mode_extension; /* additional mode info */ enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ unsigned long bitrate; /* stream bitrate (bps) */ unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short crc_check; /* frame CRC accumulator */ unsigned short crc_target; /* final target CRC checksum */ int flags; /* flags (see below) */ int private_bits; /* private bits (see below) */ mad_timer_t duration; /* audio playing time of frame */ }; struct mad_frame { struct mad_header header; /* MPEG audio header */ int options; /* decoding options (from stream) */ mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ }; # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) # define MAD_NSBSAMPLES(header) \ ((header)->layer == MAD_LAYER_I ? 12 : \ (((header)->layer == MAD_LAYER_III && \ ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) enum { MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ }; enum { MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ }; void mad_header_init(struct mad_header *); # define mad_header_finish(header) /* nothing */ int mad_header_decode(struct mad_header *, struct mad_stream *); void mad_frame_init(struct mad_frame *); void mad_frame_finish(struct mad_frame *); int mad_frame_decode(struct mad_frame *, struct mad_stream *); void mad_frame_mute(struct mad_frame *); # endif ================================================ FILE: 3rdParty/libmad/include/global.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_GLOBAL_H # define LIBMAD_GLOBAL_H /* conditional debugging */ # if defined(DEBUG) && defined(NDEBUG) # error "cannot define both DEBUG and NDEBUG" # endif # if defined(DEBUG) # include # endif /* conditional features */ # if defined(OPT_SPEED) && defined(OPT_ACCURACY) # error "cannot optimize for both speed and accuracy" # endif # if defined(OPT_SPEED) && !defined(OPT_SSO) # define OPT_SSO # endif # if defined(HAVE_UNISTD_H) && defined(HAVE_WAITPID) && \ defined(HAVE_FCNTL) && defined(HAVE_PIPE) && defined(HAVE_FORK) # define USE_ASYNC # endif # if !defined(HAVE_ASSERT_H) # if defined(NDEBUG) # define assert(x) /* nothing */ # else # define assert(x) do { if (!(x)) abort(); } while (0) # endif # endif # endif ================================================ FILE: 3rdParty/libmad/include/huffman.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "huffman.h" /* * These are the Huffman code words for Layer III. * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3. * * These tables support decoding up to 4 Huffman code bits at a time. */ # if defined(__GNUC__) || \ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) # define PTR(offs, bits) { .ptr = { 0, bits, offs } } # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } } # else # define PTR(offs, bits) { { 0, bits, offs } } # if defined(WORDS_BIGENDIAN) # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \ (x << 9) | (y << 8) } } # else # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \ (x << 2) | (y << 3) } } # endif # endif static union huffquad const hufftabA[] = { /* 0000 */ PTR(16, 2), /* 0001 */ PTR(20, 2), /* 0010 */ PTR(24, 1), /* 0011 */ PTR(26, 1), /* 0100 */ V(0, 0, 1, 0, 4), /* 0101 */ V(0, 0, 0, 1, 4), /* 0110 */ V(0, 1, 0, 0, 4), /* 0111 */ V(1, 0, 0, 0, 4), /* 1000 */ V(0, 0, 0, 0, 1), /* 1001 */ V(0, 0, 0, 0, 1), /* 1010 */ V(0, 0, 0, 0, 1), /* 1011 */ V(0, 0, 0, 0, 1), /* 1100 */ V(0, 0, 0, 0, 1), /* 1101 */ V(0, 0, 0, 0, 1), /* 1110 */ V(0, 0, 0, 0, 1), /* 1111 */ V(0, 0, 0, 0, 1), /* 0000 ... */ /* 00 */ V(1, 0, 1, 1, 2), /* 16 */ /* 01 */ V(1, 1, 1, 1, 2), /* 10 */ V(1, 1, 0, 1, 2), /* 11 */ V(1, 1, 1, 0, 2), /* 0001 ... */ /* 00 */ V(0, 1, 1, 1, 2), /* 20 */ /* 01 */ V(0, 1, 0, 1, 2), /* 10 */ V(1, 0, 0, 1, 1), /* 11 */ V(1, 0, 0, 1, 1), /* 0010 ... */ /* 0 */ V(0, 1, 1, 0, 1), /* 24 */ /* 1 */ V(0, 0, 1, 1, 1), /* 0011 ... */ /* 0 */ V(1, 0, 1, 0, 1), /* 26 */ /* 1 */ V(1, 1, 0, 0, 1) }; static union huffquad const hufftabB[] = { /* 0000 */ V(1, 1, 1, 1, 4), /* 0001 */ V(1, 1, 1, 0, 4), /* 0010 */ V(1, 1, 0, 1, 4), /* 0011 */ V(1, 1, 0, 0, 4), /* 0100 */ V(1, 0, 1, 1, 4), /* 0101 */ V(1, 0, 1, 0, 4), /* 0110 */ V(1, 0, 0, 1, 4), /* 0111 */ V(1, 0, 0, 0, 4), /* 1000 */ V(0, 1, 1, 1, 4), /* 1001 */ V(0, 1, 1, 0, 4), /* 1010 */ V(0, 1, 0, 1, 4), /* 1011 */ V(0, 1, 0, 0, 4), /* 1100 */ V(0, 0, 1, 1, 4), /* 1101 */ V(0, 0, 1, 0, 4), /* 1110 */ V(0, 0, 0, 1, 4), /* 1111 */ V(0, 0, 0, 0, 4) }; # undef V # undef PTR # if defined(__GNUC__) || \ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) # define PTR(offs, bits) { .ptr = { 0, bits, offs } } # define V(x, y, hlen) { .value = { 1, hlen, x, y } } # else # define PTR(offs, bits) { { 0, bits, offs } } # if defined(WORDS_BIGENDIAN) # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } } # else # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } # endif # endif static union huffpair const hufftab0[] = { /* */ V(0, 0, 0) }; static union huffpair const hufftab1[] = { /* 000 */ V(1, 1, 3), /* 001 */ V(0, 1, 3), /* 010 */ V(1, 0, 2), /* 011 */ V(1, 0, 2), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1) }; static union huffpair const hufftab2[] = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), /* 011 */ V(1, 0, 3), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1), /* 000 ... */ /* 000 */ V(2, 2, 3), /* 8 */ /* 001 */ V(0, 2, 3), /* 010 */ V(1, 2, 2), /* 011 */ V(1, 2, 2), /* 100 */ V(2, 1, 2), /* 101 */ V(2, 1, 2), /* 110 */ V(2, 0, 2), /* 111 */ V(2, 0, 2) }; static union huffpair const hufftab3[] = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 0, 3), /* 010 */ V(1, 1, 2), /* 011 */ V(1, 1, 2), /* 100 */ V(0, 1, 2), /* 101 */ V(0, 1, 2), /* 110 */ V(0, 0, 2), /* 111 */ V(0, 0, 2), /* 000 ... */ /* 000 */ V(2, 2, 3), /* 8 */ /* 001 */ V(0, 2, 3), /* 010 */ V(1, 2, 2), /* 011 */ V(1, 2, 2), /* 100 */ V(2, 1, 2), /* 101 */ V(2, 1, 2), /* 110 */ V(2, 0, 2), /* 111 */ V(2, 0, 2) }; static union huffpair const hufftab5[] = { /* 000 */ PTR(8, 4), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), /* 011 */ V(1, 0, 3), /* 100 */ V(0, 0, 1), /* 101 */ V(0, 0, 1), /* 110 */ V(0, 0, 1), /* 111 */ V(0, 0, 1), /* 000 ... */ /* 0000 */ PTR(24, 1), /* 8 */ /* 0001 */ V(3, 2, 4), /* 0010 */ V(3, 1, 3), /* 0011 */ V(3, 1, 3), /* 0100 */ V(1, 3, 4), /* 0101 */ V(0, 3, 4), /* 0110 */ V(3, 0, 4), /* 0111 */ V(2, 2, 4), /* 1000 */ V(1, 2, 3), /* 1001 */ V(1, 2, 3), /* 1010 */ V(2, 1, 3), /* 1011 */ V(2, 1, 3), /* 1100 */ V(0, 2, 3), /* 1101 */ V(0, 2, 3), /* 1110 */ V(2, 0, 3), /* 1111 */ V(2, 0, 3), /* 000 0000 ... */ /* 0 */ V(3, 3, 1), /* 24 */ /* 1 */ V(2, 3, 1) }; static union huffpair const hufftab6[] = { /* 0000 */ PTR(16, 3), /* 0001 */ PTR(24, 1), /* 0010 */ PTR(26, 1), /* 0011 */ V(1, 2, 4), /* 0100 */ V(2, 1, 4), /* 0101 */ V(2, 0, 4), /* 0110 */ V(0, 1, 3), /* 0111 */ V(0, 1, 3), /* 1000 */ V(1, 1, 2), /* 1001 */ V(1, 1, 2), /* 1010 */ V(1, 1, 2), /* 1011 */ V(1, 1, 2), /* 1100 */ V(1, 0, 3), /* 1101 */ V(1, 0, 3), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 000 */ V(3, 3, 3), /* 16 */ /* 001 */ V(0, 3, 3), /* 010 */ V(2, 3, 2), /* 011 */ V(2, 3, 2), /* 100 */ V(3, 2, 2), /* 101 */ V(3, 2, 2), /* 110 */ V(3, 0, 2), /* 111 */ V(3, 0, 2), /* 0001 ... */ /* 0 */ V(1, 3, 1), /* 24 */ /* 1 */ V(3, 1, 1), /* 0010 ... */ /* 0 */ V(2, 2, 1), /* 26 */ /* 1 */ V(0, 2, 1) }; static union huffpair const hufftab7[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), /* 0011 */ V(1, 1, 4), /* 0100 */ V(0, 1, 3), /* 0101 */ V(0, 1, 3), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(52, 2), /* 16 */ /* 0001 */ PTR(56, 1), /* 0010 */ PTR(58, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(60, 1), /* 0110 */ V(5, 0, 4), /* 0111 */ PTR(62, 1), /* 1000 */ V(2, 4, 4), /* 1001 */ V(4, 2, 4), /* 1010 */ V(1, 4, 3), /* 1011 */ V(1, 4, 3), /* 1100 */ V(4, 1, 3), /* 1101 */ V(4, 1, 3), /* 1110 */ V(4, 0, 3), /* 1111 */ V(4, 0, 3), /* 0001 ... */ /* 0000 */ V(0, 4, 4), /* 32 */ /* 0001 */ V(2, 3, 4), /* 0010 */ V(3, 2, 4), /* 0011 */ V(0, 3, 4), /* 0100 */ V(1, 3, 3), /* 0101 */ V(1, 3, 3), /* 0110 */ V(3, 1, 3), /* 0111 */ V(3, 1, 3), /* 1000 */ V(3, 0, 3), /* 1001 */ V(3, 0, 3), /* 1010 */ V(2, 2, 3), /* 1011 */ V(2, 2, 3), /* 1100 */ V(1, 2, 2), /* 1101 */ V(1, 2, 2), /* 1110 */ V(1, 2, 2), /* 1111 */ V(1, 2, 2), /* 0010 ... */ /* 00 */ V(2, 1, 1), /* 48 */ /* 01 */ V(2, 1, 1), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 00 */ V(5, 5, 2), /* 52 */ /* 01 */ V(4, 5, 2), /* 10 */ V(5, 4, 2), /* 11 */ V(5, 3, 2), /* 0000 0001 ... */ /* 0 */ V(3, 5, 1), /* 56 */ /* 1 */ V(4, 4, 1), /* 0000 0010 ... */ /* 0 */ V(2, 5, 1), /* 58 */ /* 1 */ V(5, 2, 1), /* 0000 0101 ... */ /* 0 */ V(0, 5, 1), /* 60 */ /* 1 */ V(3, 4, 1), /* 0000 0111 ... */ /* 0 */ V(4, 3, 1), /* 62 */ /* 1 */ V(3, 3, 1) }; # if 0 /* this version saves 8 entries (16 bytes) at the expense of an extra lookup in 4 out of 36 cases */ static union huffpair const hufftab8[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 2), /* 0010 */ V(1, 2, 4), /* 0011 */ V(2, 1, 4), /* 0100 */ V(1, 1, 2), /* 0101 */ V(1, 1, 2), /* 0110 */ V(1, 1, 2), /* 0111 */ V(1, 1, 2), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(36, 3), /* 16 */ /* 0001 */ PTR(44, 2), /* 0010 */ PTR(48, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(50, 1), /* 0110 */ PTR(52, 1), /* 0111 */ V(2, 4, 4), /* 1000 */ V(4, 2, 4), /* 1001 */ V(1, 4, 4), /* 1010 */ V(4, 1, 3), /* 1011 */ V(4, 1, 3), /* 1100 */ V(0, 4, 4), /* 1101 */ V(4, 0, 4), /* 1110 */ V(2, 3, 4), /* 1111 */ V(3, 2, 4), /* 0001 ... */ /* 00 */ PTR(54, 2), /* 32 */ /* 01 */ V(2, 2, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(5, 5, 3), /* 36 */ /* 001 */ V(5, 4, 3), /* 010 */ V(4, 5, 2), /* 011 */ V(4, 5, 2), /* 100 */ V(5, 3, 1), /* 101 */ V(5, 3, 1), /* 110 */ V(5, 3, 1), /* 111 */ V(5, 3, 1), /* 0000 0001 ... */ /* 00 */ V(3, 5, 2), /* 44 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0000 0010 ... */ /* 0 */ V(5, 2, 1), /* 48 */ /* 1 */ V(0, 5, 1), /* 0000 0101 ... */ /* 0 */ V(3, 4, 1), /* 50 */ /* 1 */ V(4, 3, 1), /* 0000 0110 ... */ /* 0 */ V(5, 0, 1), /* 52 */ /* 1 */ V(3, 3, 1), /* 0001 00 ... */ /* 00 */ V(1, 3, 2), /* 54 */ /* 01 */ V(3, 1, 2), /* 10 */ V(0, 3, 2), /* 11 */ V(3, 0, 2), }; # else static union huffpair const hufftab8[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ V(1, 2, 4), /* 0011 */ V(2, 1, 4), /* 0100 */ V(1, 1, 2), /* 0101 */ V(1, 1, 2), /* 0110 */ V(1, 1, 2), /* 0111 */ V(1, 1, 2), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(48, 3), /* 16 */ /* 0001 */ PTR(56, 2), /* 0010 */ PTR(60, 1), /* 0011 */ V(1, 5, 4), /* 0100 */ V(5, 1, 4), /* 0101 */ PTR(62, 1), /* 0110 */ PTR(64, 1), /* 0111 */ V(2, 4, 4), /* 1000 */ V(4, 2, 4), /* 1001 */ V(1, 4, 4), /* 1010 */ V(4, 1, 3), /* 1011 */ V(4, 1, 3), /* 1100 */ V(0, 4, 4), /* 1101 */ V(4, 0, 4), /* 1110 */ V(2, 3, 4), /* 1111 */ V(3, 2, 4), /* 0001 ... */ /* 0000 */ V(1, 3, 4), /* 32 */ /* 0001 */ V(3, 1, 4), /* 0010 */ V(0, 3, 4), /* 0011 */ V(3, 0, 4), /* 0100 */ V(2, 2, 2), /* 0101 */ V(2, 2, 2), /* 0110 */ V(2, 2, 2), /* 0111 */ V(2, 2, 2), /* 1000 */ V(0, 2, 2), /* 1001 */ V(0, 2, 2), /* 1010 */ V(0, 2, 2), /* 1011 */ V(0, 2, 2), /* 1100 */ V(2, 0, 2), /* 1101 */ V(2, 0, 2), /* 1110 */ V(2, 0, 2), /* 1111 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(5, 5, 3), /* 48 */ /* 001 */ V(5, 4, 3), /* 010 */ V(4, 5, 2), /* 011 */ V(4, 5, 2), /* 100 */ V(5, 3, 1), /* 101 */ V(5, 3, 1), /* 110 */ V(5, 3, 1), /* 111 */ V(5, 3, 1), /* 0000 0001 ... */ /* 00 */ V(3, 5, 2), /* 56 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0000 0010 ... */ /* 0 */ V(5, 2, 1), /* 60 */ /* 1 */ V(0, 5, 1), /* 0000 0101 ... */ /* 0 */ V(3, 4, 1), /* 62 */ /* 1 */ V(4, 3, 1), /* 0000 0110 ... */ /* 0 */ V(5, 0, 1), /* 64 */ /* 1 */ V(3, 3, 1) }; # endif static union huffpair const hufftab9[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 3), /* 0010 */ PTR(40, 2), /* 0011 */ PTR(44, 2), /* 0100 */ PTR(48, 1), /* 0101 */ V(1, 2, 4), /* 0110 */ V(2, 1, 4), /* 0111 */ V(2, 0, 4), /* 1000 */ V(1, 1, 3), /* 1001 */ V(1, 1, 3), /* 1010 */ V(0, 1, 3), /* 1011 */ V(0, 1, 3), /* 1100 */ V(1, 0, 3), /* 1101 */ V(1, 0, 3), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 0000 */ PTR(50, 1), /* 16 */ /* 0001 */ V(3, 5, 4), /* 0010 */ V(5, 3, 4), /* 0011 */ PTR(52, 1), /* 0100 */ V(4, 4, 4), /* 0101 */ V(2, 5, 4), /* 0110 */ V(5, 2, 4), /* 0111 */ V(1, 5, 4), /* 1000 */ V(5, 1, 3), /* 1001 */ V(5, 1, 3), /* 1010 */ V(3, 4, 3), /* 1011 */ V(3, 4, 3), /* 1100 */ V(4, 3, 3), /* 1101 */ V(4, 3, 3), /* 1110 */ V(5, 0, 4), /* 1111 */ V(0, 4, 4), /* 0001 ... */ /* 000 */ V(2, 4, 3), /* 32 */ /* 001 */ V(4, 2, 3), /* 010 */ V(3, 3, 3), /* 011 */ V(4, 0, 3), /* 100 */ V(1, 4, 2), /* 101 */ V(1, 4, 2), /* 110 */ V(4, 1, 2), /* 111 */ V(4, 1, 2), /* 0010 ... */ /* 00 */ V(2, 3, 2), /* 40 */ /* 01 */ V(3, 2, 2), /* 10 */ V(1, 3, 1), /* 11 */ V(1, 3, 1), /* 0011 ... */ /* 00 */ V(3, 1, 1), /* 44 */ /* 01 */ V(3, 1, 1), /* 10 */ V(0, 3, 2), /* 11 */ V(3, 0, 2), /* 0100 ... */ /* 0 */ V(2, 2, 1), /* 48 */ /* 1 */ V(0, 2, 1), /* 0000 0000 ... */ /* 0 */ V(5, 5, 1), /* 50 */ /* 1 */ V(4, 5, 1), /* 0000 0011 ... */ /* 0 */ V(5, 4, 1), /* 52 */ /* 1 */ V(0, 5, 1) }; static union huffpair const hufftab10[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), /* 0011 */ V(1, 1, 4), /* 0100 */ V(0, 1, 3), /* 0101 */ V(0, 1, 3), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(52, 3), /* 16 */ /* 0001 */ PTR(60, 2), /* 0010 */ PTR(64, 3), /* 0011 */ PTR(72, 1), /* 0100 */ PTR(74, 2), /* 0101 */ PTR(78, 2), /* 0110 */ PTR(82, 2), /* 0111 */ V(1, 7, 4), /* 1000 */ V(7, 1, 4), /* 1001 */ PTR(86, 1), /* 1010 */ PTR(88, 2), /* 1011 */ PTR(92, 2), /* 1100 */ V(1, 6, 4), /* 1101 */ V(6, 1, 4), /* 1110 */ V(6, 0, 4), /* 1111 */ PTR(96, 1), /* 0001 ... */ /* 0000 */ PTR(98, 1), /* 32 */ /* 0001 */ PTR(100, 1), /* 0010 */ V(1, 4, 4), /* 0011 */ V(4, 1, 4), /* 0100 */ V(4, 0, 4), /* 0101 */ V(2, 3, 4), /* 0110 */ V(3, 2, 4), /* 0111 */ V(0, 3, 4), /* 1000 */ V(1, 3, 3), /* 1001 */ V(1, 3, 3), /* 1010 */ V(3, 1, 3), /* 1011 */ V(3, 1, 3), /* 1100 */ V(3, 0, 3), /* 1101 */ V(3, 0, 3), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0010 ... */ /* 00 */ V(1, 2, 2), /* 48 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(7, 7, 3), /* 52 */ /* 001 */ V(6, 7, 3), /* 010 */ V(7, 6, 3), /* 011 */ V(5, 7, 3), /* 100 */ V(7, 5, 3), /* 101 */ V(6, 6, 3), /* 110 */ V(4, 7, 2), /* 111 */ V(4, 7, 2), /* 0000 0001 ... */ /* 00 */ V(7, 4, 2), /* 60 */ /* 01 */ V(5, 6, 2), /* 10 */ V(6, 5, 2), /* 11 */ V(3, 7, 2), /* 0000 0010 ... */ /* 000 */ V(7, 3, 2), /* 64 */ /* 001 */ V(7, 3, 2), /* 010 */ V(4, 6, 2), /* 011 */ V(4, 6, 2), /* 100 */ V(5, 5, 3), /* 101 */ V(5, 4, 3), /* 110 */ V(6, 3, 2), /* 111 */ V(6, 3, 2), /* 0000 0011 ... */ /* 0 */ V(2, 7, 1), /* 72 */ /* 1 */ V(7, 2, 1), /* 0000 0100 ... */ /* 00 */ V(6, 4, 2), /* 74 */ /* 01 */ V(0, 7, 2), /* 10 */ V(7, 0, 1), /* 11 */ V(7, 0, 1), /* 0000 0101 ... */ /* 00 */ V(6, 2, 1), /* 78 */ /* 01 */ V(6, 2, 1), /* 10 */ V(4, 5, 2), /* 11 */ V(3, 5, 2), /* 0000 0110 ... */ /* 00 */ V(0, 6, 1), /* 82 */ /* 01 */ V(0, 6, 1), /* 10 */ V(5, 3, 2), /* 11 */ V(4, 4, 2), /* 0000 1001 ... */ /* 0 */ V(3, 6, 1), /* 86 */ /* 1 */ V(2, 6, 1), /* 0000 1010 ... */ /* 00 */ V(2, 5, 2), /* 88 */ /* 01 */ V(5, 2, 2), /* 10 */ V(1, 5, 1), /* 11 */ V(1, 5, 1), /* 0000 1011 ... */ /* 00 */ V(5, 1, 1), /* 92 */ /* 01 */ V(5, 1, 1), /* 10 */ V(3, 4, 2), /* 11 */ V(4, 3, 2), /* 0000 1111 ... */ /* 0 */ V(0, 5, 1), /* 96 */ /* 1 */ V(5, 0, 1), /* 0001 0000 ... */ /* 0 */ V(2, 4, 1), /* 98 */ /* 1 */ V(4, 2, 1), /* 0001 0001 ... */ /* 0 */ V(3, 3, 1), /* 100 */ /* 1 */ V(0, 4, 1) }; static union huffpair const hufftab11[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 3), /* 0100 */ V(1, 2, 4), /* 0101 */ PTR(72, 1), /* 0110 */ V(1, 1, 3), /* 0111 */ V(1, 1, 3), /* 1000 */ V(0, 1, 3), /* 1001 */ V(0, 1, 3), /* 1010 */ V(1, 0, 3), /* 1011 */ V(1, 0, 3), /* 1100 */ V(0, 0, 2), /* 1101 */ V(0, 0, 2), /* 1110 */ V(0, 0, 2), /* 1111 */ V(0, 0, 2), /* 0000 ... */ /* 0000 */ PTR(74, 2), /* 16 */ /* 0001 */ PTR(78, 3), /* 0010 */ PTR(86, 2), /* 0011 */ PTR(90, 1), /* 0100 */ PTR(92, 2), /* 0101 */ V(2, 7, 4), /* 0110 */ V(7, 2, 4), /* 0111 */ PTR(96, 1), /* 1000 */ V(7, 1, 3), /* 1001 */ V(7, 1, 3), /* 1010 */ V(1, 7, 4), /* 1011 */ V(7, 0, 4), /* 1100 */ V(3, 6, 4), /* 1101 */ V(6, 3, 4), /* 1110 */ V(6, 0, 4), /* 1111 */ PTR(98, 1), /* 0001 ... */ /* 0000 */ PTR(100, 1), /* 32 */ /* 0001 */ V(1, 5, 4), /* 0010 */ V(6, 2, 3), /* 0011 */ V(6, 2, 3), /* 0100 */ V(2, 6, 4), /* 0101 */ V(0, 6, 4), /* 0110 */ V(1, 6, 3), /* 0111 */ V(1, 6, 3), /* 1000 */ V(6, 1, 3), /* 1001 */ V(6, 1, 3), /* 1010 */ V(5, 1, 4), /* 1011 */ V(3, 4, 4), /* 1100 */ V(5, 0, 4), /* 1101 */ PTR(102, 1), /* 1110 */ V(2, 4, 4), /* 1111 */ V(4, 2, 4), /* 0010 ... */ /* 0000 */ V(1, 4, 4), /* 48 */ /* 0001 */ V(4, 1, 4), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 3), /* 0101 */ V(2, 3, 3), /* 0110 */ V(3, 2, 3), /* 0111 */ V(3, 2, 3), /* 1000 */ V(1, 3, 2), /* 1001 */ V(1, 3, 2), /* 1010 */ V(1, 3, 2), /* 1011 */ V(1, 3, 2), /* 1100 */ V(3, 1, 2), /* 1101 */ V(3, 1, 2), /* 1110 */ V(3, 1, 2), /* 1111 */ V(3, 1, 2), /* 0011 ... */ /* 000 */ V(0, 3, 3), /* 64 */ /* 001 */ V(3, 0, 3), /* 010 */ V(2, 2, 2), /* 011 */ V(2, 2, 2), /* 100 */ V(2, 1, 1), /* 101 */ V(2, 1, 1), /* 110 */ V(2, 1, 1), /* 111 */ V(2, 1, 1), /* 0101 ... */ /* 0 */ V(0, 2, 1), /* 72 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 00 */ V(7, 7, 2), /* 74 */ /* 01 */ V(6, 7, 2), /* 10 */ V(7, 6, 2), /* 11 */ V(7, 5, 2), /* 0000 0001 ... */ /* 000 */ V(6, 6, 2), /* 78 */ /* 001 */ V(6, 6, 2), /* 010 */ V(4, 7, 2), /* 011 */ V(4, 7, 2), /* 100 */ V(7, 4, 2), /* 101 */ V(7, 4, 2), /* 110 */ V(5, 7, 3), /* 111 */ V(5, 5, 3), /* 0000 0010 ... */ /* 00 */ V(5, 6, 2), /* 86 */ /* 01 */ V(6, 5, 2), /* 10 */ V(3, 7, 1), /* 11 */ V(3, 7, 1), /* 0000 0011 ... */ /* 0 */ V(7, 3, 1), /* 90 */ /* 1 */ V(4, 6, 1), /* 0000 0100 ... */ /* 00 */ V(4, 5, 2), /* 92 */ /* 01 */ V(5, 4, 2), /* 10 */ V(3, 5, 2), /* 11 */ V(5, 3, 2), /* 0000 0111 ... */ /* 0 */ V(6, 4, 1), /* 96 */ /* 1 */ V(0, 7, 1), /* 0000 1111 ... */ /* 0 */ V(4, 4, 1), /* 98 */ /* 1 */ V(2, 5, 1), /* 0001 0000 ... */ /* 0 */ V(5, 2, 1), /* 100 */ /* 1 */ V(0, 5, 1), /* 0001 1101 ... */ /* 0 */ V(4, 3, 1), /* 102 */ /* 1 */ V(3, 3, 1) }; static union huffpair const hufftab12[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ PTR(68, 3), /* 0101 */ PTR(76, 1), /* 0110 */ V(1, 2, 4), /* 0111 */ V(2, 1, 4), /* 1000 */ PTR(78, 1), /* 1001 */ V(0, 0, 4), /* 1010 */ V(1, 1, 3), /* 1011 */ V(1, 1, 3), /* 1100 */ V(0, 1, 3), /* 1101 */ V(0, 1, 3), /* 1110 */ V(1, 0, 3), /* 1111 */ V(1, 0, 3), /* 0000 ... */ /* 0000 */ PTR(80, 2), /* 16 */ /* 0001 */ PTR(84, 1), /* 0010 */ PTR(86, 1), /* 0011 */ PTR(88, 1), /* 0100 */ V(5, 6, 4), /* 0101 */ V(3, 7, 4), /* 0110 */ PTR(90, 1), /* 0111 */ V(2, 7, 4), /* 1000 */ V(7, 2, 4), /* 1001 */ V(4, 6, 4), /* 1010 */ V(6, 4, 4), /* 1011 */ V(1, 7, 4), /* 1100 */ V(7, 1, 4), /* 1101 */ PTR(92, 1), /* 1110 */ V(3, 6, 4), /* 1111 */ V(6, 3, 4), /* 0001 ... */ /* 0000 */ V(4, 5, 4), /* 32 */ /* 0001 */ V(5, 4, 4), /* 0010 */ V(4, 4, 4), /* 0011 */ PTR(94, 1), /* 0100 */ V(2, 6, 3), /* 0101 */ V(2, 6, 3), /* 0110 */ V(6, 2, 3), /* 0111 */ V(6, 2, 3), /* 1000 */ V(6, 1, 3), /* 1001 */ V(6, 1, 3), /* 1010 */ V(1, 6, 4), /* 1011 */ V(6, 0, 4), /* 1100 */ V(3, 5, 4), /* 1101 */ V(5, 3, 4), /* 1110 */ V(2, 5, 4), /* 1111 */ V(5, 2, 4), /* 0010 ... */ /* 0000 */ V(1, 5, 3), /* 48 */ /* 0001 */ V(1, 5, 3), /* 0010 */ V(5, 1, 3), /* 0011 */ V(5, 1, 3), /* 0100 */ V(3, 4, 3), /* 0101 */ V(3, 4, 3), /* 0110 */ V(4, 3, 3), /* 0111 */ V(4, 3, 3), /* 1000 */ V(5, 0, 4), /* 1001 */ V(0, 4, 4), /* 1010 */ V(2, 4, 3), /* 1011 */ V(2, 4, 3), /* 1100 */ V(4, 2, 3), /* 1101 */ V(4, 2, 3), /* 1110 */ V(1, 4, 3), /* 1111 */ V(1, 4, 3), /* 0011 ... */ /* 00 */ V(3, 3, 2), /* 64 */ /* 01 */ V(4, 1, 2), /* 10 */ V(2, 3, 2), /* 11 */ V(3, 2, 2), /* 0100 ... */ /* 000 */ V(4, 0, 3), /* 68 */ /* 001 */ V(0, 3, 3), /* 010 */ V(3, 0, 2), /* 011 */ V(3, 0, 2), /* 100 */ V(1, 3, 1), /* 101 */ V(1, 3, 1), /* 110 */ V(1, 3, 1), /* 111 */ V(1, 3, 1), /* 0101 ... */ /* 0 */ V(3, 1, 1), /* 76 */ /* 1 */ V(2, 2, 1), /* 1000 ... */ /* 0 */ V(0, 2, 1), /* 78 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 00 */ V(7, 7, 2), /* 80 */ /* 01 */ V(6, 7, 2), /* 10 */ V(7, 6, 1), /* 11 */ V(7, 6, 1), /* 0000 0001 ... */ /* 0 */ V(5, 7, 1), /* 84 */ /* 1 */ V(7, 5, 1), /* 0000 0010 ... */ /* 0 */ V(6, 6, 1), /* 86 */ /* 1 */ V(4, 7, 1), /* 0000 0011 ... */ /* 0 */ V(7, 4, 1), /* 88 */ /* 1 */ V(6, 5, 1), /* 0000 0110 ... */ /* 0 */ V(7, 3, 1), /* 90 */ /* 1 */ V(5, 5, 1), /* 0000 1101 ... */ /* 0 */ V(0, 7, 1), /* 92 */ /* 1 */ V(7, 0, 1), /* 0001 0011 ... */ /* 0 */ V(0, 6, 1), /* 94 */ /* 1 */ V(0, 5, 1) }; static union huffpair const hufftab13[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ V(1, 1, 4), /* 0101 */ V(0, 1, 4), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(68, 4), /* 16 */ /* 0001 */ PTR(84, 4), /* 0010 */ PTR(100, 4), /* 0011 */ PTR(116, 4), /* 0100 */ PTR(132, 4), /* 0101 */ PTR(148, 4), /* 0110 */ PTR(164, 3), /* 0111 */ PTR(172, 3), /* 1000 */ PTR(180, 3), /* 1001 */ PTR(188, 3), /* 1010 */ PTR(196, 3), /* 1011 */ PTR(204, 3), /* 1100 */ PTR(212, 1), /* 1101 */ PTR(214, 2), /* 1110 */ PTR(218, 3), /* 1111 */ PTR(226, 1), /* 0001 ... */ /* 0000 */ PTR(228, 2), /* 32 */ /* 0001 */ PTR(232, 2), /* 0010 */ PTR(236, 2), /* 0011 */ PTR(240, 2), /* 0100 */ V(8, 1, 4), /* 0101 */ PTR(244, 1), /* 0110 */ PTR(246, 1), /* 0111 */ PTR(248, 1), /* 1000 */ PTR(250, 2), /* 1001 */ PTR(254, 1), /* 1010 */ V(1, 5, 4), /* 1011 */ V(5, 1, 4), /* 1100 */ PTR(256, 1), /* 1101 */ PTR(258, 1), /* 1110 */ PTR(260, 1), /* 1111 */ V(1, 4, 4), /* 0010 ... */ /* 0000 */ V(4, 1, 3), /* 48 */ /* 0001 */ V(4, 1, 3), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 4), /* 0101 */ V(3, 2, 4), /* 0110 */ V(1, 3, 3), /* 0111 */ V(1, 3, 3), /* 1000 */ V(3, 1, 3), /* 1001 */ V(3, 1, 3), /* 1010 */ V(0, 3, 3), /* 1011 */ V(0, 3, 3), /* 1100 */ V(3, 0, 3), /* 1101 */ V(3, 0, 3), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0011 ... */ /* 00 */ V(1, 2, 2), /* 64 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 0000 */ PTR(262, 4), /* 68 */ /* 0001 */ PTR(278, 4), /* 0010 */ PTR(294, 4), /* 0011 */ PTR(310, 3), /* 0100 */ PTR(318, 2), /* 0101 */ PTR(322, 2), /* 0110 */ PTR(326, 3), /* 0111 */ PTR(334, 2), /* 1000 */ PTR(338, 1), /* 1001 */ PTR(340, 2), /* 1010 */ PTR(344, 2), /* 1011 */ PTR(348, 2), /* 1100 */ PTR(352, 2), /* 1101 */ PTR(356, 2), /* 1110 */ V(1, 15, 4), /* 1111 */ V(15, 1, 4), /* 0000 0001 ... */ /* 0000 */ V(15, 0, 4), /* 84 */ /* 0001 */ PTR(360, 1), /* 0010 */ PTR(362, 1), /* 0011 */ PTR(364, 1), /* 0100 */ V(14, 2, 4), /* 0101 */ PTR(366, 1), /* 0110 */ V(1, 14, 4), /* 0111 */ V(14, 1, 4), /* 1000 */ PTR(368, 1), /* 1001 */ PTR(370, 1), /* 1010 */ PTR(372, 1), /* 1011 */ PTR(374, 1), /* 1100 */ PTR(376, 1), /* 1101 */ PTR(378, 1), /* 1110 */ V(12, 6, 4), /* 1111 */ V(3, 13, 4), /* 0000 0010 ... */ /* 0000 */ PTR(380, 1), /* 100 */ /* 0001 */ V(2, 13, 4), /* 0010 */ V(13, 2, 4), /* 0011 */ V(1, 13, 4), /* 0100 */ V(11, 7, 4), /* 0101 */ PTR(382, 1), /* 0110 */ PTR(384, 1), /* 0111 */ V(12, 3, 4), /* 1000 */ PTR(386, 1), /* 1001 */ V(4, 11, 4), /* 1010 */ V(13, 1, 3), /* 1011 */ V(13, 1, 3), /* 1100 */ V(0, 13, 4), /* 1101 */ V(13, 0, 4), /* 1110 */ V(8, 10, 4), /* 1111 */ V(10, 8, 4), /* 0000 0011 ... */ /* 0000 */ V(4, 12, 4), /* 116 */ /* 0001 */ V(12, 4, 4), /* 0010 */ V(6, 11, 4), /* 0011 */ V(11, 6, 4), /* 0100 */ V(3, 12, 3), /* 0101 */ V(3, 12, 3), /* 0110 */ V(2, 12, 3), /* 0111 */ V(2, 12, 3), /* 1000 */ V(12, 2, 3), /* 1001 */ V(12, 2, 3), /* 1010 */ V(5, 11, 3), /* 1011 */ V(5, 11, 3), /* 1100 */ V(11, 5, 4), /* 1101 */ V(8, 9, 4), /* 1110 */ V(1, 12, 3), /* 1111 */ V(1, 12, 3), /* 0000 0100 ... */ /* 0000 */ V(12, 1, 3), /* 132 */ /* 0001 */ V(12, 1, 3), /* 0010 */ V(9, 8, 4), /* 0011 */ V(0, 12, 4), /* 0100 */ V(12, 0, 3), /* 0101 */ V(12, 0, 3), /* 0110 */ V(11, 4, 4), /* 0111 */ V(6, 10, 4), /* 1000 */ V(10, 6, 4), /* 1001 */ V(7, 9, 4), /* 1010 */ V(3, 11, 3), /* 1011 */ V(3, 11, 3), /* 1100 */ V(11, 3, 3), /* 1101 */ V(11, 3, 3), /* 1110 */ V(8, 8, 4), /* 1111 */ V(5, 10, 4), /* 0000 0101 ... */ /* 0000 */ V(2, 11, 3), /* 148 */ /* 0001 */ V(2, 11, 3), /* 0010 */ V(10, 5, 4), /* 0011 */ V(6, 9, 4), /* 0100 */ V(10, 4, 3), /* 0101 */ V(10, 4, 3), /* 0110 */ V(7, 8, 4), /* 0111 */ V(8, 7, 4), /* 1000 */ V(9, 4, 3), /* 1001 */ V(9, 4, 3), /* 1010 */ V(7, 7, 4), /* 1011 */ V(7, 6, 4), /* 1100 */ V(11, 2, 2), /* 1101 */ V(11, 2, 2), /* 1110 */ V(11, 2, 2), /* 1111 */ V(11, 2, 2), /* 0000 0110 ... */ /* 000 */ V(1, 11, 2), /* 164 */ /* 001 */ V(1, 11, 2), /* 010 */ V(11, 1, 2), /* 011 */ V(11, 1, 2), /* 100 */ V(0, 11, 3), /* 101 */ V(11, 0, 3), /* 110 */ V(9, 6, 3), /* 111 */ V(4, 10, 3), /* 0000 0111 ... */ /* 000 */ V(3, 10, 3), /* 172 */ /* 001 */ V(10, 3, 3), /* 010 */ V(5, 9, 3), /* 011 */ V(9, 5, 3), /* 100 */ V(2, 10, 2), /* 101 */ V(2, 10, 2), /* 110 */ V(10, 2, 2), /* 111 */ V(10, 2, 2), /* 0000 1000 ... */ /* 000 */ V(1, 10, 2), /* 180 */ /* 001 */ V(1, 10, 2), /* 010 */ V(10, 1, 2), /* 011 */ V(10, 1, 2), /* 100 */ V(0, 10, 3), /* 101 */ V(6, 8, 3), /* 110 */ V(10, 0, 2), /* 111 */ V(10, 0, 2), /* 0000 1001 ... */ /* 000 */ V(8, 6, 3), /* 188 */ /* 001 */ V(4, 9, 3), /* 010 */ V(9, 3, 2), /* 011 */ V(9, 3, 2), /* 100 */ V(3, 9, 3), /* 101 */ V(5, 8, 3), /* 110 */ V(8, 5, 3), /* 111 */ V(6, 7, 3), /* 0000 1010 ... */ /* 000 */ V(2, 9, 2), /* 196 */ /* 001 */ V(2, 9, 2), /* 010 */ V(9, 2, 2), /* 011 */ V(9, 2, 2), /* 100 */ V(5, 7, 3), /* 101 */ V(7, 5, 3), /* 110 */ V(3, 8, 2), /* 111 */ V(3, 8, 2), /* 0000 1011 ... */ /* 000 */ V(8, 3, 2), /* 204 */ /* 001 */ V(8, 3, 2), /* 010 */ V(6, 6, 3), /* 011 */ V(4, 7, 3), /* 100 */ V(7, 4, 3), /* 101 */ V(5, 6, 3), /* 110 */ V(6, 5, 3), /* 111 */ V(7, 3, 3), /* 0000 1100 ... */ /* 0 */ V(1, 9, 1), /* 212 */ /* 1 */ V(9, 1, 1), /* 0000 1101 ... */ /* 00 */ V(0, 9, 2), /* 214 */ /* 01 */ V(9, 0, 2), /* 10 */ V(4, 8, 2), /* 11 */ V(8, 4, 2), /* 0000 1110 ... */ /* 000 */ V(7, 2, 2), /* 218 */ /* 001 */ V(7, 2, 2), /* 010 */ V(4, 6, 3), /* 011 */ V(6, 4, 3), /* 100 */ V(2, 8, 1), /* 101 */ V(2, 8, 1), /* 110 */ V(2, 8, 1), /* 111 */ V(2, 8, 1), /* 0000 1111 ... */ /* 0 */ V(8, 2, 1), /* 226 */ /* 1 */ V(1, 8, 1), /* 0001 0000 ... */ /* 00 */ V(3, 7, 2), /* 228 */ /* 01 */ V(2, 7, 2), /* 10 */ V(1, 7, 1), /* 11 */ V(1, 7, 1), /* 0001 0001 ... */ /* 00 */ V(7, 1, 1), /* 232 */ /* 01 */ V(7, 1, 1), /* 10 */ V(5, 5, 2), /* 11 */ V(0, 7, 2), /* 0001 0010 ... */ /* 00 */ V(7, 0, 2), /* 236 */ /* 01 */ V(3, 6, 2), /* 10 */ V(6, 3, 2), /* 11 */ V(4, 5, 2), /* 0001 0011 ... */ /* 00 */ V(5, 4, 2), /* 240 */ /* 01 */ V(2, 6, 2), /* 10 */ V(6, 2, 2), /* 11 */ V(3, 5, 2), /* 0001 0101 ... */ /* 0 */ V(0, 8, 1), /* 244 */ /* 1 */ V(8, 0, 1), /* 0001 0110 ... */ /* 0 */ V(1, 6, 1), /* 246 */ /* 1 */ V(6, 1, 1), /* 0001 0111 ... */ /* 0 */ V(0, 6, 1), /* 248 */ /* 1 */ V(6, 0, 1), /* 0001 1000 ... */ /* 00 */ V(5, 3, 2), /* 250 */ /* 01 */ V(4, 4, 2), /* 10 */ V(2, 5, 1), /* 11 */ V(2, 5, 1), /* 0001 1001 ... */ /* 0 */ V(5, 2, 1), /* 254 */ /* 1 */ V(0, 5, 1), /* 0001 1100 ... */ /* 0 */ V(3, 4, 1), /* 256 */ /* 1 */ V(4, 3, 1), /* 0001 1101 ... */ /* 0 */ V(5, 0, 1), /* 258 */ /* 1 */ V(2, 4, 1), /* 0001 1110 ... */ /* 0 */ V(4, 2, 1), /* 260 */ /* 1 */ V(3, 3, 1), /* 0000 0000 0000 ... */ /* 0000 */ PTR(388, 3), /* 262 */ /* 0001 */ V(15, 15, 4), /* 0010 */ V(14, 15, 4), /* 0011 */ V(13, 15, 4), /* 0100 */ V(14, 14, 4), /* 0101 */ V(12, 15, 4), /* 0110 */ V(13, 14, 4), /* 0111 */ V(11, 15, 4), /* 1000 */ V(15, 11, 4), /* 1001 */ V(12, 14, 4), /* 1010 */ V(13, 12, 4), /* 1011 */ PTR(396, 1), /* 1100 */ V(14, 12, 3), /* 1101 */ V(14, 12, 3), /* 1110 */ V(13, 13, 3), /* 1111 */ V(13, 13, 3), /* 0000 0000 0001 ... */ /* 0000 */ V(15, 10, 4), /* 278 */ /* 0001 */ V(12, 13, 4), /* 0010 */ V(11, 14, 3), /* 0011 */ V(11, 14, 3), /* 0100 */ V(14, 11, 3), /* 0101 */ V(14, 11, 3), /* 0110 */ V(9, 15, 3), /* 0111 */ V(9, 15, 3), /* 1000 */ V(15, 9, 3), /* 1001 */ V(15, 9, 3), /* 1010 */ V(14, 10, 3), /* 1011 */ V(14, 10, 3), /* 1100 */ V(11, 13, 3), /* 1101 */ V(11, 13, 3), /* 1110 */ V(13, 11, 3), /* 1111 */ V(13, 11, 3), /* 0000 0000 0010 ... */ /* 0000 */ V(8, 15, 3), /* 294 */ /* 0001 */ V(8, 15, 3), /* 0010 */ V(15, 8, 3), /* 0011 */ V(15, 8, 3), /* 0100 */ V(12, 12, 3), /* 0101 */ V(12, 12, 3), /* 0110 */ V(10, 14, 4), /* 0111 */ V(9, 14, 4), /* 1000 */ V(8, 14, 3), /* 1001 */ V(8, 14, 3), /* 1010 */ V(7, 15, 4), /* 1011 */ V(7, 14, 4), /* 1100 */ V(15, 7, 2), /* 1101 */ V(15, 7, 2), /* 1110 */ V(15, 7, 2), /* 1111 */ V(15, 7, 2), /* 0000 0000 0011 ... */ /* 000 */ V(13, 10, 2), /* 310 */ /* 001 */ V(13, 10, 2), /* 010 */ V(10, 13, 3), /* 011 */ V(11, 12, 3), /* 100 */ V(12, 11, 3), /* 101 */ V(15, 6, 3), /* 110 */ V(6, 15, 2), /* 111 */ V(6, 15, 2), /* 0000 0000 0100 ... */ /* 00 */ V(14, 8, 2), /* 318 */ /* 01 */ V(5, 15, 2), /* 10 */ V(9, 13, 2), /* 11 */ V(13, 9, 2), /* 0000 0000 0101 ... */ /* 00 */ V(15, 5, 2), /* 322 */ /* 01 */ V(14, 7, 2), /* 10 */ V(10, 12, 2), /* 11 */ V(11, 11, 2), /* 0000 0000 0110 ... */ /* 000 */ V(4, 15, 2), /* 326 */ /* 001 */ V(4, 15, 2), /* 010 */ V(15, 4, 2), /* 011 */ V(15, 4, 2), /* 100 */ V(12, 10, 3), /* 101 */ V(14, 6, 3), /* 110 */ V(15, 3, 2), /* 111 */ V(15, 3, 2), /* 0000 0000 0111 ... */ /* 00 */ V(3, 15, 1), /* 334 */ /* 01 */ V(3, 15, 1), /* 10 */ V(8, 13, 2), /* 11 */ V(13, 8, 2), /* 0000 0000 1000 ... */ /* 0 */ V(2, 15, 1), /* 338 */ /* 1 */ V(15, 2, 1), /* 0000 0000 1001 ... */ /* 00 */ V(6, 14, 2), /* 340 */ /* 01 */ V(9, 12, 2), /* 10 */ V(0, 15, 1), /* 11 */ V(0, 15, 1), /* 0000 0000 1010 ... */ /* 00 */ V(12, 9, 2), /* 344 */ /* 01 */ V(5, 14, 2), /* 10 */ V(10, 11, 1), /* 11 */ V(10, 11, 1), /* 0000 0000 1011 ... */ /* 00 */ V(7, 13, 2), /* 348 */ /* 01 */ V(13, 7, 2), /* 10 */ V(4, 14, 1), /* 11 */ V(4, 14, 1), /* 0000 0000 1100 ... */ /* 00 */ V(12, 8, 2), /* 352 */ /* 01 */ V(13, 6, 2), /* 10 */ V(3, 14, 1), /* 11 */ V(3, 14, 1), /* 0000 0000 1101 ... */ /* 00 */ V(11, 9, 1), /* 356 */ /* 01 */ V(11, 9, 1), /* 10 */ V(9, 11, 2), /* 11 */ V(10, 10, 2), /* 0000 0001 0001 ... */ /* 0 */ V(11, 10, 1), /* 360 */ /* 1 */ V(14, 5, 1), /* 0000 0001 0010 ... */ /* 0 */ V(14, 4, 1), /* 362 */ /* 1 */ V(8, 12, 1), /* 0000 0001 0011 ... */ /* 0 */ V(6, 13, 1), /* 364 */ /* 1 */ V(14, 3, 1), /* 0000 0001 0101 ... */ /* 0 */ V(2, 14, 1), /* 366 */ /* 1 */ V(0, 14, 1), /* 0000 0001 1000 ... */ /* 0 */ V(14, 0, 1), /* 368 */ /* 1 */ V(5, 13, 1), /* 0000 0001 1001 ... */ /* 0 */ V(13, 5, 1), /* 370 */ /* 1 */ V(7, 12, 1), /* 0000 0001 1010 ... */ /* 0 */ V(12, 7, 1), /* 372 */ /* 1 */ V(4, 13, 1), /* 0000 0001 1011 ... */ /* 0 */ V(8, 11, 1), /* 374 */ /* 1 */ V(11, 8, 1), /* 0000 0001 1100 ... */ /* 0 */ V(13, 4, 1), /* 376 */ /* 1 */ V(9, 10, 1), /* 0000 0001 1101 ... */ /* 0 */ V(10, 9, 1), /* 378 */ /* 1 */ V(6, 12, 1), /* 0000 0010 0000 ... */ /* 0 */ V(13, 3, 1), /* 380 */ /* 1 */ V(7, 11, 1), /* 0000 0010 0101 ... */ /* 0 */ V(5, 12, 1), /* 382 */ /* 1 */ V(12, 5, 1), /* 0000 0010 0110 ... */ /* 0 */ V(9, 9, 1), /* 384 */ /* 1 */ V(7, 10, 1), /* 0000 0010 1000 ... */ /* 0 */ V(10, 7, 1), /* 386 */ /* 1 */ V(9, 7, 1), /* 0000 0000 0000 0000 ... */ /* 000 */ V(15, 14, 3), /* 388 */ /* 001 */ V(15, 12, 3), /* 010 */ V(15, 13, 2), /* 011 */ V(15, 13, 2), /* 100 */ V(14, 13, 1), /* 101 */ V(14, 13, 1), /* 110 */ V(14, 13, 1), /* 111 */ V(14, 13, 1), /* 0000 0000 0000 1011 ... */ /* 0 */ V(10, 15, 1), /* 396 */ /* 1 */ V(14, 9, 1) }; static union huffpair const hufftab15[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 4), /* 0100 */ PTR(80, 4), /* 0101 */ PTR(96, 3), /* 0110 */ PTR(104, 3), /* 0111 */ PTR(112, 2), /* 1000 */ PTR(116, 1), /* 1001 */ PTR(118, 1), /* 1010 */ V(1, 1, 3), /* 1011 */ V(1, 1, 3), /* 1100 */ V(0, 1, 4), /* 1101 */ V(1, 0, 4), /* 1110 */ V(0, 0, 3), /* 1111 */ V(0, 0, 3), /* 0000 ... */ /* 0000 */ PTR(120, 4), /* 16 */ /* 0001 */ PTR(136, 4), /* 0010 */ PTR(152, 4), /* 0011 */ PTR(168, 4), /* 0100 */ PTR(184, 4), /* 0101 */ PTR(200, 3), /* 0110 */ PTR(208, 3), /* 0111 */ PTR(216, 4), /* 1000 */ PTR(232, 3), /* 1001 */ PTR(240, 3), /* 1010 */ PTR(248, 3), /* 1011 */ PTR(256, 3), /* 1100 */ PTR(264, 2), /* 1101 */ PTR(268, 3), /* 1110 */ PTR(276, 3), /* 1111 */ PTR(284, 2), /* 0001 ... */ /* 0000 */ PTR(288, 2), /* 32 */ /* 0001 */ PTR(292, 2), /* 0010 */ PTR(296, 2), /* 0011 */ PTR(300, 2), /* 0100 */ PTR(304, 2), /* 0101 */ PTR(308, 2), /* 0110 */ PTR(312, 2), /* 0111 */ PTR(316, 2), /* 1000 */ PTR(320, 1), /* 1001 */ PTR(322, 1), /* 1010 */ PTR(324, 1), /* 1011 */ PTR(326, 2), /* 1100 */ PTR(330, 1), /* 1101 */ PTR(332, 1), /* 1110 */ PTR(334, 2), /* 1111 */ PTR(338, 1), /* 0010 ... */ /* 0000 */ PTR(340, 1), /* 48 */ /* 0001 */ PTR(342, 1), /* 0010 */ V(9, 1, 4), /* 0011 */ PTR(344, 1), /* 0100 */ PTR(346, 1), /* 0101 */ PTR(348, 1), /* 0110 */ PTR(350, 1), /* 0111 */ PTR(352, 1), /* 1000 */ V(2, 8, 4), /* 1001 */ V(8, 2, 4), /* 1010 */ V(1, 8, 4), /* 1011 */ V(8, 1, 4), /* 1100 */ PTR(354, 1), /* 1101 */ PTR(356, 1), /* 1110 */ PTR(358, 1), /* 1111 */ PTR(360, 1), /* 0011 ... */ /* 0000 */ V(2, 7, 4), /* 64 */ /* 0001 */ V(7, 2, 4), /* 0010 */ V(6, 4, 4), /* 0011 */ V(1, 7, 4), /* 0100 */ V(5, 5, 4), /* 0101 */ V(7, 1, 4), /* 0110 */ PTR(362, 1), /* 0111 */ V(3, 6, 4), /* 1000 */ V(6, 3, 4), /* 1001 */ V(4, 5, 4), /* 1010 */ V(5, 4, 4), /* 1011 */ V(2, 6, 4), /* 1100 */ V(6, 2, 4), /* 1101 */ V(1, 6, 4), /* 1110 */ PTR(364, 1), /* 1111 */ V(3, 5, 4), /* 0100 ... */ /* 0000 */ V(6, 1, 3), /* 80 */ /* 0001 */ V(6, 1, 3), /* 0010 */ V(5, 3, 4), /* 0011 */ V(4, 4, 4), /* 0100 */ V(2, 5, 3), /* 0101 */ V(2, 5, 3), /* 0110 */ V(5, 2, 3), /* 0111 */ V(5, 2, 3), /* 1000 */ V(1, 5, 3), /* 1001 */ V(1, 5, 3), /* 1010 */ V(5, 1, 3), /* 1011 */ V(5, 1, 3), /* 1100 */ V(0, 5, 4), /* 1101 */ V(5, 0, 4), /* 1110 */ V(3, 4, 3), /* 1111 */ V(3, 4, 3), /* 0101 ... */ /* 000 */ V(4, 3, 3), /* 96 */ /* 001 */ V(2, 4, 3), /* 010 */ V(4, 2, 3), /* 011 */ V(3, 3, 3), /* 100 */ V(4, 1, 2), /* 101 */ V(4, 1, 2), /* 110 */ V(1, 4, 3), /* 111 */ V(0, 4, 3), /* 0110 ... */ /* 000 */ V(2, 3, 2), /* 104 */ /* 001 */ V(2, 3, 2), /* 010 */ V(3, 2, 2), /* 011 */ V(3, 2, 2), /* 100 */ V(4, 0, 3), /* 101 */ V(0, 3, 3), /* 110 */ V(1, 3, 2), /* 111 */ V(1, 3, 2), /* 0111 ... */ /* 00 */ V(3, 1, 2), /* 112 */ /* 01 */ V(3, 0, 2), /* 10 */ V(2, 2, 1), /* 11 */ V(2, 2, 1), /* 1000 ... */ /* 0 */ V(1, 2, 1), /* 116 */ /* 1 */ V(2, 1, 1), /* 1001 ... */ /* 0 */ V(0, 2, 1), /* 118 */ /* 1 */ V(2, 0, 1), /* 0000 0000 ... */ /* 0000 */ PTR(366, 1), /* 120 */ /* 0001 */ PTR(368, 1), /* 0010 */ V(14, 14, 4), /* 0011 */ PTR(370, 1), /* 0100 */ PTR(372, 1), /* 0101 */ PTR(374, 1), /* 0110 */ V(15, 11, 4), /* 0111 */ PTR(376, 1), /* 1000 */ V(13, 13, 4), /* 1001 */ V(10, 15, 4), /* 1010 */ V(15, 10, 4), /* 1011 */ V(11, 14, 4), /* 1100 */ V(14, 11, 4), /* 1101 */ V(12, 13, 4), /* 1110 */ V(13, 12, 4), /* 1111 */ V(9, 15, 4), /* 0000 0001 ... */ /* 0000 */ V(15, 9, 4), /* 136 */ /* 0001 */ V(14, 10, 4), /* 0010 */ V(11, 13, 4), /* 0011 */ V(13, 11, 4), /* 0100 */ V(8, 15, 4), /* 0101 */ V(15, 8, 4), /* 0110 */ V(12, 12, 4), /* 0111 */ V(9, 14, 4), /* 1000 */ V(14, 9, 4), /* 1001 */ V(7, 15, 4), /* 1010 */ V(15, 7, 4), /* 1011 */ V(10, 13, 4), /* 1100 */ V(13, 10, 4), /* 1101 */ V(11, 12, 4), /* 1110 */ V(6, 15, 4), /* 1111 */ PTR(378, 1), /* 0000 0010 ... */ /* 0000 */ V(12, 11, 3), /* 152 */ /* 0001 */ V(12, 11, 3), /* 0010 */ V(15, 6, 3), /* 0011 */ V(15, 6, 3), /* 0100 */ V(8, 14, 4), /* 0101 */ V(14, 8, 4), /* 0110 */ V(5, 15, 4), /* 0111 */ V(9, 13, 4), /* 1000 */ V(15, 5, 3), /* 1001 */ V(15, 5, 3), /* 1010 */ V(7, 14, 3), /* 1011 */ V(7, 14, 3), /* 1100 */ V(14, 7, 3), /* 1101 */ V(14, 7, 3), /* 1110 */ V(10, 12, 3), /* 1111 */ V(10, 12, 3), /* 0000 0011 ... */ /* 0000 */ V(12, 10, 3), /* 168 */ /* 0001 */ V(12, 10, 3), /* 0010 */ V(11, 11, 3), /* 0011 */ V(11, 11, 3), /* 0100 */ V(13, 9, 4), /* 0101 */ V(8, 13, 4), /* 0110 */ V(4, 15, 3), /* 0111 */ V(4, 15, 3), /* 1000 */ V(15, 4, 3), /* 1001 */ V(15, 4, 3), /* 1010 */ V(3, 15, 3), /* 1011 */ V(3, 15, 3), /* 1100 */ V(15, 3, 3), /* 1101 */ V(15, 3, 3), /* 1110 */ V(13, 8, 3), /* 1111 */ V(13, 8, 3), /* 0000 0100 ... */ /* 0000 */ V(14, 6, 3), /* 184 */ /* 0001 */ V(14, 6, 3), /* 0010 */ V(2, 15, 3), /* 0011 */ V(2, 15, 3), /* 0100 */ V(15, 2, 3), /* 0101 */ V(15, 2, 3), /* 0110 */ V(6, 14, 4), /* 0111 */ V(15, 0, 4), /* 1000 */ V(1, 15, 3), /* 1001 */ V(1, 15, 3), /* 1010 */ V(15, 1, 3), /* 1011 */ V(15, 1, 3), /* 1100 */ V(9, 12, 3), /* 1101 */ V(9, 12, 3), /* 1110 */ V(12, 9, 3), /* 1111 */ V(12, 9, 3), /* 0000 0101 ... */ /* 000 */ V(5, 14, 3), /* 200 */ /* 001 */ V(10, 11, 3), /* 010 */ V(11, 10, 3), /* 011 */ V(14, 5, 3), /* 100 */ V(7, 13, 3), /* 101 */ V(13, 7, 3), /* 110 */ V(4, 14, 3), /* 111 */ V(14, 4, 3), /* 0000 0110 ... */ /* 000 */ V(8, 12, 3), /* 208 */ /* 001 */ V(12, 8, 3), /* 010 */ V(3, 14, 3), /* 011 */ V(6, 13, 3), /* 100 */ V(13, 6, 3), /* 101 */ V(14, 3, 3), /* 110 */ V(9, 11, 3), /* 111 */ V(11, 9, 3), /* 0000 0111 ... */ /* 0000 */ V(2, 14, 3), /* 216 */ /* 0001 */ V(2, 14, 3), /* 0010 */ V(10, 10, 3), /* 0011 */ V(10, 10, 3), /* 0100 */ V(14, 2, 3), /* 0101 */ V(14, 2, 3), /* 0110 */ V(1, 14, 3), /* 0111 */ V(1, 14, 3), /* 1000 */ V(14, 1, 3), /* 1001 */ V(14, 1, 3), /* 1010 */ V(0, 14, 4), /* 1011 */ V(14, 0, 4), /* 1100 */ V(5, 13, 3), /* 1101 */ V(5, 13, 3), /* 1110 */ V(13, 5, 3), /* 1111 */ V(13, 5, 3), /* 0000 1000 ... */ /* 000 */ V(7, 12, 3), /* 232 */ /* 001 */ V(12, 7, 3), /* 010 */ V(4, 13, 3), /* 011 */ V(8, 11, 3), /* 100 */ V(13, 4, 2), /* 101 */ V(13, 4, 2), /* 110 */ V(11, 8, 3), /* 111 */ V(9, 10, 3), /* 0000 1001 ... */ /* 000 */ V(10, 9, 3), /* 240 */ /* 001 */ V(6, 12, 3), /* 010 */ V(12, 6, 3), /* 011 */ V(3, 13, 3), /* 100 */ V(13, 3, 2), /* 101 */ V(13, 3, 2), /* 110 */ V(13, 2, 2), /* 111 */ V(13, 2, 2), /* 0000 1010 ... */ /* 000 */ V(2, 13, 3), /* 248 */ /* 001 */ V(0, 13, 3), /* 010 */ V(1, 13, 2), /* 011 */ V(1, 13, 2), /* 100 */ V(7, 11, 2), /* 101 */ V(7, 11, 2), /* 110 */ V(11, 7, 2), /* 111 */ V(11, 7, 2), /* 0000 1011 ... */ /* 000 */ V(13, 1, 2), /* 256 */ /* 001 */ V(13, 1, 2), /* 010 */ V(5, 12, 3), /* 011 */ V(13, 0, 3), /* 100 */ V(12, 5, 2), /* 101 */ V(12, 5, 2), /* 110 */ V(8, 10, 2), /* 111 */ V(8, 10, 2), /* 0000 1100 ... */ /* 00 */ V(10, 8, 2), /* 264 */ /* 01 */ V(4, 12, 2), /* 10 */ V(12, 4, 2), /* 11 */ V(6, 11, 2), /* 0000 1101 ... */ /* 000 */ V(11, 6, 2), /* 268 */ /* 001 */ V(11, 6, 2), /* 010 */ V(9, 9, 3), /* 011 */ V(0, 12, 3), /* 100 */ V(3, 12, 2), /* 101 */ V(3, 12, 2), /* 110 */ V(12, 3, 2), /* 111 */ V(12, 3, 2), /* 0000 1110 ... */ /* 000 */ V(7, 10, 2), /* 276 */ /* 001 */ V(7, 10, 2), /* 010 */ V(10, 7, 2), /* 011 */ V(10, 7, 2), /* 100 */ V(10, 6, 2), /* 101 */ V(10, 6, 2), /* 110 */ V(12, 0, 3), /* 111 */ V(0, 11, 3), /* 0000 1111 ... */ /* 00 */ V(12, 2, 1), /* 284 */ /* 01 */ V(12, 2, 1), /* 10 */ V(2, 12, 2), /* 11 */ V(5, 11, 2), /* 0001 0000 ... */ /* 00 */ V(11, 5, 2), /* 288 */ /* 01 */ V(1, 12, 2), /* 10 */ V(8, 9, 2), /* 11 */ V(9, 8, 2), /* 0001 0001 ... */ /* 00 */ V(12, 1, 2), /* 292 */ /* 01 */ V(4, 11, 2), /* 10 */ V(11, 4, 2), /* 11 */ V(6, 10, 2), /* 0001 0010 ... */ /* 00 */ V(3, 11, 2), /* 296 */ /* 01 */ V(7, 9, 2), /* 10 */ V(11, 3, 1), /* 11 */ V(11, 3, 1), /* 0001 0011 ... */ /* 00 */ V(9, 7, 2), /* 300 */ /* 01 */ V(8, 8, 2), /* 10 */ V(2, 11, 2), /* 11 */ V(5, 10, 2), /* 0001 0100 ... */ /* 00 */ V(11, 2, 1), /* 304 */ /* 01 */ V(11, 2, 1), /* 10 */ V(10, 5, 2), /* 11 */ V(1, 11, 2), /* 0001 0101 ... */ /* 00 */ V(11, 1, 1), /* 308 */ /* 01 */ V(11, 1, 1), /* 10 */ V(11, 0, 2), /* 11 */ V(6, 9, 2), /* 0001 0110 ... */ /* 00 */ V(9, 6, 2), /* 312 */ /* 01 */ V(4, 10, 2), /* 10 */ V(10, 4, 2), /* 11 */ V(7, 8, 2), /* 0001 0111 ... */ /* 00 */ V(8, 7, 2), /* 316 */ /* 01 */ V(3, 10, 2), /* 10 */ V(10, 3, 1), /* 11 */ V(10, 3, 1), /* 0001 1000 ... */ /* 0 */ V(5, 9, 1), /* 320 */ /* 1 */ V(9, 5, 1), /* 0001 1001 ... */ /* 0 */ V(2, 10, 1), /* 322 */ /* 1 */ V(10, 2, 1), /* 0001 1010 ... */ /* 0 */ V(1, 10, 1), /* 324 */ /* 1 */ V(10, 1, 1), /* 0001 1011 ... */ /* 00 */ V(0, 10, 2), /* 326 */ /* 01 */ V(10, 0, 2), /* 10 */ V(6, 8, 1), /* 11 */ V(6, 8, 1), /* 0001 1100 ... */ /* 0 */ V(8, 6, 1), /* 330 */ /* 1 */ V(4, 9, 1), /* 0001 1101 ... */ /* 0 */ V(9, 4, 1), /* 332 */ /* 1 */ V(3, 9, 1), /* 0001 1110 ... */ /* 00 */ V(9, 3, 1), /* 334 */ /* 01 */ V(9, 3, 1), /* 10 */ V(7, 7, 2), /* 11 */ V(0, 9, 2), /* 0001 1111 ... */ /* 0 */ V(5, 8, 1), /* 338 */ /* 1 */ V(8, 5, 1), /* 0010 0000 ... */ /* 0 */ V(2, 9, 1), /* 340 */ /* 1 */ V(6, 7, 1), /* 0010 0001 ... */ /* 0 */ V(7, 6, 1), /* 342 */ /* 1 */ V(9, 2, 1), /* 0010 0011 ... */ /* 0 */ V(1, 9, 1), /* 344 */ /* 1 */ V(9, 0, 1), /* 0010 0100 ... */ /* 0 */ V(4, 8, 1), /* 346 */ /* 1 */ V(8, 4, 1), /* 0010 0101 ... */ /* 0 */ V(5, 7, 1), /* 348 */ /* 1 */ V(7, 5, 1), /* 0010 0110 ... */ /* 0 */ V(3, 8, 1), /* 350 */ /* 1 */ V(8, 3, 1), /* 0010 0111 ... */ /* 0 */ V(6, 6, 1), /* 352 */ /* 1 */ V(4, 7, 1), /* 0010 1100 ... */ /* 0 */ V(7, 4, 1), /* 354 */ /* 1 */ V(0, 8, 1), /* 0010 1101 ... */ /* 0 */ V(8, 0, 1), /* 356 */ /* 1 */ V(5, 6, 1), /* 0010 1110 ... */ /* 0 */ V(6, 5, 1), /* 358 */ /* 1 */ V(3, 7, 1), /* 0010 1111 ... */ /* 0 */ V(7, 3, 1), /* 360 */ /* 1 */ V(4, 6, 1), /* 0011 0110 ... */ /* 0 */ V(0, 7, 1), /* 362 */ /* 1 */ V(7, 0, 1), /* 0011 1110 ... */ /* 0 */ V(0, 6, 1), /* 364 */ /* 1 */ V(6, 0, 1), /* 0000 0000 0000 ... */ /* 0 */ V(15, 15, 1), /* 366 */ /* 1 */ V(14, 15, 1), /* 0000 0000 0001 ... */ /* 0 */ V(15, 14, 1), /* 368 */ /* 1 */ V(13, 15, 1), /* 0000 0000 0011 ... */ /* 0 */ V(15, 13, 1), /* 370 */ /* 1 */ V(12, 15, 1), /* 0000 0000 0100 ... */ /* 0 */ V(15, 12, 1), /* 372 */ /* 1 */ V(13, 14, 1), /* 0000 0000 0101 ... */ /* 0 */ V(14, 13, 1), /* 374 */ /* 1 */ V(11, 15, 1), /* 0000 0000 0111 ... */ /* 0 */ V(12, 14, 1), /* 376 */ /* 1 */ V(14, 12, 1), /* 0000 0001 1111 ... */ /* 0 */ V(10, 14, 1), /* 378 */ /* 1 */ V(0, 15, 1) }; static union huffpair const hufftab16[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ PTR(64, 2), /* 0100 */ V(1, 1, 4), /* 0101 */ V(0, 1, 4), /* 0110 */ V(1, 0, 3), /* 0111 */ V(1, 0, 3), /* 1000 */ V(0, 0, 1), /* 1001 */ V(0, 0, 1), /* 1010 */ V(0, 0, 1), /* 1011 */ V(0, 0, 1), /* 1100 */ V(0, 0, 1), /* 1101 */ V(0, 0, 1), /* 1110 */ V(0, 0, 1), /* 1111 */ V(0, 0, 1), /* 0000 ... */ /* 0000 */ PTR(68, 3), /* 16 */ /* 0001 */ PTR(76, 3), /* 0010 */ PTR(84, 2), /* 0011 */ V(15, 15, 4), /* 0100 */ PTR(88, 2), /* 0101 */ PTR(92, 1), /* 0110 */ PTR(94, 4), /* 0111 */ V(15, 2, 4), /* 1000 */ PTR(110, 1), /* 1001 */ V(1, 15, 4), /* 1010 */ V(15, 1, 4), /* 1011 */ PTR(112, 4), /* 1100 */ PTR(128, 4), /* 1101 */ PTR(144, 4), /* 1110 */ PTR(160, 4), /* 1111 */ PTR(176, 4), /* 0001 ... */ /* 0000 */ PTR(192, 4), /* 32 */ /* 0001 */ PTR(208, 3), /* 0010 */ PTR(216, 3), /* 0011 */ PTR(224, 3), /* 0100 */ PTR(232, 3), /* 0101 */ PTR(240, 3), /* 0110 */ PTR(248, 3), /* 0111 */ PTR(256, 3), /* 1000 */ PTR(264, 2), /* 1001 */ PTR(268, 2), /* 1010 */ PTR(272, 1), /* 1011 */ PTR(274, 2), /* 1100 */ PTR(278, 2), /* 1101 */ PTR(282, 1), /* 1110 */ V(5, 1, 4), /* 1111 */ PTR(284, 1), /* 0010 ... */ /* 0000 */ PTR(286, 1), /* 48 */ /* 0001 */ PTR(288, 1), /* 0010 */ PTR(290, 1), /* 0011 */ V(1, 4, 4), /* 0100 */ V(4, 1, 4), /* 0101 */ PTR(292, 1), /* 0110 */ V(2, 3, 4), /* 0111 */ V(3, 2, 4), /* 1000 */ V(1, 3, 3), /* 1001 */ V(1, 3, 3), /* 1010 */ V(3, 1, 3), /* 1011 */ V(3, 1, 3), /* 1100 */ V(0, 3, 4), /* 1101 */ V(3, 0, 4), /* 1110 */ V(2, 2, 3), /* 1111 */ V(2, 2, 3), /* 0011 ... */ /* 00 */ V(1, 2, 2), /* 64 */ /* 01 */ V(2, 1, 2), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0000 0000 ... */ /* 000 */ V(14, 15, 3), /* 68 */ /* 001 */ V(15, 14, 3), /* 010 */ V(13, 15, 3), /* 011 */ V(15, 13, 3), /* 100 */ V(12, 15, 3), /* 101 */ V(15, 12, 3), /* 110 */ V(11, 15, 3), /* 111 */ V(15, 11, 3), /* 0000 0001 ... */ /* 000 */ V(10, 15, 2), /* 76 */ /* 001 */ V(10, 15, 2), /* 010 */ V(15, 10, 3), /* 011 */ V(9, 15, 3), /* 100 */ V(15, 9, 3), /* 101 */ V(15, 8, 3), /* 110 */ V(8, 15, 2), /* 111 */ V(8, 15, 2), /* 0000 0010 ... */ /* 00 */ V(7, 15, 2), /* 84 */ /* 01 */ V(15, 7, 2), /* 10 */ V(6, 15, 2), /* 11 */ V(15, 6, 2), /* 0000 0100 ... */ /* 00 */ V(5, 15, 2), /* 88 */ /* 01 */ V(15, 5, 2), /* 10 */ V(4, 15, 1), /* 11 */ V(4, 15, 1), /* 0000 0101 ... */ /* 0 */ V(15, 4, 1), /* 92 */ /* 1 */ V(15, 3, 1), /* 0000 0110 ... */ /* 0000 */ V(15, 0, 1), /* 94 */ /* 0001 */ V(15, 0, 1), /* 0010 */ V(15, 0, 1), /* 0011 */ V(15, 0, 1), /* 0100 */ V(15, 0, 1), /* 0101 */ V(15, 0, 1), /* 0110 */ V(15, 0, 1), /* 0111 */ V(15, 0, 1), /* 1000 */ V(3, 15, 2), /* 1001 */ V(3, 15, 2), /* 1010 */ V(3, 15, 2), /* 1011 */ V(3, 15, 2), /* 1100 */ PTR(294, 4), /* 1101 */ PTR(310, 3), /* 1110 */ PTR(318, 3), /* 1111 */ PTR(326, 3), /* 0000 1000 ... */ /* 0 */ V(2, 15, 1), /* 110 */ /* 1 */ V(0, 15, 1), /* 0000 1011 ... */ /* 0000 */ PTR(334, 2), /* 112 */ /* 0001 */ PTR(338, 2), /* 0010 */ PTR(342, 2), /* 0011 */ PTR(346, 1), /* 0100 */ PTR(348, 2), /* 0101 */ PTR(352, 2), /* 0110 */ PTR(356, 1), /* 0111 */ PTR(358, 2), /* 1000 */ PTR(362, 2), /* 1001 */ PTR(366, 2), /* 1010 */ PTR(370, 2), /* 1011 */ V(14, 3, 4), /* 1100 */ PTR(374, 1), /* 1101 */ PTR(376, 1), /* 1110 */ PTR(378, 1), /* 1111 */ PTR(380, 1), /* 0000 1100 ... */ /* 0000 */ PTR(382, 1), /* 128 */ /* 0001 */ PTR(384, 1), /* 0010 */ PTR(386, 1), /* 0011 */ V(0, 13, 4), /* 0100 */ PTR(388, 1), /* 0101 */ PTR(390, 1), /* 0110 */ PTR(392, 1), /* 0111 */ V(3, 12, 4), /* 1000 */ PTR(394, 1), /* 1001 */ V(1, 12, 4), /* 1010 */ V(12, 0, 4), /* 1011 */ PTR(396, 1), /* 1100 */ V(14, 2, 3), /* 1101 */ V(14, 2, 3), /* 1110 */ V(2, 14, 4), /* 1111 */ V(1, 14, 4), /* 0000 1101 ... */ /* 0000 */ V(13, 3, 4), /* 144 */ /* 0001 */ V(2, 13, 4), /* 0010 */ V(13, 2, 4), /* 0011 */ V(13, 1, 4), /* 0100 */ V(3, 11, 4), /* 0101 */ PTR(398, 1), /* 0110 */ V(1, 13, 3), /* 0111 */ V(1, 13, 3), /* 1000 */ V(12, 4, 4), /* 1001 */ V(6, 11, 4), /* 1010 */ V(12, 3, 4), /* 1011 */ V(10, 7, 4), /* 1100 */ V(2, 12, 3), /* 1101 */ V(2, 12, 3), /* 1110 */ V(12, 2, 4), /* 1111 */ V(11, 5, 4), /* 0000 1110 ... */ /* 0000 */ V(12, 1, 4), /* 160 */ /* 0001 */ V(0, 12, 4), /* 0010 */ V(4, 11, 4), /* 0011 */ V(11, 4, 4), /* 0100 */ V(6, 10, 4), /* 0101 */ V(10, 6, 4), /* 0110 */ V(11, 3, 3), /* 0111 */ V(11, 3, 3), /* 1000 */ V(5, 10, 4), /* 1001 */ V(10, 5, 4), /* 1010 */ V(2, 11, 3), /* 1011 */ V(2, 11, 3), /* 1100 */ V(11, 2, 3), /* 1101 */ V(11, 2, 3), /* 1110 */ V(1, 11, 3), /* 1111 */ V(1, 11, 3), /* 0000 1111 ... */ /* 0000 */ V(11, 1, 3), /* 176 */ /* 0001 */ V(11, 1, 3), /* 0010 */ V(0, 11, 4), /* 0011 */ V(11, 0, 4), /* 0100 */ V(6, 9, 4), /* 0101 */ V(9, 6, 4), /* 0110 */ V(4, 10, 4), /* 0111 */ V(10, 4, 4), /* 1000 */ V(7, 8, 4), /* 1001 */ V(8, 7, 4), /* 1010 */ V(10, 3, 3), /* 1011 */ V(10, 3, 3), /* 1100 */ V(3, 10, 4), /* 1101 */ V(5, 9, 4), /* 1110 */ V(2, 10, 3), /* 1111 */ V(2, 10, 3), /* 0001 0000 ... */ /* 0000 */ V(9, 5, 4), /* 192 */ /* 0001 */ V(6, 8, 4), /* 0010 */ V(10, 1, 3), /* 0011 */ V(10, 1, 3), /* 0100 */ V(8, 6, 4), /* 0101 */ V(7, 7, 4), /* 0110 */ V(9, 4, 3), /* 0111 */ V(9, 4, 3), /* 1000 */ V(4, 9, 4), /* 1001 */ V(5, 7, 4), /* 1010 */ V(6, 7, 3), /* 1011 */ V(6, 7, 3), /* 1100 */ V(10, 2, 2), /* 1101 */ V(10, 2, 2), /* 1110 */ V(10, 2, 2), /* 1111 */ V(10, 2, 2), /* 0001 0001 ... */ /* 000 */ V(1, 10, 2), /* 208 */ /* 001 */ V(1, 10, 2), /* 010 */ V(0, 10, 3), /* 011 */ V(10, 0, 3), /* 100 */ V(3, 9, 3), /* 101 */ V(9, 3, 3), /* 110 */ V(5, 8, 3), /* 111 */ V(8, 5, 3), /* 0001 0010 ... */ /* 000 */ V(2, 9, 2), /* 216 */ /* 001 */ V(2, 9, 2), /* 010 */ V(9, 2, 2), /* 011 */ V(9, 2, 2), /* 100 */ V(7, 6, 3), /* 101 */ V(0, 9, 3), /* 110 */ V(1, 9, 2), /* 111 */ V(1, 9, 2), /* 0001 0011 ... */ /* 000 */ V(9, 1, 2), /* 224 */ /* 001 */ V(9, 1, 2), /* 010 */ V(9, 0, 3), /* 011 */ V(4, 8, 3), /* 100 */ V(8, 4, 3), /* 101 */ V(7, 5, 3), /* 110 */ V(3, 8, 3), /* 111 */ V(8, 3, 3), /* 0001 0100 ... */ /* 000 */ V(6, 6, 3), /* 232 */ /* 001 */ V(2, 8, 3), /* 010 */ V(8, 2, 2), /* 011 */ V(8, 2, 2), /* 100 */ V(4, 7, 3), /* 101 */ V(7, 4, 3), /* 110 */ V(1, 8, 2), /* 111 */ V(1, 8, 2), /* 0001 0101 ... */ /* 000 */ V(8, 1, 2), /* 240 */ /* 001 */ V(8, 1, 2), /* 010 */ V(8, 0, 2), /* 011 */ V(8, 0, 2), /* 100 */ V(0, 8, 3), /* 101 */ V(5, 6, 3), /* 110 */ V(3, 7, 2), /* 111 */ V(3, 7, 2), /* 0001 0110 ... */ /* 000 */ V(7, 3, 2), /* 248 */ /* 001 */ V(7, 3, 2), /* 010 */ V(6, 5, 3), /* 011 */ V(4, 6, 3), /* 100 */ V(2, 7, 2), /* 101 */ V(2, 7, 2), /* 110 */ V(7, 2, 2), /* 111 */ V(7, 2, 2), /* 0001 0111 ... */ /* 000 */ V(6, 4, 3), /* 256 */ /* 001 */ V(5, 5, 3), /* 010 */ V(0, 7, 2), /* 011 */ V(0, 7, 2), /* 100 */ V(1, 7, 1), /* 101 */ V(1, 7, 1), /* 110 */ V(1, 7, 1), /* 111 */ V(1, 7, 1), /* 0001 1000 ... */ /* 00 */ V(7, 1, 1), /* 264 */ /* 01 */ V(7, 1, 1), /* 10 */ V(7, 0, 2), /* 11 */ V(3, 6, 2), /* 0001 1001 ... */ /* 00 */ V(6, 3, 2), /* 268 */ /* 01 */ V(4, 5, 2), /* 10 */ V(5, 4, 2), /* 11 */ V(2, 6, 2), /* 0001 1010 ... */ /* 0 */ V(6, 2, 1), /* 272 */ /* 1 */ V(1, 6, 1), /* 0001 1011 ... */ /* 00 */ V(6, 1, 1), /* 274 */ /* 01 */ V(6, 1, 1), /* 10 */ V(0, 6, 2), /* 11 */ V(6, 0, 2), /* 0001 1100 ... */ /* 00 */ V(5, 3, 1), /* 278 */ /* 01 */ V(5, 3, 1), /* 10 */ V(3, 5, 2), /* 11 */ V(4, 4, 2), /* 0001 1101 ... */ /* 0 */ V(2, 5, 1), /* 282 */ /* 1 */ V(5, 2, 1), /* 0001 1111 ... */ /* 0 */ V(1, 5, 1), /* 284 */ /* 1 */ V(0, 5, 1), /* 0010 0000 ... */ /* 0 */ V(3, 4, 1), /* 286 */ /* 1 */ V(4, 3, 1), /* 0010 0001 ... */ /* 0 */ V(5, 0, 1), /* 288 */ /* 1 */ V(2, 4, 1), /* 0010 0010 ... */ /* 0 */ V(4, 2, 1), /* 290 */ /* 1 */ V(3, 3, 1), /* 0010 0101 ... */ /* 0 */ V(0, 4, 1), /* 292 */ /* 1 */ V(4, 0, 1), /* 0000 0110 1100 ... */ /* 0000 */ V(12, 14, 4), /* 294 */ /* 0001 */ PTR(400, 1), /* 0010 */ V(13, 14, 3), /* 0011 */ V(13, 14, 3), /* 0100 */ V(14, 9, 3), /* 0101 */ V(14, 9, 3), /* 0110 */ V(14, 10, 4), /* 0111 */ V(13, 9, 4), /* 1000 */ V(14, 14, 2), /* 1001 */ V(14, 14, 2), /* 1010 */ V(14, 14, 2), /* 1011 */ V(14, 14, 2), /* 1100 */ V(14, 13, 3), /* 1101 */ V(14, 13, 3), /* 1110 */ V(14, 11, 3), /* 1111 */ V(14, 11, 3), /* 0000 0110 1101 ... */ /* 000 */ V(11, 14, 2), /* 310 */ /* 001 */ V(11, 14, 2), /* 010 */ V(12, 13, 2), /* 011 */ V(12, 13, 2), /* 100 */ V(13, 12, 3), /* 101 */ V(13, 11, 3), /* 110 */ V(10, 14, 2), /* 111 */ V(10, 14, 2), /* 0000 0110 1110 ... */ /* 000 */ V(12, 12, 2), /* 318 */ /* 001 */ V(12, 12, 2), /* 010 */ V(10, 13, 3), /* 011 */ V(13, 10, 3), /* 100 */ V(7, 14, 3), /* 101 */ V(10, 12, 3), /* 110 */ V(12, 10, 2), /* 111 */ V(12, 10, 2), /* 0000 0110 1111 ... */ /* 000 */ V(12, 9, 3), /* 326 */ /* 001 */ V(7, 13, 3), /* 010 */ V(5, 14, 2), /* 011 */ V(5, 14, 2), /* 100 */ V(11, 13, 1), /* 101 */ V(11, 13, 1), /* 110 */ V(11, 13, 1), /* 111 */ V(11, 13, 1), /* 0000 1011 0000 ... */ /* 00 */ V(9, 14, 1), /* 334 */ /* 01 */ V(9, 14, 1), /* 10 */ V(11, 12, 2), /* 11 */ V(12, 11, 2), /* 0000 1011 0001 ... */ /* 00 */ V(8, 14, 2), /* 338 */ /* 01 */ V(14, 8, 2), /* 10 */ V(9, 13, 2), /* 11 */ V(14, 7, 2), /* 0000 1011 0010 ... */ /* 00 */ V(11, 11, 2), /* 342 */ /* 01 */ V(8, 13, 2), /* 10 */ V(13, 8, 2), /* 11 */ V(6, 14, 2), /* 0000 1011 0011 ... */ /* 0 */ V(14, 6, 1), /* 346 */ /* 1 */ V(9, 12, 1), /* 0000 1011 0100 ... */ /* 00 */ V(10, 11, 2), /* 348 */ /* 01 */ V(11, 10, 2), /* 10 */ V(14, 5, 2), /* 11 */ V(13, 7, 2), /* 0000 1011 0101 ... */ /* 00 */ V(4, 14, 1), /* 352 */ /* 01 */ V(4, 14, 1), /* 10 */ V(14, 4, 2), /* 11 */ V(8, 12, 2), /* 0000 1011 0110 ... */ /* 0 */ V(12, 8, 1), /* 356 */ /* 1 */ V(3, 14, 1), /* 0000 1011 0111 ... */ /* 00 */ V(6, 13, 1), /* 358 */ /* 01 */ V(6, 13, 1), /* 10 */ V(13, 6, 2), /* 11 */ V(9, 11, 2), /* 0000 1011 1000 ... */ /* 00 */ V(11, 9, 2), /* 362 */ /* 01 */ V(10, 10, 2), /* 10 */ V(14, 1, 1), /* 11 */ V(14, 1, 1), /* 0000 1011 1001 ... */ /* 00 */ V(13, 4, 1), /* 366 */ /* 01 */ V(13, 4, 1), /* 10 */ V(11, 8, 2), /* 11 */ V(10, 9, 2), /* 0000 1011 1010 ... */ /* 00 */ V(7, 11, 1), /* 370 */ /* 01 */ V(7, 11, 1), /* 10 */ V(11, 7, 2), /* 11 */ V(13, 0, 2), /* 0000 1011 1100 ... */ /* 0 */ V(0, 14, 1), /* 374 */ /* 1 */ V(14, 0, 1), /* 0000 1011 1101 ... */ /* 0 */ V(5, 13, 1), /* 376 */ /* 1 */ V(13, 5, 1), /* 0000 1011 1110 ... */ /* 0 */ V(7, 12, 1), /* 378 */ /* 1 */ V(12, 7, 1), /* 0000 1011 1111 ... */ /* 0 */ V(4, 13, 1), /* 380 */ /* 1 */ V(8, 11, 1), /* 0000 1100 0000 ... */ /* 0 */ V(9, 10, 1), /* 382 */ /* 1 */ V(6, 12, 1), /* 0000 1100 0001 ... */ /* 0 */ V(12, 6, 1), /* 384 */ /* 1 */ V(3, 13, 1), /* 0000 1100 0010 ... */ /* 0 */ V(5, 12, 1), /* 386 */ /* 1 */ V(12, 5, 1), /* 0000 1100 0100 ... */ /* 0 */ V(8, 10, 1), /* 388 */ /* 1 */ V(10, 8, 1), /* 0000 1100 0101 ... */ /* 0 */ V(9, 9, 1), /* 390 */ /* 1 */ V(4, 12, 1), /* 0000 1100 0110 ... */ /* 0 */ V(11, 6, 1), /* 392 */ /* 1 */ V(7, 10, 1), /* 0000 1100 1000 ... */ /* 0 */ V(5, 11, 1), /* 394 */ /* 1 */ V(8, 9, 1), /* 0000 1100 1011 ... */ /* 0 */ V(9, 8, 1), /* 396 */ /* 1 */ V(7, 9, 1), /* 0000 1101 0101 ... */ /* 0 */ V(9, 7, 1), /* 398 */ /* 1 */ V(8, 8, 1), /* 0000 0110 1100 0001 ... */ /* 0 */ V(14, 12, 1), /* 400 */ /* 1 */ V(13, 13, 1) }; static union huffpair const hufftab24[] = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), /* 0011 */ V(15, 15, 4), /* 0100 */ PTR(64, 4), /* 0101 */ PTR(80, 4), /* 0110 */ PTR(96, 4), /* 0111 */ PTR(112, 4), /* 1000 */ PTR(128, 4), /* 1001 */ PTR(144, 4), /* 1010 */ PTR(160, 3), /* 1011 */ PTR(168, 2), /* 1100 */ V(1, 1, 4), /* 1101 */ V(0, 1, 4), /* 1110 */ V(1, 0, 4), /* 1111 */ V(0, 0, 4), /* 0000 ... */ /* 0000 */ V(14, 15, 4), /* 16 */ /* 0001 */ V(15, 14, 4), /* 0010 */ V(13, 15, 4), /* 0011 */ V(15, 13, 4), /* 0100 */ V(12, 15, 4), /* 0101 */ V(15, 12, 4), /* 0110 */ V(11, 15, 4), /* 0111 */ V(15, 11, 4), /* 1000 */ V(15, 10, 3), /* 1001 */ V(15, 10, 3), /* 1010 */ V(10, 15, 4), /* 1011 */ V(9, 15, 4), /* 1100 */ V(15, 9, 3), /* 1101 */ V(15, 9, 3), /* 1110 */ V(15, 8, 3), /* 1111 */ V(15, 8, 3), /* 0001 ... */ /* 0000 */ V(8, 15, 4), /* 32 */ /* 0001 */ V(7, 15, 4), /* 0010 */ V(15, 7, 3), /* 0011 */ V(15, 7, 3), /* 0100 */ V(6, 15, 3), /* 0101 */ V(6, 15, 3), /* 0110 */ V(15, 6, 3), /* 0111 */ V(15, 6, 3), /* 1000 */ V(5, 15, 3), /* 1001 */ V(5, 15, 3), /* 1010 */ V(15, 5, 3), /* 1011 */ V(15, 5, 3), /* 1100 */ V(4, 15, 3), /* 1101 */ V(4, 15, 3), /* 1110 */ V(15, 4, 3), /* 1111 */ V(15, 4, 3), /* 0010 ... */ /* 0000 */ V(3, 15, 3), /* 48 */ /* 0001 */ V(3, 15, 3), /* 0010 */ V(15, 3, 3), /* 0011 */ V(15, 3, 3), /* 0100 */ V(2, 15, 3), /* 0101 */ V(2, 15, 3), /* 0110 */ V(15, 2, 3), /* 0111 */ V(15, 2, 3), /* 1000 */ V(15, 1, 3), /* 1001 */ V(15, 1, 3), /* 1010 */ V(1, 15, 4), /* 1011 */ V(15, 0, 4), /* 1100 */ PTR(172, 3), /* 1101 */ PTR(180, 3), /* 1110 */ PTR(188, 3), /* 1111 */ PTR(196, 3), /* 0100 ... */ /* 0000 */ PTR(204, 4), /* 64 */ /* 0001 */ PTR(220, 3), /* 0010 */ PTR(228, 3), /* 0011 */ PTR(236, 3), /* 0100 */ PTR(244, 2), /* 0101 */ PTR(248, 2), /* 0110 */ PTR(252, 2), /* 0111 */ PTR(256, 2), /* 1000 */ PTR(260, 2), /* 1001 */ PTR(264, 2), /* 1010 */ PTR(268, 2), /* 1011 */ PTR(272, 2), /* 1100 */ PTR(276, 2), /* 1101 */ PTR(280, 3), /* 1110 */ PTR(288, 2), /* 1111 */ PTR(292, 2), /* 0101 ... */ /* 0000 */ PTR(296, 2), /* 80 */ /* 0001 */ PTR(300, 3), /* 0010 */ PTR(308, 2), /* 0011 */ PTR(312, 3), /* 0100 */ PTR(320, 1), /* 0101 */ PTR(322, 2), /* 0110 */ PTR(326, 2), /* 0111 */ PTR(330, 1), /* 1000 */ PTR(332, 2), /* 1001 */ PTR(336, 1), /* 1010 */ PTR(338, 1), /* 1011 */ PTR(340, 1), /* 1100 */ PTR(342, 1), /* 1101 */ PTR(344, 1), /* 1110 */ PTR(346, 1), /* 1111 */ PTR(348, 1), /* 0110 ... */ /* 0000 */ PTR(350, 1), /* 96 */ /* 0001 */ PTR(352, 1), /* 0010 */ PTR(354, 1), /* 0011 */ PTR(356, 1), /* 0100 */ PTR(358, 1), /* 0101 */ PTR(360, 1), /* 0110 */ PTR(362, 1), /* 0111 */ PTR(364, 1), /* 1000 */ PTR(366, 1), /* 1001 */ PTR(368, 1), /* 1010 */ PTR(370, 2), /* 1011 */ PTR(374, 1), /* 1100 */ PTR(376, 2), /* 1101 */ V(7, 3, 4), /* 1110 */ PTR(380, 1), /* 1111 */ V(7, 2, 4), /* 0111 ... */ /* 0000 */ V(4, 6, 4), /* 112 */ /* 0001 */ V(6, 4, 4), /* 0010 */ V(5, 5, 4), /* 0011 */ V(7, 1, 4), /* 0100 */ V(3, 6, 4), /* 0101 */ V(6, 3, 4), /* 0110 */ V(4, 5, 4), /* 0111 */ V(5, 4, 4), /* 1000 */ V(2, 6, 4), /* 1001 */ V(6, 2, 4), /* 1010 */ V(1, 6, 4), /* 1011 */ V(6, 1, 4), /* 1100 */ PTR(382, 1), /* 1101 */ V(3, 5, 4), /* 1110 */ V(5, 3, 4), /* 1111 */ V(4, 4, 4), /* 1000 ... */ /* 0000 */ V(2, 5, 4), /* 128 */ /* 0001 */ V(5, 2, 4), /* 0010 */ V(1, 5, 4), /* 0011 */ PTR(384, 1), /* 0100 */ V(5, 1, 3), /* 0101 */ V(5, 1, 3), /* 0110 */ V(3, 4, 4), /* 0111 */ V(4, 3, 4), /* 1000 */ V(2, 4, 3), /* 1001 */ V(2, 4, 3), /* 1010 */ V(4, 2, 3), /* 1011 */ V(4, 2, 3), /* 1100 */ V(3, 3, 3), /* 1101 */ V(3, 3, 3), /* 1110 */ V(1, 4, 3), /* 1111 */ V(1, 4, 3), /* 1001 ... */ /* 0000 */ V(4, 1, 3), /* 144 */ /* 0001 */ V(4, 1, 3), /* 0010 */ V(0, 4, 4), /* 0011 */ V(4, 0, 4), /* 0100 */ V(2, 3, 3), /* 0101 */ V(2, 3, 3), /* 0110 */ V(3, 2, 3), /* 0111 */ V(3, 2, 3), /* 1000 */ V(1, 3, 2), /* 1001 */ V(1, 3, 2), /* 1010 */ V(1, 3, 2), /* 1011 */ V(1, 3, 2), /* 1100 */ V(3, 1, 2), /* 1101 */ V(3, 1, 2), /* 1110 */ V(3, 1, 2), /* 1111 */ V(3, 1, 2), /* 1010 ... */ /* 000 */ V(0, 3, 3), /* 160 */ /* 001 */ V(3, 0, 3), /* 010 */ V(2, 2, 2), /* 011 */ V(2, 2, 2), /* 100 */ V(1, 2, 1), /* 101 */ V(1, 2, 1), /* 110 */ V(1, 2, 1), /* 111 */ V(1, 2, 1), /* 1011 ... */ /* 00 */ V(2, 1, 1), /* 168 */ /* 01 */ V(2, 1, 1), /* 10 */ V(0, 2, 2), /* 11 */ V(2, 0, 2), /* 0010 1100 ... */ /* 000 */ V(0, 15, 1), /* 172 */ /* 001 */ V(0, 15, 1), /* 010 */ V(0, 15, 1), /* 011 */ V(0, 15, 1), /* 100 */ V(14, 14, 3), /* 101 */ V(13, 14, 3), /* 110 */ V(14, 13, 3), /* 111 */ V(12, 14, 3), /* 0010 1101 ... */ /* 000 */ V(14, 12, 3), /* 180 */ /* 001 */ V(13, 13, 3), /* 010 */ V(11, 14, 3), /* 011 */ V(14, 11, 3), /* 100 */ V(12, 13, 3), /* 101 */ V(13, 12, 3), /* 110 */ V(10, 14, 3), /* 111 */ V(14, 10, 3), /* 0010 1110 ... */ /* 000 */ V(11, 13, 3), /* 188 */ /* 001 */ V(13, 11, 3), /* 010 */ V(12, 12, 3), /* 011 */ V(9, 14, 3), /* 100 */ V(14, 9, 3), /* 101 */ V(10, 13, 3), /* 110 */ V(13, 10, 3), /* 111 */ V(11, 12, 3), /* 0010 1111 ... */ /* 000 */ V(12, 11, 3), /* 196 */ /* 001 */ V(8, 14, 3), /* 010 */ V(14, 8, 3), /* 011 */ V(9, 13, 3), /* 100 */ V(13, 9, 3), /* 101 */ V(7, 14, 3), /* 110 */ V(14, 7, 3), /* 111 */ V(10, 12, 3), /* 0100 0000 ... */ /* 0000 */ V(12, 10, 3), /* 204 */ /* 0001 */ V(12, 10, 3), /* 0010 */ V(11, 11, 3), /* 0011 */ V(11, 11, 3), /* 0100 */ V(8, 13, 3), /* 0101 */ V(8, 13, 3), /* 0110 */ V(13, 8, 3), /* 0111 */ V(13, 8, 3), /* 1000 */ V(0, 14, 4), /* 1001 */ V(14, 0, 4), /* 1010 */ V(0, 13, 3), /* 1011 */ V(0, 13, 3), /* 1100 */ V(14, 6, 2), /* 1101 */ V(14, 6, 2), /* 1110 */ V(14, 6, 2), /* 1111 */ V(14, 6, 2), /* 0100 0001 ... */ /* 000 */ V(6, 14, 3), /* 220 */ /* 001 */ V(9, 12, 3), /* 010 */ V(12, 9, 2), /* 011 */ V(12, 9, 2), /* 100 */ V(5, 14, 2), /* 101 */ V(5, 14, 2), /* 110 */ V(11, 10, 2), /* 111 */ V(11, 10, 2), /* 0100 0010 ... */ /* 000 */ V(14, 5, 2), /* 228 */ /* 001 */ V(14, 5, 2), /* 010 */ V(10, 11, 3), /* 011 */ V(7, 13, 3), /* 100 */ V(13, 7, 2), /* 101 */ V(13, 7, 2), /* 110 */ V(14, 4, 2), /* 111 */ V(14, 4, 2), /* 0100 0011 ... */ /* 000 */ V(8, 12, 2), /* 236 */ /* 001 */ V(8, 12, 2), /* 010 */ V(12, 8, 2), /* 011 */ V(12, 8, 2), /* 100 */ V(4, 14, 3), /* 101 */ V(2, 14, 3), /* 110 */ V(3, 14, 2), /* 111 */ V(3, 14, 2), /* 0100 0100 ... */ /* 00 */ V(6, 13, 2), /* 244 */ /* 01 */ V(13, 6, 2), /* 10 */ V(14, 3, 2), /* 11 */ V(9, 11, 2), /* 0100 0101 ... */ /* 00 */ V(11, 9, 2), /* 248 */ /* 01 */ V(10, 10, 2), /* 10 */ V(14, 2, 2), /* 11 */ V(1, 14, 2), /* 0100 0110 ... */ /* 00 */ V(14, 1, 2), /* 252 */ /* 01 */ V(5, 13, 2), /* 10 */ V(13, 5, 2), /* 11 */ V(7, 12, 2), /* 0100 0111 ... */ /* 00 */ V(12, 7, 2), /* 256 */ /* 01 */ V(4, 13, 2), /* 10 */ V(8, 11, 2), /* 11 */ V(11, 8, 2), /* 0100 1000 ... */ /* 00 */ V(13, 4, 2), /* 260 */ /* 01 */ V(9, 10, 2), /* 10 */ V(10, 9, 2), /* 11 */ V(6, 12, 2), /* 0100 1001 ... */ /* 00 */ V(12, 6, 2), /* 264 */ /* 01 */ V(3, 13, 2), /* 10 */ V(13, 3, 2), /* 11 */ V(2, 13, 2), /* 0100 1010 ... */ /* 00 */ V(13, 2, 2), /* 268 */ /* 01 */ V(1, 13, 2), /* 10 */ V(7, 11, 2), /* 11 */ V(11, 7, 2), /* 0100 1011 ... */ /* 00 */ V(13, 1, 2), /* 272 */ /* 01 */ V(5, 12, 2), /* 10 */ V(12, 5, 2), /* 11 */ V(8, 10, 2), /* 0100 1100 ... */ /* 00 */ V(10, 8, 2), /* 276 */ /* 01 */ V(9, 9, 2), /* 10 */ V(4, 12, 2), /* 11 */ V(12, 4, 2), /* 0100 1101 ... */ /* 000 */ V(6, 11, 2), /* 280 */ /* 001 */ V(6, 11, 2), /* 010 */ V(11, 6, 2), /* 011 */ V(11, 6, 2), /* 100 */ V(13, 0, 3), /* 101 */ V(0, 12, 3), /* 110 */ V(3, 12, 2), /* 111 */ V(3, 12, 2), /* 0100 1110 ... */ /* 00 */ V(12, 3, 2), /* 288 */ /* 01 */ V(7, 10, 2), /* 10 */ V(10, 7, 2), /* 11 */ V(2, 12, 2), /* 0100 1111 ... */ /* 00 */ V(12, 2, 2), /* 292 */ /* 01 */ V(5, 11, 2), /* 10 */ V(11, 5, 2), /* 11 */ V(1, 12, 2), /* 0101 0000 ... */ /* 00 */ V(8, 9, 2), /* 296 */ /* 01 */ V(9, 8, 2), /* 10 */ V(12, 1, 2), /* 11 */ V(4, 11, 2), /* 0101 0001 ... */ /* 000 */ V(12, 0, 3), /* 300 */ /* 001 */ V(0, 11, 3), /* 010 */ V(3, 11, 2), /* 011 */ V(3, 11, 2), /* 100 */ V(11, 0, 3), /* 101 */ V(0, 10, 3), /* 110 */ V(1, 10, 2), /* 111 */ V(1, 10, 2), /* 0101 0010 ... */ /* 00 */ V(11, 4, 1), /* 308 */ /* 01 */ V(11, 4, 1), /* 10 */ V(6, 10, 2), /* 11 */ V(10, 6, 2), /* 0101 0011 ... */ /* 000 */ V(7, 9, 2), /* 312 */ /* 001 */ V(7, 9, 2), /* 010 */ V(9, 7, 2), /* 011 */ V(9, 7, 2), /* 100 */ V(10, 0, 3), /* 101 */ V(0, 9, 3), /* 110 */ V(9, 0, 2), /* 111 */ V(9, 0, 2), /* 0101 0100 ... */ /* 0 */ V(11, 3, 1), /* 320 */ /* 1 */ V(8, 8, 1), /* 0101 0101 ... */ /* 00 */ V(2, 11, 2), /* 322 */ /* 01 */ V(5, 10, 2), /* 10 */ V(11, 2, 1), /* 11 */ V(11, 2, 1), /* 0101 0110 ... */ /* 00 */ V(10, 5, 2), /* 326 */ /* 01 */ V(1, 11, 2), /* 10 */ V(11, 1, 2), /* 11 */ V(6, 9, 2), /* 0101 0111 ... */ /* 0 */ V(9, 6, 1), /* 330 */ /* 1 */ V(10, 4, 1), /* 0101 1000 ... */ /* 00 */ V(4, 10, 2), /* 332 */ /* 01 */ V(7, 8, 2), /* 10 */ V(8, 7, 1), /* 11 */ V(8, 7, 1), /* 0101 1001 ... */ /* 0 */ V(3, 10, 1), /* 336 */ /* 1 */ V(10, 3, 1), /* 0101 1010 ... */ /* 0 */ V(5, 9, 1), /* 338 */ /* 1 */ V(9, 5, 1), /* 0101 1011 ... */ /* 0 */ V(2, 10, 1), /* 340 */ /* 1 */ V(10, 2, 1), /* 0101 1100 ... */ /* 0 */ V(10, 1, 1), /* 342 */ /* 1 */ V(6, 8, 1), /* 0101 1101 ... */ /* 0 */ V(8, 6, 1), /* 344 */ /* 1 */ V(7, 7, 1), /* 0101 1110 ... */ /* 0 */ V(4, 9, 1), /* 346 */ /* 1 */ V(9, 4, 1), /* 0101 1111 ... */ /* 0 */ V(3, 9, 1), /* 348 */ /* 1 */ V(9, 3, 1), /* 0110 0000 ... */ /* 0 */ V(5, 8, 1), /* 350 */ /* 1 */ V(8, 5, 1), /* 0110 0001 ... */ /* 0 */ V(2, 9, 1), /* 352 */ /* 1 */ V(6, 7, 1), /* 0110 0010 ... */ /* 0 */ V(7, 6, 1), /* 354 */ /* 1 */ V(9, 2, 1), /* 0110 0011 ... */ /* 0 */ V(1, 9, 1), /* 356 */ /* 1 */ V(9, 1, 1), /* 0110 0100 ... */ /* 0 */ V(4, 8, 1), /* 358 */ /* 1 */ V(8, 4, 1), /* 0110 0101 ... */ /* 0 */ V(5, 7, 1), /* 360 */ /* 1 */ V(7, 5, 1), /* 0110 0110 ... */ /* 0 */ V(3, 8, 1), /* 362 */ /* 1 */ V(8, 3, 1), /* 0110 0111 ... */ /* 0 */ V(6, 6, 1), /* 364 */ /* 1 */ V(2, 8, 1), /* 0110 1000 ... */ /* 0 */ V(8, 2, 1), /* 366 */ /* 1 */ V(1, 8, 1), /* 0110 1001 ... */ /* 0 */ V(4, 7, 1), /* 368 */ /* 1 */ V(7, 4, 1), /* 0110 1010 ... */ /* 00 */ V(8, 1, 1), /* 370 */ /* 01 */ V(8, 1, 1), /* 10 */ V(0, 8, 2), /* 11 */ V(8, 0, 2), /* 0110 1011 ... */ /* 0 */ V(5, 6, 1), /* 374 */ /* 1 */ V(6, 5, 1), /* 0110 1100 ... */ /* 00 */ V(1, 7, 1), /* 376 */ /* 01 */ V(1, 7, 1), /* 10 */ V(0, 7, 2), /* 11 */ V(7, 0, 2), /* 0110 1110 ... */ /* 0 */ V(3, 7, 1), /* 380 */ /* 1 */ V(2, 7, 1), /* 0111 1100 ... */ /* 0 */ V(0, 6, 1), /* 382 */ /* 1 */ V(6, 0, 1), /* 1000 0011 ... */ /* 0 */ V(0, 5, 1), /* 384 */ /* 1 */ V(5, 0, 1) }; # undef V # undef PTR /* external tables */ union huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB }; struct hufftable const mad_huff_pair_table[32] = { /* 0 */ { hufftab0, 0, 0 }, /* 1 */ { hufftab1, 0, 3 }, /* 2 */ { hufftab2, 0, 3 }, /* 3 */ { hufftab3, 0, 3 }, /* 4 */ { 0 /* not used */ }, /* 5 */ { hufftab5, 0, 3 }, /* 6 */ { hufftab6, 0, 4 }, /* 7 */ { hufftab7, 0, 4 }, /* 8 */ { hufftab8, 0, 4 }, /* 9 */ { hufftab9, 0, 4 }, /* 10 */ { hufftab10, 0, 4 }, /* 11 */ { hufftab11, 0, 4 }, /* 12 */ { hufftab12, 0, 4 }, /* 13 */ { hufftab13, 0, 4 }, /* 14 */ { 0 /* not used */ }, /* 15 */ { hufftab15, 0, 4 }, /* 16 */ { hufftab16, 1, 4 }, /* 17 */ { hufftab16, 2, 4 }, /* 18 */ { hufftab16, 3, 4 }, /* 19 */ { hufftab16, 4, 4 }, /* 20 */ { hufftab16, 6, 4 }, /* 21 */ { hufftab16, 8, 4 }, /* 22 */ { hufftab16, 10, 4 }, /* 23 */ { hufftab16, 13, 4 }, /* 24 */ { hufftab24, 4, 4 }, /* 25 */ { hufftab24, 5, 4 }, /* 26 */ { hufftab24, 6, 4 }, /* 27 */ { hufftab24, 7, 4 }, /* 28 */ { hufftab24, 8, 4 }, /* 29 */ { hufftab24, 9, 4 }, /* 30 */ { hufftab24, 11, 4 }, /* 31 */ { hufftab24, 13, 4 } }; ================================================ FILE: 3rdParty/libmad/include/huffman.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: huffman.h,v 1.11 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_HUFFMAN_H # define LIBMAD_HUFFMAN_H union huffquad { struct { unsigned short final : 1; unsigned short bits : 3; unsigned short offset : 12; } ptr; struct { unsigned short final : 1; unsigned short hlen : 3; unsigned short v : 1; unsigned short w : 1; unsigned short x : 1; unsigned short y : 1; } value; unsigned short final : 1; }; union huffpair { struct { unsigned short final : 1; unsigned short bits : 3; unsigned short offset : 12; } ptr; struct { unsigned short final : 1; unsigned short hlen : 3; unsigned short x : 4; unsigned short y : 4; } value; unsigned short final : 1; }; struct hufftable { union huffpair const *table; unsigned short linbits; unsigned short startbits; }; extern union huffquad const *const mad_huff_quad_table[2]; extern struct hufftable const mad_huff_pair_table[32]; # endif ================================================ FILE: 3rdParty/libmad/include/layer12.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: layer12.c,v 1.17 2004/02/05 09:02:39 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "fixed.h" # include "bit.h" # include "stream.h" # include "frame.h" # include "layer12.h" /* * scalefactor table * used in both Layer I and Layer II decoding */ static mad_fixed_t const sf_table[64] = { # include "sf_table.dat" }; /* --- Layer I ------------------------------------------------------------- */ /* linear scaling table */ static mad_fixed_t const linear_table[14] = { MAD_F(0x15555555), /* 2^2 / (2^2 - 1) == 1.33333333333333 */ MAD_F(0x12492492), /* 2^3 / (2^3 - 1) == 1.14285714285714 */ MAD_F(0x11111111), /* 2^4 / (2^4 - 1) == 1.06666666666667 */ MAD_F(0x10842108), /* 2^5 / (2^5 - 1) == 1.03225806451613 */ MAD_F(0x10410410), /* 2^6 / (2^6 - 1) == 1.01587301587302 */ MAD_F(0x10204081), /* 2^7 / (2^7 - 1) == 1.00787401574803 */ MAD_F(0x10101010), /* 2^8 / (2^8 - 1) == 1.00392156862745 */ MAD_F(0x10080402), /* 2^9 / (2^9 - 1) == 1.00195694716243 */ MAD_F(0x10040100), /* 2^10 / (2^10 - 1) == 1.00097751710655 */ MAD_F(0x10020040), /* 2^11 / (2^11 - 1) == 1.00048851978505 */ MAD_F(0x10010010), /* 2^12 / (2^12 - 1) == 1.00024420024420 */ MAD_F(0x10008004), /* 2^13 / (2^13 - 1) == 1.00012208521548 */ MAD_F(0x10004001), /* 2^14 / (2^14 - 1) == 1.00006103888177 */ MAD_F(0x10002000) /* 2^15 / (2^15 - 1) == 1.00003051850948 */ }; /* * NAME: I_sample() * DESCRIPTION: decode one requantized Layer I sample from a bitstream */ static mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) { mad_fixed_t sample; sample = mad_bit_read(ptr, nb); /* invert most significant bit, extend sign, then scale to fixed format */ sample ^= 1 << (nb - 1); sample |= -(sample & (1 << (nb - 1))); sample <<= MAD_F_FRACBITS - (nb - 1); /* requantize the sample */ /* s'' = (2^nb / (2^nb - 1)) * (s''' + 2^(-nb + 1)) */ sample += MAD_F_ONE >> (nb - 1); return mad_f_mul(sample, linear_table[nb - 2]); /* s' = factor * s'' */ /* (to be performed by caller) */ } /* * NAME: layer->I() * DESCRIPTION: decode a single Layer I frame */ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; unsigned int nch, bound, ch, s, sb, nb; unsigned char allocation[2][32], scalefactor[2][32]; nch = MAD_NCHANNELS(header); bound = 32; if (header->mode == MAD_MODE_JOINT_STEREO) { header->flags |= MAD_FLAG_I_STEREO; bound = 4 + header->mode_extension * 4; } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; return -1; } } /* decode bit allocations */ for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { nb = mad_bit_read(&stream->ptr, 4); if (nb == 15) { stream->error = MAD_ERROR_BADBITALLOC; return -1; } allocation[ch][sb] = nb ? nb + 1 : 0; } } for (sb = bound; sb < 32; ++sb) { nb = mad_bit_read(&stream->ptr, 4); if (nb == 15) { stream->error = MAD_ERROR_BADBITALLOC; return -1; } allocation[0][sb] = allocation[1][sb] = nb ? nb + 1 : 0; } /* decode scalefactors */ for (sb = 0; sb < 32; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) { scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); # if defined(OPT_STRICT) /* * Scalefactor index 63 does not appear in Table B.1 of * ISO/IEC 11172-3. Nonetheless, other implementations accept it, * so we only reject it if OPT_STRICT is defined. */ if (scalefactor[ch][sb] == 63) { stream->error = MAD_ERROR_BADSCALEFACTOR; return -1; } # endif } } } /* decode samples */ for (s = 0; s < 12; ++s) { for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { nb = allocation[ch][sb]; frame->sbsample[ch][s][sb] = nb ? mad_f_mul(I_sample(&stream->ptr, nb), sf_table[scalefactor[ch][sb]]) : 0; } } for (sb = bound; sb < 32; ++sb) { if ((nb = allocation[0][sb])) { mad_fixed_t sample; sample = I_sample(&stream->ptr, nb); for (ch = 0; ch < nch; ++ch) { frame->sbsample[ch][s][sb] = mad_f_mul(sample, sf_table[scalefactor[ch][sb]]); } } else { for (ch = 0; ch < nch; ++ch) frame->sbsample[ch][s][sb] = 0; } } } return 0; } /* --- Layer II ------------------------------------------------------------ */ /* possible quantization per subband table */ static struct { unsigned int sblimit; unsigned char const offsets[30]; } const sbquant_table[5] = { /* ISO/IEC 11172-3 Table B.2a */ { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 0 */ 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } }, /* ISO/IEC 11172-3 Table B.2b */ { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 1 */ 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } }, /* ISO/IEC 11172-3 Table B.2c */ { 8, { 5, 5, 2, 2, 2, 2, 2, 2 } }, /* 2 */ /* ISO/IEC 11172-3 Table B.2d */ { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } }, /* 3 */ /* ISO/IEC 13818-3 Table B.1 */ { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 4 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } } }; /* bit allocation table */ static struct { unsigned short nbal; unsigned short offset; } const bitalloc_table[8] = { { 2, 0 }, /* 0 */ { 2, 3 }, /* 1 */ { 3, 3 }, /* 2 */ { 3, 1 }, /* 3 */ { 4, 2 }, /* 4 */ { 4, 3 }, /* 5 */ { 4, 4 }, /* 6 */ { 4, 5 } /* 7 */ }; /* offsets into quantization class table */ static unsigned char const offset_table[6][15] = { { 0, 1, 16 }, /* 0 */ { 0, 1, 2, 3, 4, 5, 16 }, /* 1 */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* 2 */ { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* 3 */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16 }, /* 4 */ { 0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 } /* 5 */ }; /* quantization class table */ static struct quantclass { unsigned short nlevels; unsigned char group; unsigned char bits; mad_fixed_t C; mad_fixed_t D; } const qc_table[17] = { # include "qc_table.dat" }; /* * NAME: II_samples() * DESCRIPTION: decode three requantized Layer II samples from a bitstream */ static void II_samples(struct mad_bitptr *ptr, struct quantclass const *quantclass, mad_fixed_t output[3]) { unsigned int nb, s, sample[3]; if ((nb = quantclass->group)) { unsigned int c, nlevels; /* degrouping */ c = mad_bit_read(ptr, quantclass->bits); nlevels = quantclass->nlevels; for (s = 0; s < 3; ++s) { sample[s] = c % nlevels; c /= nlevels; } } else { nb = quantclass->bits; for (s = 0; s < 3; ++s) sample[s] = mad_bit_read(ptr, nb); } for (s = 0; s < 3; ++s) { mad_fixed_t requantized; /* invert most significant bit, extend sign, then scale to fixed format */ requantized = sample[s] ^ (1 << (nb - 1)); requantized |= -(requantized & (1 << (nb - 1))); requantized <<= MAD_F_FRACBITS - (nb - 1); /* requantize the sample */ /* s'' = C * (s''' + D) */ output[s] = mad_f_mul(requantized + quantclass->D, quantclass->C); /* s' = factor * s'' */ /* (to be performed by caller) */ } } /* * NAME: layer->II() * DESCRIPTION: decode a single Layer II frame */ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; struct mad_bitptr start; unsigned int index, sblimit, nbal, nch, bound, gr, ch, s, sb; unsigned char const *offsets; unsigned char allocation[2][32], scfsi[2][32], scalefactor[2][32][3]; mad_fixed_t samples[3]; nch = MAD_NCHANNELS(header); if (header->flags & MAD_FLAG_LSF_EXT) index = 4; else if (header->flags & MAD_FLAG_FREEFORMAT) goto freeformat; else { unsigned long bitrate_per_channel; bitrate_per_channel = header->bitrate; if (nch == 2) { bitrate_per_channel /= 2; # if defined(OPT_STRICT) /* * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and * 80 kbps bitrates in Layer II, but some encoders ignore this * restriction. We enforce it if OPT_STRICT is defined. */ if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) { stream->error = MAD_ERROR_BADMODE; return -1; } # endif } else { /* nch == 1 */ if (bitrate_per_channel > 192000) { /* * ISO/IEC 11172-3 does not allow single channel mode for 224, 256, * 320, or 384 kbps bitrates in Layer II. */ stream->error = MAD_ERROR_BADMODE; return -1; } } if (bitrate_per_channel <= 48000) index = (header->samplerate == 32000) ? 3 : 2; else if (bitrate_per_channel <= 80000) index = 0; else { freeformat: index = (header->samplerate == 48000) ? 0 : 1; } } sblimit = sbquant_table[index].sblimit; offsets = sbquant_table[index].offsets; bound = 32; if (header->mode == MAD_MODE_JOINT_STEREO) { header->flags |= MAD_FLAG_I_STEREO; bound = 4 + header->mode_extension * 4; } if (bound > sblimit) bound = sblimit; start = stream->ptr; /* decode bit allocations */ for (sb = 0; sb < bound; ++sb) { nbal = bitalloc_table[offsets[sb]].nbal; for (ch = 0; ch < nch; ++ch) allocation[ch][sb] = mad_bit_read(&stream->ptr, nbal); } for (sb = bound; sb < sblimit; ++sb) { nbal = bitalloc_table[offsets[sb]].nbal; allocation[0][sb] = allocation[1][sb] = mad_bit_read(&stream->ptr, nbal); } /* decode scalefactor selection info */ for (sb = 0; sb < sblimit; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); } } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(start, mad_bit_length(&start, &stream->ptr), header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; return -1; } } /* decode scalefactors */ for (sb = 0; sb < sblimit; ++sb) { for (ch = 0; ch < nch; ++ch) { if (allocation[ch][sb]) { scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); switch (scfsi[ch][sb]) { case 2: scalefactor[ch][sb][2] = scalefactor[ch][sb][1] = scalefactor[ch][sb][0]; break; case 0: scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); /* fall through */ case 1: case 3: scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); } if (scfsi[ch][sb] & 1) scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1]; # if defined(OPT_STRICT) /* * Scalefactor index 63 does not appear in Table B.1 of * ISO/IEC 11172-3. Nonetheless, other implementations accept it, * so we only reject it if OPT_STRICT is defined. */ if (scalefactor[ch][sb][0] == 63 || scalefactor[ch][sb][1] == 63 || scalefactor[ch][sb][2] == 63) { stream->error = MAD_ERROR_BADSCALEFACTOR; return -1; } # endif } } } /* decode samples */ for (gr = 0; gr < 12; ++gr) { for (sb = 0; sb < bound; ++sb) { for (ch = 0; ch < nch; ++ch) { if ((index = allocation[ch][sb])) { index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; II_samples(&stream->ptr, &qc_table[index], samples); for (s = 0; s < 3; ++s) { frame->sbsample[ch][3 * gr + s][sb] = mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); } } else { for (s = 0; s < 3; ++s) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } for (sb = bound; sb < sblimit; ++sb) { if ((index = allocation[0][sb])) { index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; II_samples(&stream->ptr, &qc_table[index], samples); for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) { frame->sbsample[ch][3 * gr + s][sb] = mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); } } } else { for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } for (ch = 0; ch < nch; ++ch) { for (s = 0; s < 3; ++s) { for (sb = sblimit; sb < 32; ++sb) frame->sbsample[ch][3 * gr + s][sb] = 0; } } } return 0; } ================================================ FILE: 3rdParty/libmad/include/layer12.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_LAYER12_H # define LIBMAD_LAYER12_H # include "stream.h" # include "frame.h" int mad_layer_I(struct mad_stream *, struct mad_frame *); int mad_layer_II(struct mad_stream *, struct mad_frame *); # endif ================================================ FILE: 3rdParty/libmad/include/layer3.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: layer3.c,v 1.43 2004/01/23 09:41:32 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include # ifdef HAVE_ASSERT_H # include # endif # ifdef HAVE_LIMITS_H # include # else # define CHAR_BIT 8 # endif # include "fixed.h" # include "bit.h" # include "stream.h" # include "frame.h" # include "huffman.h" # include "layer3.h" /* --- Layer III ----------------------------------------------------------- */ enum { count1table_select = 0x01, scalefac_scale = 0x02, preflag = 0x04, mixed_block_flag = 0x08 }; enum { I_STEREO = 0x1, MS_STEREO = 0x2 }; struct sideinfo { unsigned int main_data_begin; unsigned int private_bits; unsigned char scfsi[2]; struct granule { struct channel { /* from side info */ unsigned short part2_3_length; unsigned short big_values; unsigned short global_gain; unsigned short scalefac_compress; unsigned char flags; unsigned char block_type; unsigned char table_select[3]; unsigned char subblock_gain[3]; unsigned char region0_count; unsigned char region1_count; /* from main_data */ unsigned char scalefac[39]; /* scalefac_l and/or scalefac_s */ } ch[2]; } gr[2]; }; /* * scalefactor bit lengths * derived from section 2.4.2.7 of ISO/IEC 11172-3 */ static struct { unsigned char slen1; unsigned char slen2; } const sflen_table[16] = { { 0, 0 }, { 0, 1 }, { 0, 2 }, { 0, 3 }, { 3, 0 }, { 1, 1 }, { 1, 2 }, { 1, 3 }, { 2, 1 }, { 2, 2 }, { 2, 3 }, { 3, 1 }, { 3, 2 }, { 3, 3 }, { 4, 2 }, { 4, 3 } }; /* * number of LSF scalefactor band values * derived from section 2.4.3.2 of ISO/IEC 13818-3 */ static unsigned char const nsfb_table[6][3][4] = { { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } }, { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } }, { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } }, { { 7, 7, 7, 0 }, { 12, 12, 12, 0 }, { 6, 15, 12, 0 } }, { { 6, 6, 6, 3 }, { 12, 9, 9, 6 }, { 6, 12, 9, 6 } }, { { 8, 8, 5, 0 }, { 15, 12, 9, 0 }, { 6, 18, 9, 0 } } }; /* * MPEG-1 scalefactor band widths * derived from Table B.8 of ISO/IEC 11172-3 */ static unsigned char const sfb_48000_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 10, 12, 16, 18, 22, 28, 34, 40, 46, 54, 54, 192 }; static unsigned char const sfb_44100_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 8, 8, 10, 12, 16, 20, 24, 28, 34, 42, 50, 54, 76, 158 }; static unsigned char const sfb_32000_long[] = { 4, 4, 4, 4, 4, 4, 6, 6, 8, 10, 12, 16, 20, 24, 30, 38, 46, 56, 68, 84, 102, 26 }; static unsigned char const sfb_48000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 10, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 }; static unsigned char const sfb_44100_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 }; static unsigned char const sfb_32000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 }; static unsigned char const sfb_48000_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 6, 6, 6, 10, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 16, 20, 20, 20, 26, 26, 26, 66, 66, 66 }; static unsigned char const sfb_44100_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 22, 22, 22, 30, 30, 30, 56, 56, 56 }; static unsigned char const sfb_32000_mixed[] = { /* long */ 4, 4, 4, 4, 4, 4, 6, 6, /* short */ 4, 4, 4, 6, 6, 6, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 26, 26, 26, 34, 34, 34, 42, 42, 42, 12, 12, 12 }; /* * MPEG-2 scalefactor band widths * derived from Table B.2 of ISO/IEC 13818-3 */ static unsigned char const sfb_24000_long[] = { 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, 18, 22, 26, 32, 38, 46, 54, 62, 70, 76, 36 }; static unsigned char const sfb_22050_long[] = { 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54 }; # define sfb_16000_long sfb_22050_long static unsigned char const sfb_24000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 }; static unsigned char const sfb_22050_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 10, 10, 10, 14, 14, 14, 18, 18, 18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 }; static unsigned char const sfb_16000_short[] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 }; static unsigned char const sfb_24000_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 32, 32, 32, 44, 44, 44, 12, 12, 12 }; static unsigned char const sfb_22050_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 6, 6, 6, 8, 8, 8, 10, 10, 10, 14, 14, 14, 18, 18, 18, 26, 26, 26, 32, 32, 32, 42, 42, 42, 18, 18, 18 }; static unsigned char const sfb_16000_mixed[] = { /* long */ 6, 6, 6, 6, 6, 6, /* short */ 6, 6, 6, 8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14, 14, 18, 18, 18, 24, 24, 24, 30, 30, 30, 40, 40, 40, 18, 18, 18 }; /* * MPEG 2.5 scalefactor band widths * derived from public sources */ # define sfb_12000_long sfb_16000_long # define sfb_11025_long sfb_12000_long static unsigned char const sfb_8000_long[] = { 12, 12, 12, 12, 12, 12, 16, 20, 24, 28, 32, 40, 48, 56, 64, 76, 90, 2, 2, 2, 2, 2 }; # define sfb_12000_short sfb_16000_short # define sfb_11025_short sfb_12000_short static unsigned char const sfb_8000_short[] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 }; # define sfb_12000_mixed sfb_16000_mixed # define sfb_11025_mixed sfb_12000_mixed /* the 8000 Hz short block scalefactor bands do not break after the first 36 frequency lines, so this is probably wrong */ static unsigned char const sfb_8000_mixed[] = { /* long */ 12, 12, 12, /* short */ 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 24, 28, 28, 28, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 26, 26 }; static struct { unsigned char const *l; unsigned char const *s; unsigned char const *m; } const sfbwidth_table[9] = { { sfb_48000_long, sfb_48000_short, sfb_48000_mixed }, { sfb_44100_long, sfb_44100_short, sfb_44100_mixed }, { sfb_32000_long, sfb_32000_short, sfb_32000_mixed }, { sfb_24000_long, sfb_24000_short, sfb_24000_mixed }, { sfb_22050_long, sfb_22050_short, sfb_22050_mixed }, { sfb_16000_long, sfb_16000_short, sfb_16000_mixed }, { sfb_12000_long, sfb_12000_short, sfb_12000_mixed }, { sfb_11025_long, sfb_11025_short, sfb_11025_mixed }, { sfb_8000_long, sfb_8000_short, sfb_8000_mixed } }; /* * scalefactor band preemphasis (used only when preflag is set) * derived from Table B.6 of ISO/IEC 11172-3 */ static unsigned char const pretab[22] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 }; /* * table for requantization * * rq_table[x].mantissa * 2^(rq_table[x].exponent) = x^(4/3) */ static struct fixedfloat { unsigned long mantissa : 27; unsigned short exponent : 5; } const rq_table[8207] = { # include "rq_table.dat" }; /* * fractional powers of two * used for requantization and joint stereo decoding * * root_table[3 + x] = 2^(x/4) */ static mad_fixed_t const root_table[7] = { MAD_F(0x09837f05) /* 2^(-3/4) == 0.59460355750136 */, MAD_F(0x0b504f33) /* 2^(-2/4) == 0.70710678118655 */, MAD_F(0x0d744fcd) /* 2^(-1/4) == 0.84089641525371 */, MAD_F(0x10000000) /* 2^( 0/4) == 1.00000000000000 */, MAD_F(0x1306fe0a) /* 2^(+1/4) == 1.18920711500272 */, MAD_F(0x16a09e66) /* 2^(+2/4) == 1.41421356237310 */, MAD_F(0x1ae89f99) /* 2^(+3/4) == 1.68179283050743 */ }; /* * coefficients for aliasing reduction * derived from Table B.9 of ISO/IEC 11172-3 * * c[] = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 } * cs[i] = 1 / sqrt(1 + c[i]^2) * ca[i] = c[i] / sqrt(1 + c[i]^2) */ static mad_fixed_t const cs[8] = { +MAD_F(0x0db84a81) /* +0.857492926 */, +MAD_F(0x0e1b9d7f) /* +0.881741997 */, +MAD_F(0x0f31adcf) /* +0.949628649 */, +MAD_F(0x0fbba815) /* +0.983314592 */, +MAD_F(0x0feda417) /* +0.995517816 */, +MAD_F(0x0ffc8fc8) /* +0.999160558 */, +MAD_F(0x0fff964c) /* +0.999899195 */, +MAD_F(0x0ffff8d3) /* +0.999993155 */ }; static mad_fixed_t const ca[8] = { -MAD_F(0x083b5fe7) /* -0.514495755 */, -MAD_F(0x078c36d2) /* -0.471731969 */, -MAD_F(0x05039814) /* -0.313377454 */, -MAD_F(0x02e91dd1) /* -0.181913200 */, -MAD_F(0x0183603a) /* -0.094574193 */, -MAD_F(0x00a7cb87) /* -0.040965583 */, -MAD_F(0x003a2847) /* -0.014198569 */, -MAD_F(0x000f27b4) /* -0.003699975 */ }; /* * IMDCT coefficients for short blocks * derived from section 2.4.3.4.10.2 of ISO/IEC 11172-3 * * imdct_s[i/even][k] = cos((PI / 24) * (2 * (i / 2) + 7) * (2 * k + 1)) * imdct_s[i /odd][k] = cos((PI / 24) * (2 * (6 + (i-1)/2) + 7) * (2 * k + 1)) */ static mad_fixed_t const imdct_s[6][6] = { # include "imdct_s.dat" }; # if !defined(ASO_IMDCT) /* * windowing coefficients for long blocks * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 * * window_l[i] = sin((PI / 36) * (i + 1/2)) */ static mad_fixed_t const window_l[36] = { MAD_F(0x00b2aa3e) /* 0.043619387 */, MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0ffc19fd) /* 0.999048222 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0f9ee890) /* 0.976296007 */, MAD_F(0x0f426cb5) /* 0.953716951 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0e313245) /* 0.887010833 */, MAD_F(0x0d7e8807) /* 0.843391446 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0bcbe352) /* 0.737277337 */, MAD_F(0x0acf37ad) /* 0.675590208 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0898c779) /* 0.537299608 */, MAD_F(0x07635284) /* 0.461748613 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x04cfb0e2) /* 0.300705800 */, MAD_F(0x03768962) /* 0.216439614 */, MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x00b2aa3e) /* 0.043619387 */, }; # endif /* ASO_IMDCT */ /* * windowing coefficients for short blocks * derived from section 2.4.3.4.10.3 of ISO/IEC 11172-3 * * window_s[i] = sin((PI / 12) * (i + 1/2)) */ static mad_fixed_t const window_s[12] = { MAD_F(0x0216a2a2) /* 0.130526192 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0fdcf549) /* 0.991444861 */, MAD_F(0x0ec835e8) /* 0.923879533 */, MAD_F(0x0cb19346) /* 0.793353340 */, MAD_F(0x09bd7ca0) /* 0.608761429 */, MAD_F(0x061f78aa) /* 0.382683432 */, MAD_F(0x0216a2a2) /* 0.130526192 */, }; /* * coefficients for intensity stereo processing * derived from section 2.4.3.4.9.3 of ISO/IEC 11172-3 * * is_ratio[i] = tan(i * (PI / 12)) * is_table[i] = is_ratio[i] / (1 + is_ratio[i]) */ static mad_fixed_t const is_table[7] = { MAD_F(0x00000000) /* 0.000000000 */, MAD_F(0x0361962f) /* 0.211324865 */, MAD_F(0x05db3d74) /* 0.366025404 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x0a24c28c) /* 0.633974596 */, MAD_F(0x0c9e69d1) /* 0.788675135 */, MAD_F(0x10000000) /* 1.000000000 */ }; /* * coefficients for LSF intensity stereo processing * derived from section 2.4.3.2 of ISO/IEC 13818-3 * * is_lsf_table[0][i] = (1 / sqrt(sqrt(2)))^(i + 1) * is_lsf_table[1][i] = (1 / sqrt(2)) ^(i + 1) */ static mad_fixed_t const is_lsf_table[2][15] = { { MAD_F(0x0d744fcd) /* 0.840896415 */, MAD_F(0x0b504f33) /* 0.707106781 */, MAD_F(0x09837f05) /* 0.594603558 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x06ba27e6) /* 0.420448208 */, MAD_F(0x05a8279a) /* 0.353553391 */, MAD_F(0x04c1bf83) /* 0.297301779 */, MAD_F(0x04000000) /* 0.250000000 */, MAD_F(0x035d13f3) /* 0.210224104 */, MAD_F(0x02d413cd) /* 0.176776695 */, MAD_F(0x0260dfc1) /* 0.148650889 */, MAD_F(0x02000000) /* 0.125000000 */, MAD_F(0x01ae89fa) /* 0.105112052 */, MAD_F(0x016a09e6) /* 0.088388348 */, MAD_F(0x01306fe1) /* 0.074325445 */ }, { MAD_F(0x0b504f33) /* 0.707106781 */, MAD_F(0x08000000) /* 0.500000000 */, MAD_F(0x05a8279a) /* 0.353553391 */, MAD_F(0x04000000) /* 0.250000000 */, MAD_F(0x02d413cd) /* 0.176776695 */, MAD_F(0x02000000) /* 0.125000000 */, MAD_F(0x016a09e6) /* 0.088388348 */, MAD_F(0x01000000) /* 0.062500000 */, MAD_F(0x00b504f3) /* 0.044194174 */, MAD_F(0x00800000) /* 0.031250000 */, MAD_F(0x005a827a) /* 0.022097087 */, MAD_F(0x00400000) /* 0.015625000 */, MAD_F(0x002d413d) /* 0.011048543 */, MAD_F(0x00200000) /* 0.007812500 */, MAD_F(0x0016a09e) /* 0.005524272 */ } }; /* * NAME: III_sideinfo() * DESCRIPTION: decode frame side information from a bitstream */ static enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, int lsf, struct sideinfo *si, unsigned int *data_bitlen, unsigned int *priv_bitlen) { unsigned int ngr, gr, ch, i; enum mad_error result = MAD_ERROR_NONE; *data_bitlen = 0; *priv_bitlen = lsf ? ((nch == 1) ? 1 : 2) : ((nch == 1) ? 5 : 3); si->main_data_begin = mad_bit_read(ptr, lsf ? 8 : 9); si->private_bits = mad_bit_read(ptr, *priv_bitlen); ngr = 1; if (!lsf) { ngr = 2; for (ch = 0; ch < nch; ++ch) si->scfsi[ch] = mad_bit_read(ptr, 4); } for (gr = 0; gr < ngr; ++gr) { struct granule *granule = &si->gr[gr]; for (ch = 0; ch < nch; ++ch) { struct channel *channel = &granule->ch[ch]; channel->part2_3_length = mad_bit_read(ptr, 12); channel->big_values = mad_bit_read(ptr, 9); channel->global_gain = mad_bit_read(ptr, 8); channel->scalefac_compress = mad_bit_read(ptr, lsf ? 9 : 4); *data_bitlen += channel->part2_3_length; if (channel->big_values > 288 && result == 0) result = MAD_ERROR_BADBIGVALUES; channel->flags = 0; /* window_switching_flag */ if (mad_bit_read(ptr, 1)) { channel->block_type = mad_bit_read(ptr, 2); if (channel->block_type == 0 && result == 0) result = MAD_ERROR_BADBLOCKTYPE; if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0) result = MAD_ERROR_BADSCFSI; channel->region0_count = 7; channel->region1_count = 36; if (mad_bit_read(ptr, 1)) channel->flags |= mixed_block_flag; else if (channel->block_type == 2) channel->region0_count = 8; for (i = 0; i < 2; ++i) channel->table_select[i] = mad_bit_read(ptr, 5); # if defined(DEBUG) channel->table_select[2] = 4; /* not used */ # endif for (i = 0; i < 3; ++i) channel->subblock_gain[i] = mad_bit_read(ptr, 3); } else { channel->block_type = 0; for (i = 0; i < 3; ++i) channel->table_select[i] = mad_bit_read(ptr, 5); channel->region0_count = mad_bit_read(ptr, 4); channel->region1_count = mad_bit_read(ptr, 3); } /* [preflag,] scalefac_scale, count1table_select */ channel->flags |= mad_bit_read(ptr, lsf ? 2 : 3); } } return result; } /* * NAME: III_scalefactors_lsf() * DESCRIPTION: decode channel scalefactors for LSF from a bitstream */ static unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, struct channel *channel, struct channel *gr1ch, int mode_extension) { struct mad_bitptr start; unsigned int scalefac_compress, index, slen[4], part, n, i; unsigned char const *nsfb; start = *ptr; scalefac_compress = channel->scalefac_compress; index = (channel->block_type == 2) ? ((channel->flags & mixed_block_flag) ? 2 : 1) : 0; if (!((mode_extension & I_STEREO) && gr1ch)) { if (scalefac_compress < 400) { slen[0] = (scalefac_compress >> 4) / 5; slen[1] = (scalefac_compress >> 4) % 5; slen[2] = (scalefac_compress % 16) >> 2; slen[3] = scalefac_compress % 4; nsfb = nsfb_table[0][index]; } else if (scalefac_compress < 500) { scalefac_compress -= 400; slen[0] = (scalefac_compress >> 2) / 5; slen[1] = (scalefac_compress >> 2) % 5; slen[2] = scalefac_compress % 4; slen[3] = 0; nsfb = nsfb_table[1][index]; } else { scalefac_compress -= 500; slen[0] = scalefac_compress / 3; slen[1] = scalefac_compress % 3; slen[2] = 0; slen[3] = 0; channel->flags |= preflag; nsfb = nsfb_table[2][index]; } n = 0; for (part = 0; part < 4; ++part) { for (i = 0; i < nsfb[part]; ++i) channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); } while (n < 39) channel->scalefac[n++] = 0; } else { /* (mode_extension & I_STEREO) && gr1ch (i.e. ch == 1) */ scalefac_compress >>= 1; if (scalefac_compress < 180) { slen[0] = scalefac_compress / 36; slen[1] = (scalefac_compress % 36) / 6; slen[2] = (scalefac_compress % 36) % 6; slen[3] = 0; nsfb = nsfb_table[3][index]; } else if (scalefac_compress < 244) { scalefac_compress -= 180; slen[0] = (scalefac_compress % 64) >> 4; slen[1] = (scalefac_compress % 16) >> 2; slen[2] = scalefac_compress % 4; slen[3] = 0; nsfb = nsfb_table[4][index]; } else { scalefac_compress -= 244; slen[0] = scalefac_compress / 3; slen[1] = scalefac_compress % 3; slen[2] = 0; slen[3] = 0; nsfb = nsfb_table[5][index]; } n = 0; for (part = 0; part < 4; ++part) { unsigned int max, is_pos; max = (1 << slen[part]) - 1; for (i = 0; i < nsfb[part]; ++i) { is_pos = mad_bit_read(ptr, slen[part]); channel->scalefac[n] = is_pos; gr1ch->scalefac[n++] = (is_pos == max); } } while (n < 39) { channel->scalefac[n] = 0; gr1ch->scalefac[n++] = 0; /* apparently not illegal */ } } return mad_bit_length(&start, ptr); } /* * NAME: III_scalefactors() * DESCRIPTION: decode channel scalefactors of one granule from a bitstream */ static unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, struct channel const *gr0ch, unsigned int scfsi) { struct mad_bitptr start; unsigned int slen1, slen2, sfbi; start = *ptr; slen1 = sflen_table[channel->scalefac_compress].slen1; slen2 = sflen_table[channel->scalefac_compress].slen2; if (channel->block_type == 2) { unsigned int nsfb; sfbi = 0; nsfb = (channel->flags & mixed_block_flag) ? 8 + 3 * 3 : 6 * 3; while (nsfb--) channel->scalefac[sfbi++] = mad_bit_read(ptr, slen1); nsfb = 6 * 3; while (nsfb--) channel->scalefac[sfbi++] = mad_bit_read(ptr, slen2); nsfb = 1 * 3; while (nsfb--) channel->scalefac[sfbi++] = 0; } else { /* channel->block_type != 2 */ if (scfsi & 0x8) { for (sfbi = 0; sfbi < 6; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 0; sfbi < 6; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); } if (scfsi & 0x4) { for (sfbi = 6; sfbi < 11; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 6; sfbi < 11; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); } if (scfsi & 0x2) { for (sfbi = 11; sfbi < 16; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 11; sfbi < 16; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); } if (scfsi & 0x1) { for (sfbi = 16; sfbi < 21; ++sfbi) channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; } else { for (sfbi = 16; sfbi < 21; ++sfbi) channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); } channel->scalefac[21] = 0; } return mad_bit_length(&start, ptr); } /* * The Layer III formula for requantization and scaling is defined by * section 2.4.3.4.7.1 of ISO/IEC 11172-3, as follows: * * long blocks: * xr[i] = sign(is[i]) * abs(is[i])^(4/3) * * 2^((1/4) * (global_gain - 210)) * * 2^-(scalefac_multiplier * * (scalefac_l[sfb] + preflag * pretab[sfb])) * * short blocks: * xr[i] = sign(is[i]) * abs(is[i])^(4/3) * * 2^((1/4) * (global_gain - 210 - 8 * subblock_gain[w])) * * 2^-(scalefac_multiplier * scalefac_s[sfb][w]) * * where: * scalefac_multiplier = (scalefac_scale + 1) / 2 * * The routines III_exponents() and III_requantize() facilitate this * calculation. */ /* * NAME: III_exponents() * DESCRIPTION: calculate scalefactor exponents */ static void III_exponents(struct channel const *channel, unsigned char const *sfbwidth, signed int exponents[39]) { signed int gain; unsigned int scalefac_multiplier, sfbi; gain = (signed int) channel->global_gain - 210; scalefac_multiplier = (channel->flags & scalefac_scale) ? 2 : 1; if (channel->block_type == 2) { unsigned int l; signed int gain0, gain1, gain2; sfbi = l = 0; if (channel->flags & mixed_block_flag) { unsigned int premask; premask = (channel->flags & preflag) ? ~0 : 0; /* long block subbands 0-1 */ while (l < 36) { exponents[sfbi] = gain - (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) << scalefac_multiplier); l += sfbwidth[sfbi++]; } } /* this is probably wrong for 8000 Hz short/mixed blocks */ gain0 = gain - 8 * (signed int) channel->subblock_gain[0]; gain1 = gain - 8 * (signed int) channel->subblock_gain[1]; gain2 = gain - 8 * (signed int) channel->subblock_gain[2]; while (l < 576) { exponents[sfbi + 0] = gain0 - (signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier); exponents[sfbi + 1] = gain1 - (signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier); exponents[sfbi + 2] = gain2 - (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); l += 3 * sfbwidth[sfbi]; sfbi += 3; } } else { /* channel->block_type != 2 */ if (channel->flags & preflag) { for (sfbi = 0; sfbi < 22; ++sfbi) { exponents[sfbi] = gain - (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) << scalefac_multiplier); } } else { for (sfbi = 0; sfbi < 22; ++sfbi) { exponents[sfbi] = gain - (signed int) (channel->scalefac[sfbi] << scalefac_multiplier); } } } } /* * NAME: III_requantize() * DESCRIPTION: requantize one (positive) value */ static mad_fixed_t III_requantize(unsigned int value, signed int exp) { mad_fixed_t requantized; signed int frac; struct fixedfloat const *power; frac = exp % 4; /* assumes sign(frac) == sign(exp) */ exp /= 4; power = &rq_table[value]; requantized = power->mantissa; exp += power->exponent; if (exp < 0) { if (-exp >= sizeof(mad_fixed_t) * CHAR_BIT) { /* underflow */ requantized = 0; } else { requantized += 1L << (-exp - 1); requantized >>= -exp; } } else { if (exp >= 5) { /* overflow */ # if defined(DEBUG) fprintf(stderr, "requantize overflow (%f * 2^%d)\n", mad_f_todouble(requantized), exp); # endif requantized = MAD_F_MAX; } else requantized <<= exp; } return frac ? mad_f_mul(requantized, root_table[3 + frac]) : requantized; } /* we must take care that sz >= bits and sz < sizeof(long) lest bits == 0 */ # define MASK(cache, sz, bits) \ (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1)) # define MASK1BIT(cache, sz) \ ((cache) & (1 << ((sz) - 1))) /* * NAME: III_huffdecode() * DESCRIPTION: decode Huffman code words of one channel of one granule */ static enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576], struct channel *channel, unsigned char const *sfbwidth, unsigned int part2_length) { signed int exponents[39], exp; signed int const *expptr; struct mad_bitptr peek; signed int bits_left, cachesz; register mad_fixed_t *xrptr; mad_fixed_t const *sfbound; register unsigned long bitcache; bits_left = (signed) channel->part2_3_length - (signed) part2_length; if (bits_left < 0) return MAD_ERROR_BADPART3LEN; III_exponents(channel, sfbwidth, exponents); peek = *ptr; mad_bit_skip(ptr, bits_left); /* align bit reads to byte boundaries */ cachesz = mad_bit_bitsleft(&peek); cachesz += ((32 - 1 - 24) + (24 - cachesz)) & ~7; bitcache = mad_bit_read(&peek, cachesz); bits_left -= cachesz; xrptr = &xr[0]; /* big_values */ { unsigned int region, rcount; struct hufftable const *entry; union huffpair const *table; unsigned int linbits, startbits, big_values, reqhits; mad_fixed_t reqcache[16]; sfbound = xrptr + *sfbwidth++; rcount = channel->region0_count + 1; entry = &mad_huff_pair_table[channel->table_select[region = 0]]; table = entry->table; linbits = entry->linbits; startbits = entry->startbits; if (table == 0) return MAD_ERROR_BADHUFFTABLE; expptr = &exponents[0]; exp = *expptr++; reqhits = 0; big_values = channel->big_values; while (big_values-- && cachesz + bits_left > 0) { union huffpair const *pair; unsigned int clumpsz, value; register mad_fixed_t requantized; if (xrptr == sfbound) { sfbound += *sfbwidth++; /* change table if region boundary */ if (--rcount == 0) { if (region == 0) rcount = channel->region1_count + 1; else rcount = 0; /* all remaining */ entry = &mad_huff_pair_table[channel->table_select[++region]]; table = entry->table; linbits = entry->linbits; startbits = entry->startbits; if (table == 0) return MAD_ERROR_BADHUFFTABLE; } if (exp != *expptr) { exp = *expptr; reqhits = 0; } ++expptr; } if (cachesz < 21) { unsigned int bits; bits = ((32 - 1 - 21) + (21 - cachesz)) & ~7; bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); cachesz += bits; bits_left -= bits; } /* hcod (0..19) */ clumpsz = startbits; pair = &table[MASK(bitcache, cachesz, clumpsz)]; while (!pair->final) { cachesz -= clumpsz; clumpsz = pair->ptr.bits; pair = &table[pair->ptr.offset + MASK(bitcache, cachesz, clumpsz)]; } cachesz -= pair->value.hlen; if (linbits) { /* x (0..14) */ value = pair->value.x; switch (value) { case 0: xrptr[0] = 0; break; case 15: if (cachesz < linbits + 2) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } value += MASK(bitcache, cachesz, linbits); cachesz -= linbits; requantized = III_requantize(value, exp); goto x_final; default: if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } x_final: xrptr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } /* y (0..14) */ value = pair->value.y; switch (value) { case 0: xrptr[1] = 0; break; case 15: if (cachesz < linbits + 1) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } value += MASK(bitcache, cachesz, linbits); cachesz -= linbits; requantized = III_requantize(value, exp); goto y_final; default: if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } y_final: xrptr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } } else { /* x (0..1) */ value = pair->value.x; if (value == 0) xrptr[0] = 0; else { if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } xrptr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } /* y (0..1) */ value = pair->value.y; if (value == 0) xrptr[1] = 0; else { if (reqhits & (1 << value)) requantized = reqcache[value]; else { reqhits |= (1 << value); requantized = reqcache[value] = III_requantize(value, exp); } xrptr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; } } xrptr += 2; } } if (cachesz + bits_left < 0) return MAD_ERROR_BADHUFFDATA; /* big_values overrun */ /* count1 */ { union huffquad const *table; register mad_fixed_t requantized; table = mad_huff_quad_table[channel->flags & count1table_select]; requantized = III_requantize(1, exp); while (cachesz + bits_left > 0 && xrptr <= &xr[572]) { union huffquad const *quad; /* hcod (1..6) */ if (cachesz < 10) { bitcache = (bitcache << 16) | mad_bit_read(&peek, 16); cachesz += 16; bits_left -= 16; } quad = &table[MASK(bitcache, cachesz, 4)]; /* quad tables guaranteed to have at most one extra lookup */ if (!quad->final) { cachesz -= 4; quad = &table[quad->ptr.offset + MASK(bitcache, cachesz, quad->ptr.bits)]; } cachesz -= quad->value.hlen; if (xrptr == sfbound) { sfbound += *sfbwidth++; if (exp != *expptr) { exp = *expptr; requantized = III_requantize(1, exp); } ++expptr; } /* v (0..1) */ xrptr[0] = quad->value.v ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; /* w (0..1) */ xrptr[1] = quad->value.w ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; xrptr += 2; if (xrptr == sfbound) { sfbound += *sfbwidth++; if (exp != *expptr) { exp = *expptr; requantized = III_requantize(1, exp); } ++expptr; } /* x (0..1) */ xrptr[0] = quad->value.x ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; /* y (0..1) */ xrptr[1] = quad->value.y ? (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; xrptr += 2; } if (cachesz + bits_left < 0) { # if 0 && defined(DEBUG) fprintf(stderr, "huffman count1 overrun (%d bits)\n", -(cachesz + bits_left)); # endif /* technically the bitstream is misformatted, but apparently some encoders are just a bit sloppy with stuffing bits */ xrptr -= 4; } } assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); # if 0 && defined(DEBUG) if (bits_left < 0) fprintf(stderr, "read %d bits too many\n", -bits_left); else if (cachesz + bits_left > 0) fprintf(stderr, "%d stuffing bits\n", cachesz + bits_left); # endif /* rzero */ while (xrptr < &xr[576]) { xrptr[0] = 0; xrptr[1] = 0; xrptr += 2; } return MAD_ERROR_NONE; } # undef MASK # undef MASK1BIT /* * NAME: III_reorder() * DESCRIPTION: reorder frequency lines of a short block into subband order */ static void III_reorder(mad_fixed_t xr[576], struct channel const *channel, unsigned char const sfbwidth[39]) { mad_fixed_t tmp[32][3][6]; unsigned int sb, l, f, w, sbw[3], sw[3]; /* this is probably wrong for 8000 Hz mixed blocks */ sb = 0; if (channel->flags & mixed_block_flag) { sb = 2; l = 0; while (l < 36) l += *sfbwidth++; } for (w = 0; w < 3; ++w) { sbw[w] = sb; sw[w] = 0; } f = *sfbwidth++; w = 0; for (l = 18 * sb; l < 576; ++l) { if (f-- == 0) { f = *sfbwidth++ - 1; w = (w + 1) % 3; } tmp[sbw[w]][w][sw[w]++] = xr[l]; if (sw[w] == 6) { sw[w] = 0; ++sbw[w]; } } memcpy(&xr[18 * sb], &tmp[sb], (576 - 18 * sb) * sizeof(mad_fixed_t)); } /* * NAME: III_stereo() * DESCRIPTION: perform joint stereo processing on a granule */ static enum mad_error III_stereo(mad_fixed_t xr[2][576], struct granule const *granule, struct mad_header *header, unsigned char const *sfbwidth) { short modes[39]; unsigned int sfbi, l, n, i; if (granule->ch[0].block_type != granule->ch[1].block_type || (granule->ch[0].flags & mixed_block_flag) != (granule->ch[1].flags & mixed_block_flag)) return MAD_ERROR_BADSTEREO; for (i = 0; i < 39; ++i) modes[i] = header->mode_extension; /* intensity stereo */ if (header->mode_extension & I_STEREO) { struct channel const *right_ch = &granule->ch[1]; mad_fixed_t const *right_xr = xr[1]; unsigned int is_pos; header->flags |= MAD_FLAG_I_STEREO; /* first determine which scalefactor bands are to be processed */ if (right_ch->block_type == 2) { unsigned int lower, start, max, bound[3], w; lower = start = max = bound[0] = bound[1] = bound[2] = 0; sfbi = l = 0; if (right_ch->flags & mixed_block_flag) { while (l < 36) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { lower = sfbi; break; } } right_xr += n; l += n; } start = sfbi; } w = 0; while (l < 576) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { max = bound[w] = sfbi; break; } } right_xr += n; l += n; w = (w + 1) % 3; } if (max) lower = start; /* long blocks */ for (i = 0; i < lower; ++i) modes[i] = header->mode_extension & ~I_STEREO; /* short blocks */ w = 0; for (i = start; i < max; ++i) { if (i < bound[w]) modes[i] = header->mode_extension & ~I_STEREO; w = (w + 1) % 3; } } else { /* right_ch->block_type != 2 */ unsigned int bound; bound = 0; for (sfbi = l = 0; l < 576; l += n) { n = sfbwidth[sfbi++]; for (i = 0; i < n; ++i) { if (right_xr[i]) { bound = sfbi; break; } } right_xr += n; } for (i = 0; i < bound; ++i) modes[i] = header->mode_extension & ~I_STEREO; } /* now do the actual processing */ if (header->flags & MAD_FLAG_LSF_EXT) { unsigned char const *illegal_pos = granule[1].ch[1].scalefac; mad_fixed_t const *lsf_scale; /* intensity_scale */ lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1]; for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (!(modes[sfbi] & I_STEREO)) continue; if (illegal_pos[sfbi]) { modes[sfbi] &= ~I_STEREO; continue; } is_pos = right_ch->scalefac[sfbi]; for (i = 0; i < n; ++i) { register mad_fixed_t left; left = xr[0][l + i]; if (is_pos == 0) xr[1][l + i] = left; else { register mad_fixed_t opposite; opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]); if (is_pos & 1) { xr[0][l + i] = opposite; xr[1][l + i] = left; } else xr[1][l + i] = opposite; } } } } else { /* !(header->flags & MAD_FLAG_LSF_EXT) */ for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (!(modes[sfbi] & I_STEREO)) continue; is_pos = right_ch->scalefac[sfbi]; if (is_pos >= 7) { /* illegal intensity position */ modes[sfbi] &= ~I_STEREO; continue; } for (i = 0; i < n; ++i) { register mad_fixed_t left; left = xr[0][l + i]; xr[0][l + i] = mad_f_mul(left, is_table[ is_pos]); xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]); } } } } /* middle/side stereo */ if (header->mode_extension & MS_STEREO) { register mad_fixed_t invsqrt2; header->flags |= MAD_FLAG_MS_STEREO; invsqrt2 = root_table[3 + -2]; for (sfbi = l = 0; l < 576; ++sfbi, l += n) { n = sfbwidth[sfbi]; if (modes[sfbi] != MS_STEREO) continue; for (i = 0; i < n; ++i) { register mad_fixed_t m, s; m = xr[0][l + i]; s = xr[1][l + i]; xr[0][l + i] = mad_f_mul(m + s, invsqrt2); /* l = (m + s) / sqrt(2) */ xr[1][l + i] = mad_f_mul(m - s, invsqrt2); /* r = (m - s) / sqrt(2) */ } } } return MAD_ERROR_NONE; } /* * NAME: III_aliasreduce() * DESCRIPTION: perform frequency line alias reduction */ static void III_aliasreduce(mad_fixed_t xr[576], int lines) { mad_fixed_t const *bound; int i; bound = &xr[lines]; for (xr += 18; xr < bound; xr += 18) { for (i = 0; i < 8; ++i) { register mad_fixed_t a, b; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; a = xr[-1 - i]; b = xr[ i]; # if defined(ASO_ZEROCHECK) if (a | b) { # endif MAD_F_ML0(hi, lo, a, cs[i]); MAD_F_MLA(hi, lo, -b, ca[i]); xr[-1 - i] = MAD_F_MLZ(hi, lo); MAD_F_ML0(hi, lo, b, cs[i]); MAD_F_MLA(hi, lo, a, ca[i]); xr[ i] = MAD_F_MLZ(hi, lo); # if defined(ASO_ZEROCHECK) } # endif } } } # if defined(ASO_IMDCT) void III_imdct_l(mad_fixed_t const [18], mad_fixed_t [36], unsigned int); # else # if 1 static void fastsdct(mad_fixed_t const x[9], mad_fixed_t y[18]) { mad_fixed_t a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12; mad_fixed_t a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25; mad_fixed_t m0, m1, m2, m3, m4, m5, m6, m7; enum { c0 = MAD_F(0x1f838b8d), /* 2 * cos( 1 * PI / 18) */ c1 = MAD_F(0x1bb67ae8), /* 2 * cos( 3 * PI / 18) */ c2 = MAD_F(0x18836fa3), /* 2 * cos( 4 * PI / 18) */ c3 = MAD_F(0x1491b752), /* 2 * cos( 5 * PI / 18) */ c4 = MAD_F(0x0af1d43a), /* 2 * cos( 7 * PI / 18) */ c5 = MAD_F(0x058e86a0), /* 2 * cos( 8 * PI / 18) */ c6 = -MAD_F(0x1e11f642) /* 2 * cos(16 * PI / 18) */ }; a0 = x[3] + x[5]; a1 = x[3] - x[5]; a2 = x[6] + x[2]; a3 = x[6] - x[2]; a4 = x[1] + x[7]; a5 = x[1] - x[7]; a6 = x[8] + x[0]; a7 = x[8] - x[0]; a8 = a0 + a2; a9 = a0 - a2; a10 = a0 - a6; a11 = a2 - a6; a12 = a8 + a6; a13 = a1 - a3; a14 = a13 + a7; a15 = a3 + a7; a16 = a1 - a7; a17 = a1 + a3; m0 = mad_f_mul(a17, -c3); m1 = mad_f_mul(a16, -c0); m2 = mad_f_mul(a15, -c4); m3 = mad_f_mul(a14, -c1); m4 = mad_f_mul(a5, -c1); m5 = mad_f_mul(a11, -c6); m6 = mad_f_mul(a10, -c5); m7 = mad_f_mul(a9, -c2); a18 = x[4] + a4; a19 = 2 * x[4] - a4; a20 = a19 + m5; a21 = a19 - m5; a22 = a19 + m6; a23 = m4 + m2; a24 = m4 - m2; a25 = m4 + m1; /* output to every other slot for convenience */ y[ 0] = a18 + a12; y[ 2] = m0 - a25; y[ 4] = m7 - a20; y[ 6] = m3; y[ 8] = a21 - m6; y[10] = a24 - m1; y[12] = a12 - 2 * a18; y[14] = a23 + m0; y[16] = a22 + m7; } static inline void sdctII(mad_fixed_t const x[18], mad_fixed_t X[18]) { mad_fixed_t tmp[9]; int i; /* scale[i] = 2 * cos(PI * (2 * i + 1) / (2 * 18)) */ static mad_fixed_t const scale[9] = { MAD_F(0x1fe0d3b4), MAD_F(0x1ee8dd47), MAD_F(0x1d007930), MAD_F(0x1a367e59), MAD_F(0x16a09e66), MAD_F(0x125abcf8), MAD_F(0x0d8616bc), MAD_F(0x08483ee1), MAD_F(0x02c9fad7) }; /* divide the 18-point SDCT-II into two 9-point SDCT-IIs */ /* even input butterfly */ for (i = 0; i < 9; i += 3) { tmp[i + 0] = x[i + 0] + x[18 - (i + 0) - 1]; tmp[i + 1] = x[i + 1] + x[18 - (i + 1) - 1]; tmp[i + 2] = x[i + 2] + x[18 - (i + 2) - 1]; } fastsdct(tmp, &X[0]); /* odd input butterfly and scaling */ for (i = 0; i < 9; i += 3) { tmp[i + 0] = mad_f_mul(x[i + 0] - x[18 - (i + 0) - 1], scale[i + 0]); tmp[i + 1] = mad_f_mul(x[i + 1] - x[18 - (i + 1) - 1], scale[i + 1]); tmp[i + 2] = mad_f_mul(x[i + 2] - x[18 - (i + 2) - 1], scale[i + 2]); } fastsdct(tmp, &X[1]); /* output accumulation */ for (i = 3; i < 18; i += 8) { X[i + 0] -= X[(i + 0) - 2]; X[i + 2] -= X[(i + 2) - 2]; X[i + 4] -= X[(i + 4) - 2]; X[i + 6] -= X[(i + 6) - 2]; } } static inline void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18]) { mad_fixed_t tmp[18]; int i; /* scale[i] = 2 * cos(PI * (2 * i + 1) / (4 * 18)) */ static mad_fixed_t const scale[18] = { MAD_F(0x1ff833fa), MAD_F(0x1fb9ea93), MAD_F(0x1f3dd120), MAD_F(0x1e84d969), MAD_F(0x1d906bcf), MAD_F(0x1c62648b), MAD_F(0x1afd100f), MAD_F(0x1963268b), MAD_F(0x1797c6a4), MAD_F(0x159e6f5b), MAD_F(0x137af940), MAD_F(0x11318ef3), MAD_F(0x0ec6a507), MAD_F(0x0c3ef153), MAD_F(0x099f61c5), MAD_F(0x06ed12c5), MAD_F(0x042d4544), MAD_F(0x0165547c) }; /* scaling */ for (i = 0; i < 18; i += 3) { tmp[i + 0] = mad_f_mul(y[i + 0], scale[i + 0]); tmp[i + 1] = mad_f_mul(y[i + 1], scale[i + 1]); tmp[i + 2] = mad_f_mul(y[i + 2], scale[i + 2]); } /* SDCT-II */ sdctII(tmp, X); /* scale reduction and output accumulation */ X[0] /= 2; for (i = 1; i < 17; i += 4) { X[i + 0] = X[i + 0] / 2 - X[(i + 0) - 1]; X[i + 1] = X[i + 1] / 2 - X[(i + 1) - 1]; X[i + 2] = X[i + 2] / 2 - X[(i + 2) - 1]; X[i + 3] = X[i + 3] / 2 - X[(i + 3) - 1]; } X[17] = X[17] / 2 - X[16]; } /* * NAME: imdct36 * DESCRIPTION: perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm */ static inline void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) { mad_fixed_t tmp[18]; int i; /* DCT-IV */ dctIV(x, tmp); /* convert 18-point DCT-IV to 36-point IMDCT */ for (i = 0; i < 9; i += 3) { y[i + 0] = tmp[9 + (i + 0)]; y[i + 1] = tmp[9 + (i + 1)]; y[i + 2] = tmp[9 + (i + 2)]; } for (i = 9; i < 27; i += 3) { y[i + 0] = -tmp[36 - (9 + (i + 0)) - 1]; y[i + 1] = -tmp[36 - (9 + (i + 1)) - 1]; y[i + 2] = -tmp[36 - (9 + (i + 2)) - 1]; } for (i = 27; i < 36; i += 3) { y[i + 0] = -tmp[(i + 0) - 27]; y[i + 1] = -tmp[(i + 1) - 27]; y[i + 2] = -tmp[(i + 2) - 27]; } } # else /* * NAME: imdct36 * DESCRIPTION: perform X[18]->x[36] IMDCT */ static inline void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36]) { mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; MAD_F_ML0(hi, lo, X[4], MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, X[13], MAD_F(0x061f78aa)); t6 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, (t14 = X[1] - X[10]), -MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, (t15 = X[7] + X[16]), -MAD_F(0x0ec835e8)); t0 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, (t8 = X[0] - X[11] - X[12]), MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, (t9 = X[2] - X[9] - X[14]), MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, (t10 = X[3] - X[8] - X[15]), -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, (t11 = X[5] - X[6] - X[17]), -MAD_F(0x0fdcf549)); x[7] = MAD_F_MLZ(hi, lo); x[10] = -x[7]; MAD_F_ML0(hi, lo, t8, -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, t9, MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t10, MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x09bd7ca0)); x[19] = x[34] = MAD_F_MLZ(hi, lo) - t0; t12 = X[0] - X[3] + X[8] - X[11] - X[12] + X[15]; t13 = X[2] + X[5] - X[6] - X[9] - X[14] - X[17]; MAD_F_ML0(hi, lo, t12, -MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, t13, MAD_F(0x061f78aa)); x[22] = x[31] = MAD_F_MLZ(hi, lo) + t0; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[7], MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[10], -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[16], MAD_F(0x0cb19346)); t1 = MAD_F_MLZ(hi, lo) + t6; MAD_F_ML0(hi, lo, X[0], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0f9ee890)); x[6] = MAD_F_MLZ(hi, lo) + t1; x[11] = -x[6]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x04cfb0e2)); x[23] = x[30] = MAD_F_MLZ(hi, lo) + t1; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0acf37ad)); x[18] = x[35] = MAD_F_MLZ(hi, lo) - t1; MAD_F_ML0(hi, lo, X[4], MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, X[13], -MAD_F(0x0ec835e8)); t7 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, X[1], -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[7], MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[10], MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[16], -MAD_F(0x09bd7ca0)); t2 = MAD_F_MLZ(hi, lo); MAD_F_MLA(hi, lo, X[0], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x0f426cb5)); x[5] = MAD_F_MLZ(hi, lo); x[12] = -x[5]; MAD_F_ML0(hi, lo, X[0], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0bcbe352)); x[0] = MAD_F_MLZ(hi, lo) + t2; x[17] = -x[0]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x03768962)); x[24] = x[29] = MAD_F_MLZ(hi, lo) + t2; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, X[7], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[10], MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[16], MAD_F(0x0fdcf549)); t3 = MAD_F_MLZ(hi, lo) + t7; MAD_F_ML0(hi, lo, X[0], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0ffc19fd)); x[8] = MAD_F_MLZ(hi, lo) + t3; x[9] = -x[8]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x07635284)); x[21] = x[32] = MAD_F_MLZ(hi, lo) + t3; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0898c779)); x[20] = x[33] = MAD_F_MLZ(hi, lo) - t3; MAD_F_ML0(hi, lo, t14, -MAD_F(0x0ec835e8)); MAD_F_MLA(hi, lo, t15, MAD_F(0x061f78aa)); t4 = MAD_F_MLZ(hi, lo) - t7; MAD_F_ML0(hi, lo, t12, MAD_F(0x061f78aa)); MAD_F_MLA(hi, lo, t13, MAD_F(0x0ec835e8)); x[4] = MAD_F_MLZ(hi, lo) + t4; x[13] = -x[4]; MAD_F_ML0(hi, lo, t8, MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, t9, -MAD_F(0x0216a2a2)); MAD_F_MLA(hi, lo, t10, MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x0cb19346)); x[1] = MAD_F_MLZ(hi, lo) + t4; x[16] = -x[1]; MAD_F_ML0(hi, lo, t8, -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, t9, -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, t10, -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, t11, -MAD_F(0x0216a2a2)); x[25] = x[28] = MAD_F_MLZ(hi, lo) + t4; MAD_F_ML0(hi, lo, X[1], -MAD_F(0x0fdcf549)); MAD_F_MLA(hi, lo, X[7], -MAD_F(0x0cb19346)); MAD_F_MLA(hi, lo, X[10], -MAD_F(0x09bd7ca0)); MAD_F_MLA(hi, lo, X[16], -MAD_F(0x0216a2a2)); t5 = MAD_F_MLZ(hi, lo) - t6; MAD_F_ML0(hi, lo, X[0], MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[6], MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[9], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[12], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[15], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x0d7e8807)); x[2] = MAD_F_MLZ(hi, lo) + t5; x[15] = -x[2]; MAD_F_ML0(hi, lo, X[0], MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[2], MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[3], MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[5], MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x00b2aa3e)); MAD_F_MLA(hi, lo, X[8], MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[11], MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[14], MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[17], MAD_F(0x0e313245)); x[3] = MAD_F_MLZ(hi, lo) + t5; x[14] = -x[3]; MAD_F_ML0(hi, lo, X[0], -MAD_F(0x0ffc19fd)); MAD_F_MLA(hi, lo, X[2], -MAD_F(0x0f9ee890)); MAD_F_MLA(hi, lo, X[3], -MAD_F(0x0f426cb5)); MAD_F_MLA(hi, lo, X[5], -MAD_F(0x0e313245)); MAD_F_MLA(hi, lo, X[6], -MAD_F(0x0d7e8807)); MAD_F_MLA(hi, lo, X[8], -MAD_F(0x0bcbe352)); MAD_F_MLA(hi, lo, X[9], -MAD_F(0x0acf37ad)); MAD_F_MLA(hi, lo, X[11], -MAD_F(0x0898c779)); MAD_F_MLA(hi, lo, X[12], -MAD_F(0x07635284)); MAD_F_MLA(hi, lo, X[14], -MAD_F(0x04cfb0e2)); MAD_F_MLA(hi, lo, X[15], -MAD_F(0x03768962)); MAD_F_MLA(hi, lo, X[17], -MAD_F(0x00b2aa3e)); x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5; } # endif /* * NAME: III_imdct_l() * DESCRIPTION: perform IMDCT and windowing for long blocks */ static void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], unsigned int block_type) { unsigned int i; /* IMDCT */ imdct36(X, z); /* windowing */ switch (block_type) { case 0: /* normal window */ # if defined(ASO_INTERLEAVE1) { register mad_fixed_t tmp1, tmp2; tmp1 = window_l[0]; tmp2 = window_l[1]; for (i = 0; i < 34; i += 2) { z[i + 0] = mad_f_mul(z[i + 0], tmp1); tmp1 = window_l[i + 2]; z[i + 1] = mad_f_mul(z[i + 1], tmp2); tmp2 = window_l[i + 3]; } z[34] = mad_f_mul(z[34], tmp1); z[35] = mad_f_mul(z[35], tmp2); } # elif defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = z[0]; tmp2 = window_l[0]; for (i = 0; i < 35; ++i) { z[i] = mad_f_mul(tmp1, tmp2); tmp1 = z[i + 1]; tmp2 = window_l[i + 1]; } z[35] = mad_f_mul(tmp1, tmp2); } # elif 1 for (i = 0; i < 36; i += 4) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); z[i + 3] = mad_f_mul(z[i + 3], window_l[i + 3]); } # else for (i = 0; i < 36; ++i) z[i] = mad_f_mul(z[i], window_l[i]); # endif break; case 1: /* start block */ for (i = 0; i < 18; i += 3) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); } /* (i = 18; i < 24; ++i) z[i] unchanged */ for (i = 24; i < 30; ++i) z[i] = mad_f_mul(z[i], window_s[i - 18]); for (i = 30; i < 36; ++i) z[i] = 0; break; case 3: /* stop block */ for (i = 0; i < 6; ++i) z[i] = 0; for (i = 6; i < 12; ++i) z[i] = mad_f_mul(z[i], window_s[i - 6]); /* (i = 12; i < 18; ++i) z[i] unchanged */ for (i = 18; i < 36; i += 3) { z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]); z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]); z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]); } break; } } # endif /* ASO_IMDCT */ /* * NAME: III_imdct_s() * DESCRIPTION: perform IMDCT and windowing for short blocks */ static void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36]) { mad_fixed_t y[36], *yptr; mad_fixed_t const *wptr; int w, i; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; /* IMDCT */ yptr = &y[0]; for (w = 0; w < 3; ++w) { register mad_fixed_t const (*s)[6]; s = imdct_s; for (i = 0; i < 3; ++i) { MAD_F_ML0(hi, lo, X[0], (*s)[0]); MAD_F_MLA(hi, lo, X[1], (*s)[1]); MAD_F_MLA(hi, lo, X[2], (*s)[2]); MAD_F_MLA(hi, lo, X[3], (*s)[3]); MAD_F_MLA(hi, lo, X[4], (*s)[4]); MAD_F_MLA(hi, lo, X[5], (*s)[5]); yptr[i + 0] = MAD_F_MLZ(hi, lo); yptr[5 - i] = -yptr[i + 0]; ++s; MAD_F_ML0(hi, lo, X[0], (*s)[0]); MAD_F_MLA(hi, lo, X[1], (*s)[1]); MAD_F_MLA(hi, lo, X[2], (*s)[2]); MAD_F_MLA(hi, lo, X[3], (*s)[3]); MAD_F_MLA(hi, lo, X[4], (*s)[4]); MAD_F_MLA(hi, lo, X[5], (*s)[5]); yptr[ i + 6] = MAD_F_MLZ(hi, lo); yptr[11 - i] = yptr[i + 6]; ++s; } yptr += 12; X += 6; } /* windowing, overlapping and concatenation */ yptr = &y[0]; wptr = &window_s[0]; for (i = 0; i < 6; ++i) { z[i + 0] = 0; z[i + 6] = mad_f_mul(yptr[ 0 + 0], wptr[0]); MAD_F_ML0(hi, lo, yptr[ 0 + 6], wptr[6]); MAD_F_MLA(hi, lo, yptr[12 + 0], wptr[0]); z[i + 12] = MAD_F_MLZ(hi, lo); MAD_F_ML0(hi, lo, yptr[12 + 6], wptr[6]); MAD_F_MLA(hi, lo, yptr[24 + 0], wptr[0]); z[i + 18] = MAD_F_MLZ(hi, lo); z[i + 24] = mad_f_mul(yptr[24 + 6], wptr[6]); z[i + 30] = 0; ++yptr; ++wptr; } } /* * NAME: III_overlap() * DESCRIPTION: perform overlap-add of windowed IMDCT outputs */ static void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = overlap[0]; tmp2 = overlap[1]; for (i = 0; i < 16; i += 2) { sample[i + 0][sb] = output[i + 0 + 0] + tmp1; overlap[i + 0] = output[i + 0 + 18]; tmp1 = overlap[i + 2]; sample[i + 1][sb] = output[i + 1 + 0] + tmp2; overlap[i + 1] = output[i + 1 + 18]; tmp2 = overlap[i + 3]; } sample[16][sb] = output[16 + 0] + tmp1; overlap[16] = output[16 + 18]; sample[17][sb] = output[17 + 0] + tmp2; overlap[17] = output[17 + 18]; } # elif 0 for (i = 0; i < 18; i += 2) { sample[i + 0][sb] = output[i + 0 + 0] + overlap[i + 0]; overlap[i + 0] = output[i + 0 + 18]; sample[i + 1][sb] = output[i + 1 + 0] + overlap[i + 1]; overlap[i + 1] = output[i + 1 + 18]; } # else for (i = 0; i < 18; ++i) { sample[i][sb] = output[i + 0] + overlap[i]; overlap[i] = output[i + 18]; } # endif } /* * NAME: III_overlap_z() * DESCRIPTION: perform "overlap-add" of zero IMDCT outputs */ static inline void III_overlap_z(mad_fixed_t overlap[18], mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = overlap[0]; tmp2 = overlap[1]; for (i = 0; i < 16; i += 2) { sample[i + 0][sb] = tmp1; overlap[i + 0] = 0; tmp1 = overlap[i + 2]; sample[i + 1][sb] = tmp2; overlap[i + 1] = 0; tmp2 = overlap[i + 3]; } sample[16][sb] = tmp1; overlap[16] = 0; sample[17][sb] = tmp2; overlap[17] = 0; } # else for (i = 0; i < 18; ++i) { sample[i][sb] = overlap[i]; overlap[i] = 0; } # endif } /* * NAME: III_freqinver() * DESCRIPTION: perform subband frequency inversion for odd sample lines */ static void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb) { unsigned int i; # if 1 || defined(ASO_INTERLEAVE1) || defined(ASO_INTERLEAVE2) { register mad_fixed_t tmp1, tmp2; tmp1 = sample[1][sb]; tmp2 = sample[3][sb]; for (i = 1; i < 13; i += 4) { sample[i + 0][sb] = -tmp1; tmp1 = sample[i + 4][sb]; sample[i + 2][sb] = -tmp2; tmp2 = sample[i + 6][sb]; } sample[13][sb] = -tmp1; tmp1 = sample[17][sb]; sample[15][sb] = -tmp2; sample[17][sb] = -tmp1; } # else for (i = 1; i < 18; i += 2) sample[i][sb] = -sample[i][sb]; # endif } /* * NAME: III_decode() * DESCRIPTION: decode frame main_data */ static enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, struct sideinfo *si, unsigned int nch) { struct mad_header *header = &frame->header; unsigned int sfreqi, ngr, gr; { unsigned int sfreq; sfreq = header->samplerate; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) sfreq *= 2; /* 48000 => 0, 44100 => 1, 32000 => 2, 24000 => 3, 22050 => 4, 16000 => 5 */ sfreqi = ((sfreq >> 7) & 0x000f) + ((sfreq >> 15) & 0x0001) - 8; if (header->flags & MAD_FLAG_MPEG_2_5_EXT) sfreqi += 3; } /* scalefactors, Huffman decoding, requantization */ ngr = (header->flags & MAD_FLAG_LSF_EXT) ? 1 : 2; for (gr = 0; gr < ngr; ++gr) { struct granule *granule = &si->gr[gr]; unsigned char const *sfbwidth[2]; mad_fixed_t xr[2][576]; unsigned int ch; enum mad_error error; for (ch = 0; ch < nch; ++ch) { struct channel *channel = &granule->ch[ch]; unsigned int part2_length; sfbwidth[ch] = sfbwidth_table[sfreqi].l; if (channel->block_type == 2) { sfbwidth[ch] = (channel->flags & mixed_block_flag) ? sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s; } if (header->flags & MAD_FLAG_LSF_EXT) { part2_length = III_scalefactors_lsf(ptr, channel, ch == 0 ? 0 : &si->gr[1].ch[1], header->mode_extension); } else { part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], gr == 0 ? 0 : si->scfsi[ch]); } error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); if (error) return error; } /* joint stereo processing */ if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) { error = III_stereo(xr, granule, header, sfbwidth[0]); if (error) return error; } /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */ for (ch = 0; ch < nch; ++ch) { struct channel const *channel = &granule->ch[ch]; mad_fixed_t (*sample)[32] = &frame->sbsample[ch][18 * gr]; unsigned int sb, l, i, sblimit; mad_fixed_t output[36]; if (channel->block_type == 2) { III_reorder(xr[ch], channel, sfbwidth[ch]); # if !defined(OPT_STRICT) /* * According to ISO/IEC 11172-3, "Alias reduction is not applied for * granules with block_type == 2 (short block)." However, other * sources suggest alias reduction should indeed be performed on the * lower two subbands of mixed blocks. Most other implementations do * this, so by default we will too. */ if (channel->flags & mixed_block_flag) III_aliasreduce(xr[ch], 36); # endif } else III_aliasreduce(xr[ch], 576); l = 0; /* subbands 0-1 */ if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) { unsigned int block_type; block_type = channel->block_type; if (channel->flags & mixed_block_flag) block_type = 0; /* long blocks */ for (sb = 0; sb < 2; ++sb, l += 18) { III_imdct_l(&xr[ch][l], output, block_type); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); } } else { /* short blocks */ for (sb = 0; sb < 2; ++sb, l += 18) { III_imdct_s(&xr[ch][l], output); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); } } III_freqinver(sample, 1); /* (nonzero) subbands 2-31 */ i = 576; while (i > 36 && xr[ch][i - 1] == 0) --i; sblimit = 32 - (576 - i) / 18; if (channel->block_type != 2) { /* long blocks */ for (sb = 2; sb < sblimit; ++sb, l += 18) { III_imdct_l(&xr[ch][l], output, channel->block_type); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } else { /* short blocks */ for (sb = 2; sb < sblimit; ++sb, l += 18) { III_imdct_s(&xr[ch][l], output); III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } /* remaining (zero) subbands */ for (sb = sblimit; sb < 32; ++sb) { III_overlap_z((*frame->overlap)[ch][sb], sample, sb); if (sb & 1) III_freqinver(sample, sb); } } } return MAD_ERROR_NONE; } /* * NAME: layer->III() * DESCRIPTION: decode a single Layer III frame */ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) { struct mad_header *header = &frame->header; unsigned int nch, priv_bitlen, next_md_begin = 0; unsigned int si_len, data_bitlen, md_len; unsigned int frame_space, frame_used, frame_free; struct mad_bitptr ptr; struct sideinfo si; enum mad_error error; int result = 0; /* allocate Layer III dynamic structures */ if (stream->main_data == 0) { stream->main_data = malloc(MAD_BUFFER_MDLEN); if (stream->main_data == 0) { stream->error = MAD_ERROR_NOMEM; return -1; } } if (frame->overlap == 0) { frame->overlap = calloc(2 * 32 * 18, sizeof(mad_fixed_t)); if (frame->overlap == 0) { stream->error = MAD_ERROR_NOMEM; return -1; } } nch = MAD_NCHANNELS(header); si_len = (header->flags & MAD_FLAG_LSF_EXT) ? (nch == 1 ? 9 : 17) : (nch == 1 ? 17 : 32); /* check frame sanity */ if (stream->next_frame - mad_bit_nextbyte(&stream->ptr) < (signed int) si_len) { stream->error = MAD_ERROR_BADFRAMELEN; stream->md_len = 0; return -1; } /* check CRC word */ if (header->flags & MAD_FLAG_PROTECTION) { header->crc_check = mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check); if (header->crc_check != header->crc_target && !(frame->options & MAD_OPTION_IGNORECRC)) { stream->error = MAD_ERROR_BADCRC; result = -1; } } /* decode frame side information */ error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT, &si, &data_bitlen, &priv_bitlen); if (error && result == 0) { stream->error = error; result = -1; } header->flags |= priv_bitlen; header->private_bits |= si.private_bits; /* find main_data of next frame */ { struct mad_bitptr peek; unsigned long header; mad_bit_init(&peek, stream->next_frame); header = mad_bit_read(&peek, 32); if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { if (!(header & 0x00010000L)) /* protection_bit */ mad_bit_skip(&peek, 16); /* crc_check */ next_md_begin = mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); } mad_bit_finish(&peek); } /* find main_data of this frame */ frame_space = stream->next_frame - mad_bit_nextbyte(&stream->ptr); if (next_md_begin > si.main_data_begin + frame_space) next_md_begin = 0; md_len = si.main_data_begin + frame_space - next_md_begin; frame_used = 0; if (si.main_data_begin == 0) { ptr = stream->ptr; stream->md_len = 0; frame_used = md_len; } else { if (si.main_data_begin > stream->md_len) { if (result == 0) { stream->error = MAD_ERROR_BADDATAPTR; result = -1; } } else { mad_bit_init(&ptr, *stream->main_data + stream->md_len - si.main_data_begin); if (md_len > si.main_data_begin) { assert(stream->md_len + md_len - si.main_data_begin <= MAD_BUFFER_MDLEN); memcpy(*stream->main_data + stream->md_len, mad_bit_nextbyte(&stream->ptr), frame_used = md_len - si.main_data_begin); stream->md_len += frame_used; } } } frame_free = frame_space - frame_used; /* decode main_data */ if (result == 0) { error = III_decode(&ptr, frame, &si, nch); if (error) { stream->error = error; result = -1; } /* designate ancillary bits */ stream->anc_ptr = ptr; stream->anc_bitlen = md_len * CHAR_BIT - data_bitlen; } # if 0 && defined(DEBUG) fprintf(stderr, "main_data_begin:%u, md_len:%u, frame_free:%u, " "data_bitlen:%u, anc_bitlen: %u\n", si.main_data_begin, md_len, frame_free, data_bitlen, stream->anc_bitlen); # endif /* preload main_data buffer with up to 511 bytes for next frame(s) */ if (frame_free >= next_md_begin) { memcpy(*stream->main_data, stream->next_frame - next_md_begin, next_md_begin); stream->md_len = next_md_begin; } else { if (md_len < si.main_data_begin) { unsigned int extra; extra = si.main_data_begin - md_len; if (extra + frame_free > next_md_begin) extra = next_md_begin - frame_free; if (extra < stream->md_len) { memmove(*stream->main_data, *stream->main_data + stream->md_len - extra, extra); stream->md_len = extra; } } else stream->md_len = 0; memcpy(*stream->main_data + stream->md_len, stream->next_frame - frame_free, frame_free); stream->md_len += frame_free; } return result; } ================================================ FILE: 3rdParty/libmad/include/layer3.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $ */ # ifndef LIBMAD_LAYER3_H # define LIBMAD_LAYER3_H # include "stream.h" # include "frame.h" int mad_layer_III(struct mad_stream *, struct mad_frame *); # endif ================================================ FILE: 3rdParty/libmad/include/mad.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * If you would like to negotiate alternate licensing terms, you may do * so by contacting: Underbit Technologies, Inc. */ # ifdef __cplusplus extern "C" { # endif # define FPM_INTEL # define SIZEOF_INT 4 # define SIZEOF_LONG 4 # define SIZEOF_LONG_LONG 8 /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_VERSION_H # define LIBMAD_VERSION_H # define MAD_VERSION_MAJOR 0 # define MAD_VERSION_MINOR 15 # define MAD_VERSION_PATCH 1 # define MAD_VERSION_EXTRA " (beta)" # define MAD_VERSION_STRINGIZE(str) #str # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ MAD_VERSION_STRING(MAD_VERSION_PATCH) \ MAD_VERSION_EXTRA # define MAD_PUBLISHYEAR "2000-2004" # define MAD_AUTHOR "Underbit Technologies, Inc." # define MAD_EMAIL "info@underbit.com" extern char const mad_version[]; extern char const mad_copyright[]; extern char const mad_author[]; extern char const mad_build[]; # endif /* Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp */ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H # if SIZEOF_INT >= 4 typedef signed int mad_fixed_t; typedef signed int mad_fixed64hi_t; typedef unsigned int mad_fixed64lo_t; # else typedef signed long mad_fixed_t; typedef signed long mad_fixed64hi_t; typedef unsigned long mad_fixed64lo_t; # endif # if defined(_MSC_VER) # define mad_fixed64_t signed __int64 # elif 1 || defined(__GNUC__) # define mad_fixed64_t signed long long # endif # if defined(FPM_FLOAT) typedef double mad_sample_t; # else typedef mad_fixed_t mad_sample_t; # endif /* * Fixed-point format: 0xABBBBBBB * A == whole part (sign + 3 bits) * B == fractional part (28 bits) * * Values are signed two's complement, so the effective range is: * 0x80000000 to 0x7fffffff * -8.0 to +7.9999999962747097015380859375 * * The smallest representable value is: * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9) * * 28 bits of fractional accuracy represent about * 8.6 digits of decimal accuracy. * * Fixed-point numbers can be added or subtracted as normal * integers, but multiplication requires shifting the 64-bit result * from 56 fractional bits back to 28 (and rounding.) * * Changing the definition of MAD_F_FRACBITS is only partially * supported, and must be done with care. */ # define MAD_F_FRACBITS 28 # if MAD_F_FRACBITS == 28 # define MAD_F(x) ((mad_fixed_t) (x##L)) # else # if MAD_F_FRACBITS < 28 # warning "MAD_F_FRACBITS < 28" # define MAD_F(x) ((mad_fixed_t) \ (((x##L) + \ (1L << (28 - MAD_F_FRACBITS - 1))) >> \ (28 - MAD_F_FRACBITS))) # elif MAD_F_FRACBITS > 28 # error "MAD_F_FRACBITS > 28 not currently supported" # define MAD_F(x) ((mad_fixed_t) \ ((x##L) << (MAD_F_FRACBITS - 28))) # endif # endif # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) # define MAD_F_ONE MAD_F(0x10000000) # define mad_f_tofixed(x) ((mad_fixed_t) \ ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) # define mad_f_todouble(x) ((double) \ ((x) / (double) (1L << MAD_F_FRACBITS))) # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) /* (x should be positive) */ # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) # define mad_f_add(x, y) ((x) + (y)) # define mad_f_sub(x, y) ((x) - (y)) # if defined(FPM_FLOAT) # error "FPM_FLOAT not yet supported" # undef MAD_F # define MAD_F(x) mad_f_todouble(x) # define mad_f_mul(x, y) ((x) * (y)) # define mad_f_scale64 # undef ASO_ZEROCHECK # elif defined(FPM_64BIT) /* * This version should be the most accurate if 64-bit types are supported by * the compiler, although it may not be the most efficient. */ # if defined(OPT_ACCURACY) # define mad_f_mul(x, y) \ ((mad_fixed_t) \ ((((mad_fixed64_t) (x) * (y)) + \ (1L << (MAD_F_SCALEBITS - 1))) >> MAD_F_SCALEBITS)) # else # define mad_f_mul(x, y) \ ((mad_fixed_t) (((mad_fixed64_t) (x) * (y)) >> MAD_F_SCALEBITS)) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Intel --------------------------------------------------------------- */ # elif defined(FPM_INTEL) # if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable: 4035) /* no return value */ static __forceinline mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) { enum { fracbits = MAD_F_FRACBITS }; __asm { mov eax, x imul y shrd eax, edx, fracbits } /* implicit return of eax */ } # pragma warning(pop) # define mad_f_mul mad_f_mul_inline # define mad_f_scale64 # else /* * This Intel version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("imull %3" \ : "=a" (lo), "=d" (hi) \ : "%a" (x), "rm" (y) \ : "cc") # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addl %2,%0\n\t" \ "adcl %3,%1" \ : "=rm" (lo), "=rm" (hi) \ : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ : "cc"); \ }) # endif /* OPT_ACCURACY */ # if defined(OPT_ACCURACY) /* * Surprisingly, this is faster than SHRD followed by ADC. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed64hi_t __hi_; \ mad_fixed64lo_t __lo_; \ mad_fixed_t __result; \ asm ("addl %4,%2\n\t" \ "adcl %5,%3" \ : "=rm" (__lo_), "=rm" (__hi_) \ : "0" (lo), "1" (hi), \ "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ : "cc"); \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # elif defined(OPT_INTEL) /* * Alternate Intel scaling that may or may not perform better. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrl %3,%1\n\t" \ "shll %4,%2\n\t" \ "orl %2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), \ "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("shrdl %3,%2,%1" \ : "=rm" (__result) \ : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif /* OPT_ACCURACY */ # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- ARM ----------------------------------------------------------------- */ # elif defined(FPM_ARM) /* * This ARM V4 version is as accurate as FPM_64BIT but much faster. The * least significant bit is properly rounded at no CPU cycle cost! */ # if 1 /* * This is faster than the default implementation via MAD_F_MLX() and * mad_f_scale64(). */ # define mad_f_mul(x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ mad_fixed_t __result; \ asm ("smull %0, %1, %3, %4\n\t" \ "movs %0, %0, lsr %5\n\t" \ "adc %2, %0, %1, lsl %6" \ : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ : "%r" (x), "r" (y), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # endif # define MAD_F_MLX(hi, lo, x, y) \ asm ("smull %0, %1, %2, %3" \ : "=&r" (lo), "=&r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("smlal %0, %1, %2, %3" \ : "+r" (lo), "+r" (hi) \ : "%r" (x), "r" (y)) # define MAD_F_MLN(hi, lo) \ asm ("rsbs %0, %2, #0\n\t" \ "rsc %1, %3, #0" \ : "=r" (lo), "=r" (hi) \ : "0" (lo), "1" (hi) \ : "cc") # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("movs %0, %1, lsr %3\n\t" \ "adc %0, %0, %2, lsl %4" \ : "=&r" (__result) \ : "r" (lo), "r" (hi), \ "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ : "cc"); \ __result; \ }) # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- MIPS ---------------------------------------------------------------- */ # elif defined(FPM_MIPS) /* * This MIPS version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" (x), "r" (y)) # if defined(HAVE_MADD_ASM) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" (x), "r" (y)) # elif defined(HAVE_MADD16_ASM) /* * This loses significant accuracy due to the 16-bit integer limit in the * multiply/accumulate instruction. */ # define MAD_F_ML0(hi, lo, x, y) \ asm ("mult %2,%3" \ : "=l" (lo), "=h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLA(hi, lo, x, y) \ asm ("madd16 %2,%3" \ : "+l" (lo), "+h" (hi) \ : "%r" ((x) >> 12), "r" ((y) >> 16)) # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) # endif # if defined(OPT_SPEED) # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) ((hi) << (32 - MAD_F_SCALEBITS))) # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* --- SPARC --------------------------------------------------------------- */ # elif defined(FPM_SPARC) /* * This SPARC V8 version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ asm ("smul %2, %3, %0\n\t" \ "rd %%y, %1" \ : "=r" (lo), "=r" (hi) \ : "%r" (x), "rI" (y)) /* --- PowerPC ------------------------------------------------------------- */ # elif defined(FPM_PPC) /* * This PowerPC version is fast and accurate; the disposition of the least * significant bit depends on OPT_ACCURACY via mad_f_scale64(). */ # define MAD_F_MLX(hi, lo, x, y) \ do { \ asm ("mullw %0,%1,%2" \ : "=r" (lo) \ : "%r" (x), "r" (y)); \ asm ("mulhw %0,%1,%2" \ : "=r" (hi) \ : "%r" (x), "r" (y)); \ } \ while (0) # if defined(OPT_ACCURACY) /* * This gives best accuracy but is not very fast. */ # define MAD_F_MLA(hi, lo, x, y) \ ({ mad_fixed64hi_t __hi; \ mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ asm ("addc %0,%2,%3\n\t" \ "adde %1,%4,%5" \ : "=r" (lo), "=r" (hi) \ : "%r" (lo), "r" (__lo), \ "%r" (hi), "r" (__hi) \ : "xer"); \ }) # endif # if defined(OPT_ACCURACY) /* * This is slower than the truncating version below it. */ # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result, __round; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("extrwi %0,%1,1,0" \ : "=r" (__round) \ : "r" (__result)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ asm ("add %0,%1,%2" \ : "=r" (__result) \ : "%r" (__result), "r" (__round)); \ __result; \ }) # else # define mad_f_scale64(hi, lo) \ ({ mad_fixed_t __result; \ asm ("rotrwi %0,%1,%2" \ : "=r" (__result) \ : "r" (lo), "i" (MAD_F_SCALEBITS)); \ asm ("insrwi %0,%1,%2,0" \ : "+r" (__result) \ : "r" (hi), "i" (MAD_F_SCALEBITS)); \ __result; \ }) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS /* --- Default ------------------------------------------------------------- */ # elif defined(FPM_DEFAULT) /* * This version is the most portable but it loses significant accuracy. * Furthermore, accuracy is biased against the second argument, so care * should be taken when ordering operands. * * The scale factors are constant as this is not used with SSO. * * Pre-rounding is required to stay within the limits of compliance. */ # if defined(OPT_SPEED) # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) # else # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ (((y) + (1L << 15)) >> 16)) # endif /* ------------------------------------------------------------------------- */ # else # error "no FPM selected" # endif /* default implementations */ # if !defined(mad_f_mul) # define mad_f_mul(x, y) \ ({ register mad_fixed64hi_t __hi; \ register mad_fixed64lo_t __lo; \ MAD_F_MLX(__hi, __lo, (x), (y)); \ mad_f_scale64(__hi, __lo); \ }) # endif # if !defined(MAD_F_MLA) # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # endif # if !defined(MAD_F_ML0) # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) # endif # if !defined(MAD_F_MLN) # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) # endif # if !defined(MAD_F_MLZ) # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) # endif # if !defined(mad_f_scale64) # if defined(OPT_ACCURACY) # define mad_f_scale64(hi, lo) \ ((((mad_fixed_t) \ (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) # else # define mad_f_scale64(hi, lo) \ ((mad_fixed_t) \ (((hi) << (32 - MAD_F_SCALEBITS)) | \ ((lo) >> MAD_F_SCALEBITS))) # endif # define MAD_F_SCALEBITS MAD_F_FRACBITS # endif /* C routines */ mad_fixed_t mad_f_abs(mad_fixed_t); mad_fixed_t mad_f_div(mad_fixed_t, mad_fixed_t); # endif /* Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_BIT_H # define LIBMAD_BIT_H struct mad_bitptr { unsigned char const *byte; unsigned short cache; unsigned short left; }; void mad_bit_init(struct mad_bitptr *, unsigned char const *); # define mad_bit_finish(bitptr) /* nothing */ unsigned int mad_bit_length(struct mad_bitptr const *, struct mad_bitptr const *); # define mad_bit_bitsleft(bitptr) ((bitptr)->left) unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); void mad_bit_skip(struct mad_bitptr *, unsigned int); unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); # endif /* Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_TIMER_H # define LIBMAD_TIMER_H typedef struct { signed long seconds; /* whole seconds */ unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ } mad_timer_t; extern mad_timer_t const mad_timer_zero; # define MAD_TIMER_RESOLUTION 352800000UL enum mad_units { MAD_UNITS_HOURS = -2, MAD_UNITS_MINUTES = -1, MAD_UNITS_SECONDS = 0, /* metric units */ MAD_UNITS_DECISECONDS = 10, MAD_UNITS_CENTISECONDS = 100, MAD_UNITS_MILLISECONDS = 1000, /* audio sample units */ MAD_UNITS_8000_HZ = 8000, MAD_UNITS_11025_HZ = 11025, MAD_UNITS_12000_HZ = 12000, MAD_UNITS_16000_HZ = 16000, MAD_UNITS_22050_HZ = 22050, MAD_UNITS_24000_HZ = 24000, MAD_UNITS_32000_HZ = 32000, MAD_UNITS_44100_HZ = 44100, MAD_UNITS_48000_HZ = 48000, /* video frame/field units */ MAD_UNITS_24_FPS = 24, MAD_UNITS_25_FPS = 25, MAD_UNITS_30_FPS = 30, MAD_UNITS_48_FPS = 48, MAD_UNITS_50_FPS = 50, MAD_UNITS_60_FPS = 60, /* CD audio frames */ MAD_UNITS_75_FPS = 75, /* video drop-frame units */ MAD_UNITS_23_976_FPS = -24, MAD_UNITS_24_975_FPS = -25, MAD_UNITS_29_97_FPS = -30, MAD_UNITS_47_952_FPS = -48, MAD_UNITS_49_95_FPS = -50, MAD_UNITS_59_94_FPS = -60 }; # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) int mad_timer_compare(mad_timer_t, mad_timer_t); # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) void mad_timer_negate(mad_timer_t *); mad_timer_t mad_timer_abs(mad_timer_t); void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); void mad_timer_add(mad_timer_t *, mad_timer_t); void mad_timer_multiply(mad_timer_t *, signed long); signed long mad_timer_count(mad_timer_t, enum mad_units); unsigned long mad_timer_fraction(mad_timer_t, unsigned long); void mad_timer_string(mad_timer_t, char *, char const *, enum mad_units, enum mad_units, unsigned long); # endif /* Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp */ # ifndef LIBMAD_STREAM_H # define LIBMAD_STREAM_H # define MAD_BUFFER_GUARD 8 # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) enum mad_error { MAD_ERROR_NONE = 0x0000, /* no error */ MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ }; # define MAD_RECOVERABLE(error) ((error) & 0xff00) struct mad_stream { unsigned char const *buffer; /* input bitstream buffer */ unsigned char const *bufend; /* end of buffer */ unsigned long skiplen; /* bytes to skip before next frame */ int sync; /* stream sync found */ unsigned long freerate; /* free bitrate (fixed) */ unsigned char const *this_frame; /* start of current frame */ unsigned char const *next_frame; /* start of next frame */ struct mad_bitptr ptr; /* current processing bit pointer */ struct mad_bitptr anc_ptr; /* ancillary bits pointer */ unsigned int anc_bitlen; /* number of ancillary bits */ unsigned char (*main_data)[MAD_BUFFER_MDLEN]; /* Layer III main_data() */ unsigned int md_len; /* bytes in main_data */ int options; /* decoding options (see below) */ enum mad_error error; /* error code (see above) */ }; enum { MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ # if 0 /* not yet implemented */ MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ # endif }; void mad_stream_init(struct mad_stream *); void mad_stream_finish(struct mad_stream *); # define mad_stream_options(stream, opts) \ ((void) ((stream)->options = (opts))) void mad_stream_buffer(struct mad_stream *, unsigned char const *, unsigned long); void mad_stream_skip(struct mad_stream *, unsigned long); int mad_stream_sync(struct mad_stream *); char const *mad_stream_errorstr(struct mad_stream const *); # endif /* Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_FRAME_H # define LIBMAD_FRAME_H enum mad_layer { MAD_LAYER_I = 1, /* Layer I */ MAD_LAYER_II = 2, /* Layer II */ MAD_LAYER_III = 3 /* Layer III */ }; enum mad_mode { MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ MAD_MODE_STEREO = 3 /* normal LR stereo */ }; enum mad_emphasis { MAD_EMPHASIS_NONE = 0, /* no emphasis */ MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ }; struct mad_header { enum mad_layer layer; /* audio layer (1, 2, or 3) */ enum mad_mode mode; /* channel mode (see above) */ int mode_extension; /* additional mode info */ enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ unsigned long bitrate; /* stream bitrate (bps) */ unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short crc_check; /* frame CRC accumulator */ unsigned short crc_target; /* final target CRC checksum */ int flags; /* flags (see below) */ int private_bits; /* private bits (see below) */ mad_timer_t duration; /* audio playing time of frame */ }; struct mad_frame { struct mad_header header; /* MPEG audio header */ int options; /* decoding options (from stream) */ mad_fixed_t sbsample[2][36][32]; /* synthesis subband filter samples */ mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ }; # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) # define MAD_NSBSAMPLES(header) \ ((header)->layer == MAD_LAYER_I ? 12 : \ (((header)->layer == MAD_LAYER_III && \ ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) enum { MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ }; enum { MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ }; void mad_header_init(struct mad_header *); # define mad_header_finish(header) /* nothing */ int mad_header_decode(struct mad_header *, struct mad_stream *); void mad_frame_init(struct mad_frame *); void mad_frame_finish(struct mad_frame *); int mad_frame_decode(struct mad_frame *, struct mad_stream *); void mad_frame_mute(struct mad_frame *); # endif /* Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp */ # ifndef LIBMAD_SYNTH_H # define LIBMAD_SYNTH_H struct mad_pcm { unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short channels; /* number of channels */ unsigned short length; /* number of samples per channel */ mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ }; struct mad_synth { mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ /* [ch][eo][peo][s][v] */ unsigned int phase; /* current processing phase */ struct mad_pcm pcm; /* PCM output */ }; /* single channel PCM selector */ enum { MAD_PCM_CHANNEL_SINGLE = 0 }; /* dual channel PCM selector */ enum { MAD_PCM_CHANNEL_DUAL_1 = 0, MAD_PCM_CHANNEL_DUAL_2 = 1 }; /* stereo PCM selector */ enum { MAD_PCM_CHANNEL_STEREO_LEFT = 0, MAD_PCM_CHANNEL_STEREO_RIGHT = 1 }; void mad_synth_init(struct mad_synth *); # define mad_synth_finish(synth) /* nothing */ void mad_synth_mute(struct mad_synth *); void mad_synth_frame(struct mad_synth *, struct mad_frame const *); # endif /* Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp */ # ifndef LIBMAD_DECODER_H # define LIBMAD_DECODER_H enum mad_decoder_mode { MAD_DECODER_MODE_SYNC = 0, MAD_DECODER_MODE_ASYNC }; enum mad_flow { MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ }; struct mad_decoder { enum mad_decoder_mode mode; int options; struct { long pid; int in; int out; } async; struct { struct mad_stream stream; struct mad_frame frame; struct mad_synth synth; } *sync; void *cb_data; enum mad_flow (*input_func)(void *, struct mad_stream *); enum mad_flow (*header_func)(void *, struct mad_header const *); enum mad_flow (*filter_func)(void *, struct mad_stream const *, struct mad_frame *); enum mad_flow (*output_func)(void *, struct mad_header const *, struct mad_pcm *); enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); enum mad_flow (*message_func)(void *, void *, unsigned int *); }; void mad_decoder_init(struct mad_decoder *, void *, enum mad_flow (*)(void *, struct mad_stream *), enum mad_flow (*)(void *, struct mad_header const *), enum mad_flow (*)(void *, struct mad_stream const *, struct mad_frame *), enum mad_flow (*)(void *, struct mad_header const *, struct mad_pcm *), enum mad_flow (*)(void *, struct mad_stream *, struct mad_frame *), enum mad_flow (*)(void *, void *, unsigned int *)); int mad_decoder_finish(struct mad_decoder *); # define mad_decoder_options(decoder, opts) \ ((void) ((decoder)->options = (opts))) int mad_decoder_run(struct mad_decoder *, enum mad_decoder_mode); int mad_decoder_message(struct mad_decoder *, void *, unsigned int *); # endif # ifdef __cplusplus } # endif ================================================ FILE: 3rdParty/libmad/include/stream.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: stream.c,v 1.12 2004/02/05 09:02:39 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # include "bit.h" # include "stream.h" /* * NAME: stream->init() * DESCRIPTION: initialize stream struct */ void mad_stream_init(struct mad_stream *stream) { stream->buffer = 0; stream->bufend = 0; stream->skiplen = 0; stream->sync = 0; stream->freerate = 0; stream->this_frame = 0; stream->next_frame = 0; mad_bit_init(&stream->ptr, 0); mad_bit_init(&stream->anc_ptr, 0); stream->anc_bitlen = 0; stream->main_data = 0; stream->md_len = 0; stream->options = 0; stream->error = MAD_ERROR_NONE; } /* * NAME: stream->finish() * DESCRIPTION: deallocate any dynamic memory associated with stream */ void mad_stream_finish(struct mad_stream *stream) { if (stream->main_data) { free(stream->main_data); stream->main_data = 0; } mad_bit_finish(&stream->anc_ptr); mad_bit_finish(&stream->ptr); } /* * NAME: stream->buffer() * DESCRIPTION: set stream buffer pointers */ void mad_stream_buffer(struct mad_stream *stream, unsigned char const *buffer, unsigned long length) { stream->buffer = buffer; stream->bufend = buffer + length; stream->this_frame = buffer; stream->next_frame = buffer; stream->sync = 1; mad_bit_init(&stream->ptr, buffer); } /* * NAME: stream->skip() * DESCRIPTION: arrange to skip bytes before the next frame */ void mad_stream_skip(struct mad_stream *stream, unsigned long length) { stream->skiplen += length; } /* * NAME: stream->sync() * DESCRIPTION: locate the next stream sync word */ int mad_stream_sync(struct mad_stream *stream) { register unsigned char const *ptr, *end; ptr = mad_bit_nextbyte(&stream->ptr); end = stream->bufend; while (ptr < end - 1 && !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) ++ptr; if (end - ptr < MAD_BUFFER_GUARD) return -1; mad_bit_init(&stream->ptr, ptr); return 0; } /* * NAME: stream->errorstr() * DESCRIPTION: return a string description of the current error condition */ char const *mad_stream_errorstr(struct mad_stream const *stream) { switch (stream->error) { case MAD_ERROR_NONE: return "no error"; case MAD_ERROR_BUFLEN: return "input buffer too small (or EOF)"; case MAD_ERROR_BUFPTR: return "invalid (null) buffer pointer"; case MAD_ERROR_NOMEM: return "not enough memory"; case MAD_ERROR_LOSTSYNC: return "lost synchronization"; case MAD_ERROR_BADLAYER: return "reserved header layer value"; case MAD_ERROR_BADBITRATE: return "forbidden bitrate value"; case MAD_ERROR_BADSAMPLERATE: return "reserved sample frequency value"; case MAD_ERROR_BADEMPHASIS: return "reserved emphasis value"; case MAD_ERROR_BADCRC: return "CRC check failed"; case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value"; case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index"; case MAD_ERROR_BADMODE: return "bad bitrate/mode combination"; case MAD_ERROR_BADFRAMELEN: return "bad frame length"; case MAD_ERROR_BADBIGVALUES: return "bad big_values count"; case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type"; case MAD_ERROR_BADSCFSI: return "bad scalefactor selection info"; case MAD_ERROR_BADDATAPTR: return "bad main_data_begin pointer"; case MAD_ERROR_BADPART3LEN: return "bad audio data length"; case MAD_ERROR_BADHUFFTABLE: return "bad Huffman table select"; case MAD_ERROR_BADHUFFDATA: return "Huffman data overrun"; case MAD_ERROR_BADSTEREO: return "incompatible block_type for JS"; } return 0; } ================================================ FILE: 3rdParty/libmad/include/stream.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $ */ # ifndef LIBMAD_STREAM_H # define LIBMAD_STREAM_H # include "bit.h" # define MAD_BUFFER_GUARD 8 # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) enum mad_error { MAD_ERROR_NONE = 0x0000, /* no error */ MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ }; # define MAD_RECOVERABLE(error) ((error) & 0xff00) struct mad_stream { unsigned char const *buffer; /* input bitstream buffer */ unsigned char const *bufend; /* end of buffer */ unsigned long skiplen; /* bytes to skip before next frame */ int sync; /* stream sync found */ unsigned long freerate; /* free bitrate (fixed) */ unsigned char const *this_frame; /* start of current frame */ unsigned char const *next_frame; /* start of next frame */ struct mad_bitptr ptr; /* current processing bit pointer */ struct mad_bitptr anc_ptr; /* ancillary bits pointer */ unsigned int anc_bitlen; /* number of ancillary bits */ unsigned char (*main_data)[MAD_BUFFER_MDLEN]; /* Layer III main_data() */ unsigned int md_len; /* bytes in main_data */ int options; /* decoding options (see below) */ enum mad_error error; /* error code (see above) */ }; enum { MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ # if 0 /* not yet implemented */ MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ # endif }; void mad_stream_init(struct mad_stream *); void mad_stream_finish(struct mad_stream *); # define mad_stream_options(stream, opts) \ ((void) ((stream)->options = (opts))) void mad_stream_buffer(struct mad_stream *, unsigned char const *, unsigned long); void mad_stream_skip(struct mad_stream *, unsigned long); int mad_stream_sync(struct mad_stream *); char const *mad_stream_errorstr(struct mad_stream const *); # endif ================================================ FILE: 3rdParty/libmad/include/synth.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: synth.c,v 1.25 2004/01/23 09:41:33 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "fixed.h" # include "frame.h" # include "synth.h" /* * NAME: synth->init() * DESCRIPTION: initialize synth struct */ void mad_synth_init(struct mad_synth *synth) { mad_synth_mute(synth); synth->phase = 0; synth->pcm.samplerate = 0; synth->pcm.channels = 0; synth->pcm.length = 0; } /* * NAME: synth->mute() * DESCRIPTION: zero all polyphase filterbank values, resetting synthesis */ void mad_synth_mute(struct mad_synth *synth) { unsigned int ch, s, v; for (ch = 0; ch < 2; ++ch) { for (s = 0; s < 16; ++s) { for (v = 0; v < 8; ++v) { synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] = synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0; } } } } /* * An optional optimization called here the Subband Synthesis Optimization * (SSO) improves the performance of subband synthesis at the expense of * accuracy. * * The idea is to simplify 32x32->64-bit multiplication to 32x32->32 such * that extra scaling and rounding are not necessary. This often allows the * compiler to use faster 32-bit multiply-accumulate instructions instead of * explicit 64-bit multiply, shift, and add instructions. * * SSO works like this: a full 32x32->64-bit multiply of two mad_fixed_t * values requires the result to be right-shifted 28 bits to be properly * scaled to the same fixed-point format. Right shifts can be applied at any * time to either operand or to the result, so the optimization involves * careful placement of these shifts to minimize the loss of accuracy. * * First, a 14-bit shift is applied with rounding at compile-time to the D[] * table of coefficients for the subband synthesis window. This only loses 2 * bits of accuracy because the lower 12 bits are always zero. A second * 12-bit shift occurs after the DCT calculation. This loses 12 bits of * accuracy. Finally, a third 2-bit shift occurs just before the sample is * saved in the PCM buffer. 14 + 12 + 2 == 28 bits. */ /* FPM_DEFAULT without OPT_SSO will actually lose accuracy and performance */ # if defined(FPM_DEFAULT) && !defined(OPT_SSO) # define OPT_SSO # endif /* second SSO shift, with rounding */ # if defined(OPT_SSO) # define SHIFT(x) (((x) + (1L << 11)) >> 12) # else # define SHIFT(x) (x) # endif /* possible DCT speed optimization */ # if defined(OPT_SPEED) && defined(MAD_F_MLX) # define OPT_DCTO # define MUL(x, y) \ ({ mad_fixed64hi_t hi; \ mad_fixed64lo_t lo; \ MAD_F_MLX(hi, lo, (x), (y)); \ hi << (32 - MAD_F_SCALEBITS - 3); \ }) # else # undef OPT_DCTO # define MUL(x, y) mad_f_mul((x), (y)) # endif /* * NAME: dct32() * DESCRIPTION: perform fast in[32]->out[32] DCT */ static void dct32(mad_fixed_t const in[32], unsigned int slot, mad_fixed_t lo[16][8], mad_fixed_t hi[16][8]) { mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; mad_fixed_t t16, t17, t18, t19, t20, t21, t22, t23; mad_fixed_t t24, t25, t26, t27, t28, t29, t30, t31; mad_fixed_t t32, t33, t34, t35, t36, t37, t38, t39; mad_fixed_t t40, t41, t42, t43, t44, t45, t46, t47; mad_fixed_t t48, t49, t50, t51, t52, t53, t54, t55; mad_fixed_t t56, t57, t58, t59, t60, t61, t62, t63; mad_fixed_t t64, t65, t66, t67, t68, t69, t70, t71; mad_fixed_t t72, t73, t74, t75, t76, t77, t78, t79; mad_fixed_t t80, t81, t82, t83, t84, t85, t86, t87; mad_fixed_t t88, t89, t90, t91, t92, t93, t94, t95; mad_fixed_t t96, t97, t98, t99, t100, t101, t102, t103; mad_fixed_t t104, t105, t106, t107, t108, t109, t110, t111; mad_fixed_t t112, t113, t114, t115, t116, t117, t118, t119; mad_fixed_t t120, t121, t122, t123, t124, t125, t126, t127; mad_fixed_t t128, t129, t130, t131, t132, t133, t134, t135; mad_fixed_t t136, t137, t138, t139, t140, t141, t142, t143; mad_fixed_t t144, t145, t146, t147, t148, t149, t150, t151; mad_fixed_t t152, t153, t154, t155, t156, t157, t158, t159; mad_fixed_t t160, t161, t162, t163, t164, t165, t166, t167; mad_fixed_t t168, t169, t170, t171, t172, t173, t174, t175; mad_fixed_t t176; /* costab[i] = cos(PI / (2 * 32) * i) */ # if defined(OPT_DCTO) # define costab1 MAD_F(0x7fd8878e) # define costab2 MAD_F(0x7f62368f) # define costab3 MAD_F(0x7e9d55fc) # define costab4 MAD_F(0x7d8a5f40) # define costab5 MAD_F(0x7c29fbee) # define costab6 MAD_F(0x7a7d055b) # define costab7 MAD_F(0x78848414) # define costab8 MAD_F(0x7641af3d) # define costab9 MAD_F(0x73b5ebd1) # define costab10 MAD_F(0x70e2cbc6) # define costab11 MAD_F(0x6dca0d14) # define costab12 MAD_F(0x6a6d98a4) # define costab13 MAD_F(0x66cf8120) # define costab14 MAD_F(0x62f201ac) # define costab15 MAD_F(0x5ed77c8a) # define costab16 MAD_F(0x5a82799a) # define costab17 MAD_F(0x55f5a4d2) # define costab18 MAD_F(0x5133cc94) # define costab19 MAD_F(0x4c3fdff4) # define costab20 MAD_F(0x471cece7) # define costab21 MAD_F(0x41ce1e65) # define costab22 MAD_F(0x3c56ba70) # define costab23 MAD_F(0x36ba2014) # define costab24 MAD_F(0x30fbc54d) # define costab25 MAD_F(0x2b1f34eb) # define costab26 MAD_F(0x25280c5e) # define costab27 MAD_F(0x1f19f97b) # define costab28 MAD_F(0x18f8b83c) # define costab29 MAD_F(0x12c8106f) # define costab30 MAD_F(0x0c8bd35e) # define costab31 MAD_F(0x0647d97c) # else # define costab1 MAD_F(0x0ffb10f2) /* 0.998795456 */ # define costab2 MAD_F(0x0fec46d2) /* 0.995184727 */ # define costab3 MAD_F(0x0fd3aac0) /* 0.989176510 */ # define costab4 MAD_F(0x0fb14be8) /* 0.980785280 */ # define costab5 MAD_F(0x0f853f7e) /* 0.970031253 */ # define costab6 MAD_F(0x0f4fa0ab) /* 0.956940336 */ # define costab7 MAD_F(0x0f109082) /* 0.941544065 */ # define costab8 MAD_F(0x0ec835e8) /* 0.923879533 */ # define costab9 MAD_F(0x0e76bd7a) /* 0.903989293 */ # define costab10 MAD_F(0x0e1c5979) /* 0.881921264 */ # define costab11 MAD_F(0x0db941a3) /* 0.857728610 */ # define costab12 MAD_F(0x0d4db315) /* 0.831469612 */ # define costab13 MAD_F(0x0cd9f024) /* 0.803207531 */ # define costab14 MAD_F(0x0c5e4036) /* 0.773010453 */ # define costab15 MAD_F(0x0bdaef91) /* 0.740951125 */ # define costab16 MAD_F(0x0b504f33) /* 0.707106781 */ # define costab17 MAD_F(0x0abeb49a) /* 0.671558955 */ # define costab18 MAD_F(0x0a267993) /* 0.634393284 */ # define costab19 MAD_F(0x0987fbfe) /* 0.595699304 */ # define costab20 MAD_F(0x08e39d9d) /* 0.555570233 */ # define costab21 MAD_F(0x0839c3cd) /* 0.514102744 */ # define costab22 MAD_F(0x078ad74e) /* 0.471396737 */ # define costab23 MAD_F(0x06d74402) /* 0.427555093 */ # define costab24 MAD_F(0x061f78aa) /* 0.382683432 */ # define costab25 MAD_F(0x0563e69d) /* 0.336889853 */ # define costab26 MAD_F(0x04a5018c) /* 0.290284677 */ # define costab27 MAD_F(0x03e33f2f) /* 0.242980180 */ # define costab28 MAD_F(0x031f1708) /* 0.195090322 */ # define costab29 MAD_F(0x0259020e) /* 0.146730474 */ # define costab30 MAD_F(0x01917a6c) /* 0.098017140 */ # define costab31 MAD_F(0x00c8fb30) /* 0.049067674 */ # endif t0 = in[0] + in[31]; t16 = MUL(in[0] - in[31], costab1); t1 = in[15] + in[16]; t17 = MUL(in[15] - in[16], costab31); t41 = t16 + t17; t59 = MUL(t16 - t17, costab2); t33 = t0 + t1; t50 = MUL(t0 - t1, costab2); t2 = in[7] + in[24]; t18 = MUL(in[7] - in[24], costab15); t3 = in[8] + in[23]; t19 = MUL(in[8] - in[23], costab17); t42 = t18 + t19; t60 = MUL(t18 - t19, costab30); t34 = t2 + t3; t51 = MUL(t2 - t3, costab30); t4 = in[3] + in[28]; t20 = MUL(in[3] - in[28], costab7); t5 = in[12] + in[19]; t21 = MUL(in[12] - in[19], costab25); t43 = t20 + t21; t61 = MUL(t20 - t21, costab14); t35 = t4 + t5; t52 = MUL(t4 - t5, costab14); t6 = in[4] + in[27]; t22 = MUL(in[4] - in[27], costab9); t7 = in[11] + in[20]; t23 = MUL(in[11] - in[20], costab23); t44 = t22 + t23; t62 = MUL(t22 - t23, costab18); t36 = t6 + t7; t53 = MUL(t6 - t7, costab18); t8 = in[1] + in[30]; t24 = MUL(in[1] - in[30], costab3); t9 = in[14] + in[17]; t25 = MUL(in[14] - in[17], costab29); t45 = t24 + t25; t63 = MUL(t24 - t25, costab6); t37 = t8 + t9; t54 = MUL(t8 - t9, costab6); t10 = in[6] + in[25]; t26 = MUL(in[6] - in[25], costab13); t11 = in[9] + in[22]; t27 = MUL(in[9] - in[22], costab19); t46 = t26 + t27; t64 = MUL(t26 - t27, costab26); t38 = t10 + t11; t55 = MUL(t10 - t11, costab26); t12 = in[2] + in[29]; t28 = MUL(in[2] - in[29], costab5); t13 = in[13] + in[18]; t29 = MUL(in[13] - in[18], costab27); t47 = t28 + t29; t65 = MUL(t28 - t29, costab10); t39 = t12 + t13; t56 = MUL(t12 - t13, costab10); t14 = in[5] + in[26]; t30 = MUL(in[5] - in[26], costab11); t15 = in[10] + in[21]; t31 = MUL(in[10] - in[21], costab21); t48 = t30 + t31; t66 = MUL(t30 - t31, costab22); t40 = t14 + t15; t57 = MUL(t14 - t15, costab22); t69 = t33 + t34; t89 = MUL(t33 - t34, costab4); t70 = t35 + t36; t90 = MUL(t35 - t36, costab28); t71 = t37 + t38; t91 = MUL(t37 - t38, costab12); t72 = t39 + t40; t92 = MUL(t39 - t40, costab20); t73 = t41 + t42; t94 = MUL(t41 - t42, costab4); t74 = t43 + t44; t95 = MUL(t43 - t44, costab28); t75 = t45 + t46; t96 = MUL(t45 - t46, costab12); t76 = t47 + t48; t97 = MUL(t47 - t48, costab20); t78 = t50 + t51; t100 = MUL(t50 - t51, costab4); t79 = t52 + t53; t101 = MUL(t52 - t53, costab28); t80 = t54 + t55; t102 = MUL(t54 - t55, costab12); t81 = t56 + t57; t103 = MUL(t56 - t57, costab20); t83 = t59 + t60; t106 = MUL(t59 - t60, costab4); t84 = t61 + t62; t107 = MUL(t61 - t62, costab28); t85 = t63 + t64; t108 = MUL(t63 - t64, costab12); t86 = t65 + t66; t109 = MUL(t65 - t66, costab20); t113 = t69 + t70; t114 = t71 + t72; /* 0 */ hi[15][slot] = SHIFT(t113 + t114); /* 16 */ lo[ 0][slot] = SHIFT(MUL(t113 - t114, costab16)); t115 = t73 + t74; t116 = t75 + t76; t32 = t115 + t116; /* 1 */ hi[14][slot] = SHIFT(t32); t118 = t78 + t79; t119 = t80 + t81; t58 = t118 + t119; /* 2 */ hi[13][slot] = SHIFT(t58); t121 = t83 + t84; t122 = t85 + t86; t67 = t121 + t122; t49 = (t67 * 2) - t32; /* 3 */ hi[12][slot] = SHIFT(t49); t125 = t89 + t90; t126 = t91 + t92; t93 = t125 + t126; /* 4 */ hi[11][slot] = SHIFT(t93); t128 = t94 + t95; t129 = t96 + t97; t98 = t128 + t129; t68 = (t98 * 2) - t49; /* 5 */ hi[10][slot] = SHIFT(t68); t132 = t100 + t101; t133 = t102 + t103; t104 = t132 + t133; t82 = (t104 * 2) - t58; /* 6 */ hi[ 9][slot] = SHIFT(t82); t136 = t106 + t107; t137 = t108 + t109; t110 = t136 + t137; t87 = (t110 * 2) - t67; t77 = (t87 * 2) - t68; /* 7 */ hi[ 8][slot] = SHIFT(t77); t141 = MUL(t69 - t70, costab8); t142 = MUL(t71 - t72, costab24); t143 = t141 + t142; /* 8 */ hi[ 7][slot] = SHIFT(t143); /* 24 */ lo[ 8][slot] = SHIFT((MUL(t141 - t142, costab16) * 2) - t143); t144 = MUL(t73 - t74, costab8); t145 = MUL(t75 - t76, costab24); t146 = t144 + t145; t88 = (t146 * 2) - t77; /* 9 */ hi[ 6][slot] = SHIFT(t88); t148 = MUL(t78 - t79, costab8); t149 = MUL(t80 - t81, costab24); t150 = t148 + t149; t105 = (t150 * 2) - t82; /* 10 */ hi[ 5][slot] = SHIFT(t105); t152 = MUL(t83 - t84, costab8); t153 = MUL(t85 - t86, costab24); t154 = t152 + t153; t111 = (t154 * 2) - t87; t99 = (t111 * 2) - t88; /* 11 */ hi[ 4][slot] = SHIFT(t99); t157 = MUL(t89 - t90, costab8); t158 = MUL(t91 - t92, costab24); t159 = t157 + t158; t127 = (t159 * 2) - t93; /* 12 */ hi[ 3][slot] = SHIFT(t127); t160 = (MUL(t125 - t126, costab16) * 2) - t127; /* 20 */ lo[ 4][slot] = SHIFT(t160); /* 28 */ lo[12][slot] = SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160); t161 = MUL(t94 - t95, costab8); t162 = MUL(t96 - t97, costab24); t163 = t161 + t162; t130 = (t163 * 2) - t98; t112 = (t130 * 2) - t99; /* 13 */ hi[ 2][slot] = SHIFT(t112); t164 = (MUL(t128 - t129, costab16) * 2) - t130; t166 = MUL(t100 - t101, costab8); t167 = MUL(t102 - t103, costab24); t168 = t166 + t167; t134 = (t168 * 2) - t104; t120 = (t134 * 2) - t105; /* 14 */ hi[ 1][slot] = SHIFT(t120); t135 = (MUL(t118 - t119, costab16) * 2) - t120; /* 18 */ lo[ 2][slot] = SHIFT(t135); t169 = (MUL(t132 - t133, costab16) * 2) - t134; t151 = (t169 * 2) - t135; /* 22 */ lo[ 6][slot] = SHIFT(t151); t170 = (((MUL(t148 - t149, costab16) * 2) - t150) * 2) - t151; /* 26 */ lo[10][slot] = SHIFT(t170); /* 30 */ lo[14][slot] = SHIFT((((((MUL(t166 - t167, costab16) * 2) - t168) * 2) - t169) * 2) - t170); t171 = MUL(t106 - t107, costab8); t172 = MUL(t108 - t109, costab24); t173 = t171 + t172; t138 = (t173 * 2) - t110; t123 = (t138 * 2) - t111; t139 = (MUL(t121 - t122, costab16) * 2) - t123; t117 = (t123 * 2) - t112; /* 15 */ hi[ 0][slot] = SHIFT(t117); t124 = (MUL(t115 - t116, costab16) * 2) - t117; /* 17 */ lo[ 1][slot] = SHIFT(t124); t131 = (t139 * 2) - t124; /* 19 */ lo[ 3][slot] = SHIFT(t131); t140 = (t164 * 2) - t131; /* 21 */ lo[ 5][slot] = SHIFT(t140); t174 = (MUL(t136 - t137, costab16) * 2) - t138; t155 = (t174 * 2) - t139; t147 = (t155 * 2) - t140; /* 23 */ lo[ 7][slot] = SHIFT(t147); t156 = (((MUL(t144 - t145, costab16) * 2) - t146) * 2) - t147; /* 25 */ lo[ 9][slot] = SHIFT(t156); t175 = (((MUL(t152 - t153, costab16) * 2) - t154) * 2) - t155; t165 = (t175 * 2) - t156; /* 27 */ lo[11][slot] = SHIFT(t165); t176 = (((((MUL(t161 - t162, costab16) * 2) - t163) * 2) - t164) * 2) - t165; /* 29 */ lo[13][slot] = SHIFT(t176); /* 31 */ lo[15][slot] = SHIFT((((((((MUL(t171 - t172, costab16) * 2) - t173) * 2) - t174) * 2) - t175) * 2) - t176); /* * Totals: * 80 multiplies * 80 additions * 119 subtractions * 49 shifts (not counting SSO) */ } # undef MUL # undef SHIFT /* third SSO shift and/or D[] optimization preshift */ # if defined(OPT_SSO) # if MAD_F_FRACBITS != 28 # error "MAD_F_FRACBITS must be 28 to use OPT_SSO" # endif # define ML0(hi, lo, x, y) ((lo) = (x) * (y)) # define MLA(hi, lo, x, y) ((lo) += (x) * (y)) # define MLN(hi, lo) ((lo) = -(lo)) # define MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) # define SHIFT(x) ((x) >> 2) # define PRESHIFT(x) ((MAD_F(x) + (1L << 13)) >> 14) # else # define ML0(hi, lo, x, y) MAD_F_ML0((hi), (lo), (x), (y)) # define MLA(hi, lo, x, y) MAD_F_MLA((hi), (lo), (x), (y)) # define MLN(hi, lo) MAD_F_MLN((hi), (lo)) # define MLZ(hi, lo) MAD_F_MLZ((hi), (lo)) # define SHIFT(x) (x) # if defined(MAD_F_SCALEBITS) # undef MAD_F_SCALEBITS # define MAD_F_SCALEBITS (MAD_F_FRACBITS - 12) # define PRESHIFT(x) (MAD_F(x) >> 12) # else # define PRESHIFT(x) MAD_F(x) # endif # endif static mad_fixed_t const D[17][32] = { # include "D.dat" }; # if defined(ASO_SYNTH) void synth_full(struct mad_synth *, struct mad_frame const *, unsigned int, unsigned int); # else /* * NAME: synth->full() * DESCRIPTION: perform full frequency PCM synthesis */ static void synth_full(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 32 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 30; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - pe; ML0(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); ptr = *Dptr - po; MLA(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); *pcm2-- = SHIFT(MLZ(hi, lo)); ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 16; phase = (phase + 1) % 16; } } } # endif /* * NAME: synth->half() * DESCRIPTION: perform half frequency PCM synthesis */ static void synth_half(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 16 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 14; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ if (!(sb & 1)) { ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - po; ML0(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); ptr = *Dptr - pe; MLA(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); *pcm2-- = SHIFT(MLZ(hi, lo)); } ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 8; phase = (phase + 1) % 16; } } } /* * NAME: synth->frame() * DESCRIPTION: perform PCM synthesis of frame subband samples */ void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame) { unsigned int nch, ns; void (*synth_frame)(struct mad_synth *, struct mad_frame const *, unsigned int, unsigned int); nch = MAD_NCHANNELS(&frame->header); ns = MAD_NSBSAMPLES(&frame->header); synth->pcm.samplerate = frame->header.samplerate; synth->pcm.channels = nch; synth->pcm.length = 32 * ns; synth_frame = synth_full; if (frame->options & MAD_OPTION_HALFSAMPLERATE) { synth->pcm.samplerate /= 2; synth->pcm.length /= 2; synth_frame = synth_half; } synth_frame(synth, frame, nch, ns); synth->phase = (synth->phase + ns) % 16; } ================================================ FILE: 3rdParty/libmad/include/synth.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $ */ # ifndef LIBMAD_SYNTH_H # define LIBMAD_SYNTH_H # include "fixed.h" # include "frame.h" struct mad_pcm { unsigned int samplerate; /* sampling frequency (Hz) */ unsigned short channels; /* number of channels */ unsigned short length; /* number of samples per channel */ mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ }; struct mad_synth { mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ /* [ch][eo][peo][s][v] */ unsigned int phase; /* current processing phase */ struct mad_pcm pcm; /* PCM output */ }; /* single channel PCM selector */ enum { MAD_PCM_CHANNEL_SINGLE = 0 }; /* dual channel PCM selector */ enum { MAD_PCM_CHANNEL_DUAL_1 = 0, MAD_PCM_CHANNEL_DUAL_2 = 1 }; /* stereo PCM selector */ enum { MAD_PCM_CHANNEL_STEREO_LEFT = 0, MAD_PCM_CHANNEL_STEREO_RIGHT = 1 }; void mad_synth_init(struct mad_synth *); # define mad_synth_finish(synth) /* nothing */ void mad_synth_mute(struct mad_synth *); void mad_synth_frame(struct mad_synth *, struct mad_frame const *); # endif ================================================ FILE: 3rdParty/libmad/include/timer.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: timer.c,v 1.18 2004/01/23 09:41:33 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include # ifdef HAVE_ASSERT_H # include # endif # include "timer.h" mad_timer_t const mad_timer_zero = { 0, 0 }; /* * NAME: timer->compare() * DESCRIPTION: indicate relative order of two timers */ int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2) { signed long diff; diff = timer1.seconds - timer2.seconds; if (diff < 0) return -1; else if (diff > 0) return +1; diff = timer1.fraction - timer2.fraction; if (diff < 0) return -1; else if (diff > 0) return +1; return 0; } /* * NAME: timer->negate() * DESCRIPTION: invert the sign of a timer */ void mad_timer_negate(mad_timer_t *timer) { timer->seconds = -timer->seconds; if (timer->fraction) { timer->seconds -= 1; timer->fraction = MAD_TIMER_RESOLUTION - timer->fraction; } } /* * NAME: timer->abs() * DESCRIPTION: return the absolute value of a timer */ mad_timer_t mad_timer_abs(mad_timer_t timer) { if (timer.seconds < 0) mad_timer_negate(&timer); return timer; } /* * NAME: reduce_timer() * DESCRIPTION: carry timer fraction into seconds */ static void reduce_timer(mad_timer_t *timer) { timer->seconds += timer->fraction / MAD_TIMER_RESOLUTION; timer->fraction %= MAD_TIMER_RESOLUTION; } /* * NAME: gcd() * DESCRIPTION: compute greatest common denominator */ static unsigned long gcd(unsigned long num1, unsigned long num2) { unsigned long tmp; while (num2) { tmp = num2; num2 = num1 % num2; num1 = tmp; } return num1; } /* * NAME: reduce_rational() * DESCRIPTION: convert rational expression to lowest terms */ static void reduce_rational(unsigned long *numer, unsigned long *denom) { unsigned long factor; factor = gcd(*numer, *denom); assert(factor != 0); *numer /= factor; *denom /= factor; } /* * NAME: scale_rational() * DESCRIPTION: solve numer/denom == ?/scale avoiding overflowing */ static unsigned long scale_rational(unsigned long numer, unsigned long denom, unsigned long scale) { reduce_rational(&numer, &denom); reduce_rational(&scale, &denom); assert(denom != 0); if (denom < scale) return numer * (scale / denom) + numer * (scale % denom) / denom; if (denom < numer) return scale * (numer / denom) + scale * (numer % denom) / denom; return numer * scale / denom; } /* * NAME: timer->set() * DESCRIPTION: set timer to specific (positive) value */ void mad_timer_set(mad_timer_t *timer, unsigned long seconds, unsigned long numer, unsigned long denom) { timer->seconds = seconds; if (numer >= denom && denom > 0) { timer->seconds += numer / denom; numer %= denom; } switch (denom) { case 0: case 1: timer->fraction = 0; break; case MAD_TIMER_RESOLUTION: timer->fraction = numer; break; case 1000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 1000); break; case 8000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 8000); break; case 11025: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 11025); break; case 12000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 12000); break; case 16000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 16000); break; case 22050: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 22050); break; case 24000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 24000); break; case 32000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 32000); break; case 44100: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 44100); break; case 48000: timer->fraction = numer * (MAD_TIMER_RESOLUTION / 48000); break; default: timer->fraction = scale_rational(numer, denom, MAD_TIMER_RESOLUTION); break; } if (timer->fraction >= MAD_TIMER_RESOLUTION) reduce_timer(timer); } /* * NAME: timer->add() * DESCRIPTION: add one timer to another */ void mad_timer_add(mad_timer_t *timer, mad_timer_t incr) { timer->seconds += incr.seconds; timer->fraction += incr.fraction; if (timer->fraction >= MAD_TIMER_RESOLUTION) reduce_timer(timer); } /* * NAME: timer->multiply() * DESCRIPTION: multiply a timer by a scalar value */ void mad_timer_multiply(mad_timer_t *timer, signed long scalar) { mad_timer_t addend; unsigned long factor; factor = scalar; if (scalar < 0) { factor = -scalar; mad_timer_negate(timer); } addend = *timer; *timer = mad_timer_zero; while (factor) { if (factor & 1) mad_timer_add(timer, addend); mad_timer_add(&addend, addend); factor >>= 1; } } /* * NAME: timer->count() * DESCRIPTION: return timer value in selected units */ signed long mad_timer_count(mad_timer_t timer, enum mad_units units) { switch (units) { case MAD_UNITS_HOURS: return timer.seconds / 60 / 60; case MAD_UNITS_MINUTES: return timer.seconds / 60; case MAD_UNITS_SECONDS: return timer.seconds; case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: return timer.seconds * (signed long) units + (signed long) scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, units); case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: return (mad_timer_count(timer, -units) + 1) * 1000 / 1001; } /* unsupported units */ return 0; } /* * NAME: timer->fraction() * DESCRIPTION: return fractional part of timer in arbitrary terms */ unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom) { timer = mad_timer_abs(timer); switch (denom) { case 0: return timer.fraction ? MAD_TIMER_RESOLUTION / timer.fraction : MAD_TIMER_RESOLUTION + 1; case MAD_TIMER_RESOLUTION: return timer.fraction; default: return scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, denom); } } /* * NAME: timer->string() * DESCRIPTION: write a string representation of a timer using a template */ void mad_timer_string(mad_timer_t timer, char *dest, char const *format, enum mad_units units, enum mad_units fracunits, unsigned long subparts) { unsigned long hours, minutes, seconds, sub; unsigned int frac; timer = mad_timer_abs(timer); seconds = timer.seconds; frac = sub = 0; switch (fracunits) { case MAD_UNITS_HOURS: case MAD_UNITS_MINUTES: case MAD_UNITS_SECONDS: break; case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: { unsigned long denom; denom = MAD_TIMER_RESOLUTION / fracunits; frac = timer.fraction / denom; sub = scale_rational(timer.fraction % denom, denom, subparts); } break; case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: /* drop-frame encoding */ /* N.B. this is only well-defined for MAD_UNITS_29_97_FPS */ { unsigned long frame, cycle, d, m; frame = mad_timer_count(timer, fracunits); cycle = -fracunits * 60 * 10 - (10 - 1) * 2; d = frame / cycle; m = frame % cycle; frame += (10 - 1) * 2 * d; if (m > 2) frame += 2 * ((m - 2) / (cycle / 10)); frac = frame % -fracunits; seconds = frame / -fracunits; } break; } switch (units) { case MAD_UNITS_HOURS: minutes = seconds / 60; hours = minutes / 60; sprintf(dest, format, hours, (unsigned int) (minutes % 60), (unsigned int) (seconds % 60), frac, sub); break; case MAD_UNITS_MINUTES: minutes = seconds / 60; sprintf(dest, format, minutes, (unsigned int) (seconds % 60), frac, sub); break; case MAD_UNITS_SECONDS: sprintf(dest, format, seconds, frac, sub); break; case MAD_UNITS_23_976_FPS: case MAD_UNITS_24_975_FPS: case MAD_UNITS_29_97_FPS: case MAD_UNITS_47_952_FPS: case MAD_UNITS_49_95_FPS: case MAD_UNITS_59_94_FPS: if (fracunits < 0) { /* not yet implemented */ sub = 0; } /* fall through */ case MAD_UNITS_DECISECONDS: case MAD_UNITS_CENTISECONDS: case MAD_UNITS_MILLISECONDS: case MAD_UNITS_8000_HZ: case MAD_UNITS_11025_HZ: case MAD_UNITS_12000_HZ: case MAD_UNITS_16000_HZ: case MAD_UNITS_22050_HZ: case MAD_UNITS_24000_HZ: case MAD_UNITS_32000_HZ: case MAD_UNITS_44100_HZ: case MAD_UNITS_48000_HZ: case MAD_UNITS_24_FPS: case MAD_UNITS_25_FPS: case MAD_UNITS_30_FPS: case MAD_UNITS_48_FPS: case MAD_UNITS_50_FPS: case MAD_UNITS_60_FPS: case MAD_UNITS_75_FPS: sprintf(dest, format, mad_timer_count(timer, units), sub); break; } } ================================================ FILE: 3rdParty/libmad/include/timer.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $ */ # ifndef LIBMAD_TIMER_H # define LIBMAD_TIMER_H typedef struct { signed long seconds; /* whole seconds */ unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ } mad_timer_t; extern mad_timer_t const mad_timer_zero; # define MAD_TIMER_RESOLUTION 352800000UL enum mad_units { MAD_UNITS_HOURS = -2, MAD_UNITS_MINUTES = -1, MAD_UNITS_SECONDS = 0, /* metric units */ MAD_UNITS_DECISECONDS = 10, MAD_UNITS_CENTISECONDS = 100, MAD_UNITS_MILLISECONDS = 1000, /* audio sample units */ MAD_UNITS_8000_HZ = 8000, MAD_UNITS_11025_HZ = 11025, MAD_UNITS_12000_HZ = 12000, MAD_UNITS_16000_HZ = 16000, MAD_UNITS_22050_HZ = 22050, MAD_UNITS_24000_HZ = 24000, MAD_UNITS_32000_HZ = 32000, MAD_UNITS_44100_HZ = 44100, MAD_UNITS_48000_HZ = 48000, /* video frame/field units */ MAD_UNITS_24_FPS = 24, MAD_UNITS_25_FPS = 25, MAD_UNITS_30_FPS = 30, MAD_UNITS_48_FPS = 48, MAD_UNITS_50_FPS = 50, MAD_UNITS_60_FPS = 60, /* CD audio frames */ MAD_UNITS_75_FPS = 75, /* video drop-frame units */ MAD_UNITS_23_976_FPS = -24, MAD_UNITS_24_975_FPS = -25, MAD_UNITS_29_97_FPS = -30, MAD_UNITS_47_952_FPS = -48, MAD_UNITS_49_95_FPS = -50, MAD_UNITS_59_94_FPS = -60 }; # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) int mad_timer_compare(mad_timer_t, mad_timer_t); # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) void mad_timer_negate(mad_timer_t *); mad_timer_t mad_timer_abs(mad_timer_t); void mad_timer_set(mad_timer_t *, unsigned long, unsigned long, unsigned long); void mad_timer_add(mad_timer_t *, mad_timer_t); void mad_timer_multiply(mad_timer_t *, signed long); signed long mad_timer_count(mad_timer_t, enum mad_units); unsigned long mad_timer_fraction(mad_timer_t, unsigned long); void mad_timer_string(mad_timer_t, char *, char const *, enum mad_units, enum mad_units, unsigned long); # endif ================================================ FILE: 3rdParty/libmad/include/version.c ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $ */ # ifdef HAVE_CONFIG_H # include "config.h" # endif # include "global.h" # include "version.h" char const mad_version[] = "MPEG Audio Decoder " MAD_VERSION; char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR; char const mad_author[] = MAD_AUTHOR " <" MAD_EMAIL ">"; char const mad_build[] = "" # if defined(DEBUG) "DEBUG " # elif defined(NDEBUG) "NDEBUG " # endif # if defined(EXPERIMENTAL) "EXPERIMENTAL " # endif # if defined(FPM_64BIT) "FPM_64BIT " # elif defined(FPM_INTEL) "FPM_INTEL " # elif defined(FPM_ARM) "FPM_ARM " # elif defined(FPM_MIPS) "FPM_MIPS " # elif defined(FPM_SPARC) "FPM_SPARC " # elif defined(FPM_PPC) "FPM_PPC " # elif defined(FPM_DEFAULT) "FPM_DEFAULT " # endif # if defined(ASO_IMDCT) "ASO_IMDCT " # endif # if defined(ASO_INTERLEAVE1) "ASO_INTERLEAVE1 " # endif # if defined(ASO_INTERLEAVE2) "ASO_INTERLEAVE2 " # endif # if defined(ASO_ZEROCHECK) "ASO_ZEROCHECK " # endif # if defined(OPT_SPEED) "OPT_SPEED " # elif defined(OPT_ACCURACY) "OPT_ACCURACY " # endif # if defined(OPT_SSO) "OPT_SSO " # endif # if defined(OPT_DCTO) /* never defined here */ "OPT_DCTO " # endif # if defined(OPT_STRICT) "OPT_STRICT " # endif ; ================================================ FILE: 3rdParty/libmad/include/version.h ================================================ /* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $ */ # ifndef LIBMAD_VERSION_H # define LIBMAD_VERSION_H # define MAD_VERSION_MAJOR 0 # define MAD_VERSION_MINOR 15 # define MAD_VERSION_PATCH 1 # define MAD_VERSION_EXTRA " (beta)" # define MAD_VERSION_STRINGIZE(str) #str # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ MAD_VERSION_STRING(MAD_VERSION_PATCH) \ MAD_VERSION_EXTRA # define MAD_PUBLISHYEAR "2000-2004" # define MAD_AUTHOR "Underbit Technologies, Inc." # define MAD_EMAIL "info@underbit.com" extern char const mad_version[]; extern char const mad_copyright[]; extern char const mad_author[]; extern char const mad_build[]; # endif ================================================ FILE: 3rdParty/libogg/include/ogg.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel libogg include last mod: $Id: ogg.h 7188 2004-07-20 07:26:04Z xiphmont $ ********************************************************************/ #ifndef _OGG_H #define _OGG_H #ifdef __cplusplus extern "C" { #endif //#include #include "os_types.h" typedef struct { long endbyte; int endbit; unsigned char *buffer; unsigned char *ptr; long storage; } oggpack_buffer; /* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ typedef struct { unsigned char *header; long header_len; unsigned char *body; long body_len; } ogg_page; /* ogg_stream_state contains the current encode/decode state of a logical Ogg bitstream **********************************************************/ typedef struct { unsigned char *body_data; /* bytes from packet bodies */ long body_storage; /* storage elements allocated */ long body_fill; /* elements stored; fill mark */ long body_returned; /* elements of fill returned */ int *lacing_vals; /* The values that will go to the segment table */ ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact this way, but it is simple coupled to the lacing fifo */ long lacing_storage; long lacing_fill; long lacing_packet; long lacing_returned; unsigned char header[282]; /* working space for header encode */ int header_fill; int e_o_s; /* set when we have buffered the last packet in the logical bitstream */ int b_o_s; /* set after we've written the initial page of a logical bitstream */ long serialno; long pageno; ogg_int64_t packetno; /* sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec (which is in a seperate abstraction layer) also knows about the gap */ ogg_int64_t granulepos; } ogg_stream_state; /* ogg_packet is used to encapsulate the data and metadata belonging to a single raw Ogg/Vorbis packet *************************************/ typedef struct { unsigned char *packet; long bytes; long b_o_s; long e_o_s; ogg_int64_t granulepos; ogg_int64_t packetno; /* sequence number for decode; the framing knows where there's a hole in the data, but we need coupling so that the codec (which is in a seperate abstraction layer) also knows about the gap */ } ogg_packet; typedef struct { unsigned char *data; int storage; int fill; int returned; int unsynced; int headerbytes; int bodybytes; } ogg_sync_state; /* Ogg BITSTREAM PRIMITIVES: bitstream ************************/ extern void oggpack_writeinit(oggpack_buffer *b); extern void oggpack_writetrunc(oggpack_buffer *b,long bits); extern void oggpack_writealign(oggpack_buffer *b); extern void oggpack_writecopy(oggpack_buffer *b,void *source,long bits); extern void oggpack_reset(oggpack_buffer *b); extern void oggpack_writeclear(oggpack_buffer *b); extern void oggpack_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); extern void oggpack_write(oggpack_buffer *b,unsigned long value,int bits); extern long oggpack_look(oggpack_buffer *b,int bits); extern long oggpack_look1(oggpack_buffer *b); extern void oggpack_adv(oggpack_buffer *b,int bits); extern void oggpack_adv1(oggpack_buffer *b); extern long oggpack_read(oggpack_buffer *b,int bits); extern long oggpack_read1(oggpack_buffer *b); extern long oggpack_bytes(oggpack_buffer *b); extern long oggpack_bits(oggpack_buffer *b); extern unsigned char *oggpack_get_buffer(oggpack_buffer *b); extern void oggpackB_writeinit(oggpack_buffer *b); extern void oggpackB_writetrunc(oggpack_buffer *b,long bits); extern void oggpackB_writealign(oggpack_buffer *b); extern void oggpackB_writecopy(oggpack_buffer *b,void *source,long bits); extern void oggpackB_reset(oggpack_buffer *b); extern void oggpackB_writeclear(oggpack_buffer *b); extern void oggpackB_readinit(oggpack_buffer *b,unsigned char *buf,int bytes); extern void oggpackB_write(oggpack_buffer *b,unsigned long value,int bits); extern long oggpackB_look(oggpack_buffer *b,int bits); extern long oggpackB_look1(oggpack_buffer *b); extern void oggpackB_adv(oggpack_buffer *b,int bits); extern void oggpackB_adv1(oggpack_buffer *b); extern long oggpackB_read(oggpack_buffer *b,int bits); extern long oggpackB_read1(oggpack_buffer *b); extern long oggpackB_bytes(oggpack_buffer *b); extern long oggpackB_bits(oggpack_buffer *b); extern unsigned char *oggpackB_get_buffer(oggpack_buffer *b); /* Ogg BITSTREAM PRIMITIVES: encoding **************************/ extern int ogg_stream_packetin(ogg_stream_state *os, ogg_packet *op); extern int ogg_stream_pageout(ogg_stream_state *os, ogg_page *og); extern int ogg_stream_flush(ogg_stream_state *os, ogg_page *og); /* Ogg BITSTREAM PRIMITIVES: decoding **************************/ extern int ogg_sync_init(ogg_sync_state *oy); extern int ogg_sync_clear(ogg_sync_state *oy); extern int ogg_sync_reset(ogg_sync_state *oy); extern int ogg_sync_destroy(ogg_sync_state *oy); extern char *ogg_sync_buffer(ogg_sync_state *oy, long size); extern int ogg_sync_wrote(ogg_sync_state *oy, long bytes); extern long ogg_sync_pageseek(ogg_sync_state *oy,ogg_page *og); extern int ogg_sync_pageout(ogg_sync_state *oy, ogg_page *og); extern int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og); extern int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op); extern int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op); /* Ogg BITSTREAM PRIMITIVES: general ***************************/ extern int ogg_stream_init(ogg_stream_state *os,int serialno); extern int ogg_stream_clear(ogg_stream_state *os); extern int ogg_stream_reset(ogg_stream_state *os); extern int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno); extern int ogg_stream_destroy(ogg_stream_state *os); extern int ogg_stream_eos(ogg_stream_state *os); extern void ogg_page_checksum_set(ogg_page *og); extern int ogg_page_version(ogg_page *og); extern int ogg_page_continued(ogg_page *og); extern int ogg_page_bos(ogg_page *og); extern int ogg_page_eos(ogg_page *og); extern ogg_int64_t ogg_page_granulepos(ogg_page *og); extern int ogg_page_serialno(ogg_page *og); extern long ogg_page_pageno(ogg_page *og); extern int ogg_page_packets(ogg_page *og); extern void ogg_packet_clear(ogg_packet *op); #ifdef __cplusplus } #endif #endif /* _OGG_H */ ================================================ FILE: 3rdParty/libogg/include/os_types.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. last mod: $Id: os_types.h 7524 2004-08-11 04:20:36Z conrad $ ********************************************************************/ #ifndef _OS_TYPES_H #define _OS_TYPES_H /* make it easy on the folks that want to compile the libs with a different malloc than stdlib */ #define _ogg_malloc malloc #define _ogg_calloc calloc #define _ogg_realloc realloc #define _ogg_free free #if defined(_WIN32) # if defined(__CYGWIN__) # include <_G_config.h> typedef _G_int64_t ogg_int64_t; typedef _G_int32_t ogg_int32_t; typedef _G_uint32_t ogg_uint32_t; typedef _G_int16_t ogg_int16_t; typedef _G_uint16_t ogg_uint16_t; # elif defined(__MINGW32__) typedef short ogg_int16_t; typedef unsigned short ogg_uint16_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long ogg_int64_t; typedef unsigned long long ogg_uint64_t; # elif defined(__MWERKS__) typedef long long ogg_int64_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef short ogg_int16_t; typedef unsigned short ogg_uint16_t; # else /* MSVC/Borland */ typedef __int64 ogg_int64_t; typedef __int32 ogg_int32_t; typedef unsigned __int32 ogg_uint32_t; typedef __int16 ogg_int16_t; typedef unsigned __int16 ogg_uint16_t; # endif #elif defined(__MACOS__) # include typedef SInt16 ogg_int16_t; typedef UInt16 ogg_uint16_t; typedef SInt32 ogg_int32_t; typedef UInt32 ogg_uint32_t; typedef SInt64 ogg_int64_t; #elif defined(__MACOSX__) /* MacOS X Framework build */ # include typedef int16_t ogg_int16_t; typedef u_int16_t ogg_uint16_t; typedef int32_t ogg_int32_t; typedef u_int32_t ogg_uint32_t; typedef int64_t ogg_int64_t; #elif defined(__BEOS__) /* Be */ # include typedef int16_t ogg_int16_t; typedef u_int16_t ogg_uint16_t; typedef int32_t ogg_int32_t; typedef u_int32_t ogg_uint32_t; typedef int64_t ogg_int64_t; #elif defined (__EMX__) /* OS/2 GCC */ typedef short ogg_int16_t; typedef unsigned short ogg_uint16_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long ogg_int64_t; #elif defined (DJGPP) /* DJGPP */ typedef short ogg_int16_t; typedef int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long ogg_int64_t; #elif defined(R5900) /* PS2 EE */ typedef long ogg_int64_t; typedef int ogg_int32_t; typedef unsigned ogg_uint32_t; typedef short ogg_int16_t; #elif defined(__SYMBIAN32__) /* Symbian GCC */ typedef signed short ogg_int16_t; typedef unsigned short ogg_uint16_t; typedef signed int ogg_int32_t; typedef unsigned int ogg_uint32_t; typedef long long int ogg_int64_t; #else # include # include #endif #endif /* _OS_TYPES_H */ ================================================ FILE: 3rdParty/libvorbis/include/analysis.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: single-block PCM analysis mode dispatch last mod: $Id: analysis.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "registry.h" #include "scales.h" #include "os.h" #include "misc.h" int analysis_noisy=1; /* decides between modes, dispatches to the appropriate mapping. */ int vorbis_analysis(vorbis_block *vb, ogg_packet *op){ int ret,i; vorbis_block_internal *vbi=vb->internal; vb->glue_bits=0; vb->time_bits=0; vb->floor_bits=0; vb->res_bits=0; /* first things first. Make sure encode is ready */ for(i=0;ipacketblob[i]); /* we only have one mapping type (0), and we let the mapping code itself figure out what soft mode to use. This allows easier bitrate management */ if((ret=_mapping_P[0]->forward(vb))) return(ret); if(op){ if(vorbis_bitrate_managed(vb)) /* The app is using a bitmanaged mode... but not using the bitrate management interface. */ return(OV_EINVAL); op->packet=oggpack_get_buffer(&vb->opb); op->bytes=oggpack_bytes(&vb->opb); op->b_o_s=0; op->e_o_s=vb->eofflag; op->granulepos=vb->granulepos; op->packetno=vb->sequence; /* for sake of completeness */ } return(0); } /* there was no great place to put this.... */ void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg_int64_t off){ int j; FILE *of; char buffer[80]; /* if(i==5870){*/ sprintf(buffer,"%s_%d.m",base,i); of=fopen(buffer,"w"); if(!of)perror("failed to open data dump file"); for(j=0;j #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "os.h" #include "misc.h" #include "bitrate.h" /* compute bitrate tracking setup */ void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){ codec_setup_info *ci=vi->codec_setup; bitrate_manager_info *bi=&ci->bi; memset(bm,0,sizeof(*bm)); if(bi && (bi->reservoir_bits>0)){ long ratesamples=vi->rate; int halfsamples=ci->blocksizes[0]>>1; bm->short_per_long=ci->blocksizes[1]/ci->blocksizes[0]; bm->managed=1; bm->avg_bitsper= rint(1.*bi->avg_rate*halfsamples/ratesamples); bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples); bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples); bm->avgfloat=PACKETBLOBS/2; /* not a necessary fix, but one that leads to a more balanced typical initialization */ { long desired_fill=bi->reservoir_bits*bi->reservoir_bias; bm->minmax_reservoir=desired_fill; bm->avg_reservoir=desired_fill; } } } void vorbis_bitrate_clear(bitrate_manager_state *bm){ memset(bm,0,sizeof(*bm)); return; } int vorbis_bitrate_managed(vorbis_block *vb){ vorbis_dsp_state *vd=vb->vd; private_state *b=vd->backend_state; bitrate_manager_state *bm=&b->bms; if(bm && bm->managed)return(1); return(0); } /* finish taking in the block we just processed */ int vorbis_bitrate_addblock(vorbis_block *vb){ vorbis_block_internal *vbi=vb->internal; vorbis_dsp_state *vd=vb->vd; private_state *b=vd->backend_state; bitrate_manager_state *bm=&b->bms; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; bitrate_manager_info *bi=&ci->bi; int choice=rint(bm->avgfloat); long this_bits=oggpack_bytes(vbi->packetblob[choice])*8; long min_target_bits=(vb->W?bm->min_bitsper*bm->short_per_long:bm->min_bitsper); long max_target_bits=(vb->W?bm->max_bitsper*bm->short_per_long:bm->max_bitsper); int samples=ci->blocksizes[vb->W]>>1; long desired_fill=bi->reservoir_bits*bi->reservoir_bias; if(!bm->managed){ /* not a bitrate managed stream, but for API simplicity, we'll buffer the packet to keep the code path clean */ if(bm->vb)return(-1); /* one has been submitted without being claimed */ bm->vb=vb; return(0); } bm->vb=vb; /* look ahead for avg floater */ if(bm->avg_bitsper>0){ double slew=0.; long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper); double slewlimit= 15./bi->slew_damp; /* choosing a new floater: if we're over target, we slew down if we're under target, we slew up choose slew as follows: look through packetblobs of this frame and set slew as the first in the appropriate direction that gives us the slew we want. This may mean no slew if delta is already favorable. Then limit slew to slew max */ if(bm->avg_reservoir+(this_bits-avg_target_bits)>desired_fill){ while(choice>0 && this_bits>avg_target_bits && bm->avg_reservoir+(this_bits-avg_target_bits)>desired_fill){ choice--; this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } }else if(bm->avg_reservoir+(this_bits-avg_target_bits)avg_reservoir+(this_bits-avg_target_bits)packetblob[choice])*8; } } slew=rint(choice-bm->avgfloat)/samples*vi->rate; if(slew<-slewlimit)slew=-slewlimit; if(slew>slewlimit)slew=slewlimit; choice=rint(bm->avgfloat+= slew/vi->rate*samples); this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } /* enforce min(if used) on the current floater (if used) */ if(bm->min_bitsper>0){ /* do we need to force the bitrate up? */ if(this_bitsminmax_reservoir-(min_target_bits-this_bits)<0){ choice++; if(choice>=PACKETBLOBS)break; this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } } } /* enforce max (if used) on the current floater (if used) */ if(bm->max_bitsper>0){ /* do we need to force the bitrate down? */ if(this_bits>max_target_bits){ while(bm->minmax_reservoir+(this_bits-max_target_bits)>bi->reservoir_bits){ choice--; if(choice<0)break; this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } } } /* Choice of packetblobs now made based on floater, and min/max requirements. Now boundary check extreme choices */ if(choice<0){ /* choosing a smaller packetblob is insufficient to trim bitrate. frame will need to be truncated */ long maxsize=(max_target_bits+(bi->reservoir_bits-bm->minmax_reservoir))/8; bm->choice=choice=0; if(oggpack_bytes(vbi->packetblob[choice])>maxsize){ oggpack_writetrunc(vbi->packetblob[choice],maxsize*8); this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } }else{ long minsize=(min_target_bits-bm->minmax_reservoir+7)/8; if(choice>=PACKETBLOBS) choice=PACKETBLOBS-1; bm->choice=choice; /* prop up bitrate according to demand. pad this frame out with zeroes */ minsize-=oggpack_bytes(vbi->packetblob[choice]); while(minsize-->0)oggpack_write(vbi->packetblob[choice],0,8); this_bits=oggpack_bytes(vbi->packetblob[choice])*8; } /* now we have the final packet and the final packet size. Update statistics */ /* min and max reservoir */ if(bm->min_bitsper>0 || bm->max_bitsper>0){ if(max_target_bits>0 && this_bits>max_target_bits){ bm->minmax_reservoir+=(this_bits-max_target_bits); }else if(min_target_bits>0 && this_bitsminmax_reservoir+=(this_bits-min_target_bits); }else{ /* inbetween; we want to take reservoir toward but not past desired_fill */ if(bm->minmax_reservoir>desired_fill){ if(max_target_bits>0){ /* logical bulletproofing against initialization state */ bm->minmax_reservoir+=(this_bits-max_target_bits); if(bm->minmax_reservoirminmax_reservoir=desired_fill; }else{ bm->minmax_reservoir=desired_fill; } }else{ if(min_target_bits>0){ /* logical bulletproofing against initialization state */ bm->minmax_reservoir+=(this_bits-min_target_bits); if(bm->minmax_reservoir>desired_fill)bm->minmax_reservoir=desired_fill; }else{ bm->minmax_reservoir=desired_fill; } } } } /* avg reservoir */ if(bm->avg_bitsper>0){ long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper); bm->avg_reservoir+=this_bits-avg_target_bits; } return(0); } int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){ private_state *b=vd->backend_state; bitrate_manager_state *bm=&b->bms; vorbis_block *vb=bm->vb; int choice=PACKETBLOBS/2; if(!vb)return 0; if(op){ vorbis_block_internal *vbi=vb->internal; if(vorbis_bitrate_managed(vb)) choice=bm->choice; op->packet=oggpack_get_buffer(vbi->packetblob[choice]); op->bytes=oggpack_bytes(vbi->packetblob[choice]); op->b_o_s=0; op->e_o_s=vb->eofflag; op->granulepos=vb->granulepos; op->packetno=vb->sequence; /* for sake of completeness */ } bm->vb=0; return(1); } ================================================ FILE: 3rdParty/libvorbis/include/bitrate.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: bitrate tracking and management last mod: $Id: bitrate.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_BITRATE_H_ #define _V_BITRATE_H_ #include "vorbis/codec.h" #include "codec_internal.h" #include "os.h" /* encode side bitrate tracking */ typedef struct bitrate_manager_state { int managed; long avg_reservoir; long minmax_reservoir; long avg_bitsper; long min_bitsper; long max_bitsper; long short_per_long; double avgfloat; vorbis_block *vb; int choice; } bitrate_manager_state; typedef struct bitrate_manager_info{ long avg_rate; long min_rate; long max_rate; long reservoir_bits; double reservoir_bias; double slew_damp; } bitrate_manager_info; extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs); extern void vorbis_bitrate_clear(bitrate_manager_state *bs); extern int vorbis_bitrate_managed(vorbis_block *vb); extern int vorbis_bitrate_addblock(vorbis_block *vb); extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op); #endif ================================================ FILE: 3rdParty/libvorbis/include/block.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: PCM data vector blocking, windowing and dis/reassembly last mod: $Id: block.c 13293 2007-07-24 00:09:47Z xiphmont $ Handle windowing, overlap-add, etc of the PCM vectors. This is made more amusing by Vorbis' current two allowed block sizes. ********************************************************************/ #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "window.h" #include "mdct.h" #include "lpc.h" #include "registry.h" #include "misc.h" static int ilog2(unsigned int v){ int ret=0; if(v)--v; while(v){ ret++; v>>=1; } return(ret); } /* pcm accumulator examples (not exhaustive): <-------------- lW ----------------> <--------------- W ----------------> : .....|..... _______________ | : .''' | '''_--- | |\ | :.....''' |_____--- '''......| | \_______| :.................|__________________|_______|__|______| |<------ Sl ------>| > Sr < |endW |beginSl |endSl | |endSr |beginW |endlW |beginSr |< lW >| <--------------- W ----------------> | | .. ______________ | | | ' `/ | ---_ | |___.'___/`. | ---_____| |_______|__|_______|_________________| | >|Sl|< |<------ Sr ----->|endW | | |endSl |beginSr |endSr |beginW | |endlW mult[0] |beginSl mult[n] <-------------- lW -----------------> |<--W-->| : .............. ___ | | : .''' |`/ \ | | :.....''' |/`....\|...| :.........................|___|___|___| |Sl |Sr |endW | | |endSr | |beginSr | |endSl |beginSl |beginW */ /* block abstraction setup *********************************************/ #ifndef WORD_ALIGN #define WORD_ALIGN 8 #endif int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){ int i; memset(vb,0,sizeof(*vb)); vb->vd=v; vb->localalloc=0; vb->localstore=NULL; if(v->analysisp){ vorbis_block_internal *vbi= vb->internal=_ogg_calloc(1,sizeof(vorbis_block_internal)); vbi->ampmax=-9999; for(i=0;ipacketblob[i]=&vb->opb; }else{ vbi->packetblob[i]= _ogg_calloc(1,sizeof(oggpack_buffer)); } oggpack_writeinit(vbi->packetblob[i]); } } return(0); } void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1); if(bytes+vb->localtop>vb->localalloc){ /* can't just _ogg_realloc... there are outstanding pointers */ if(vb->localstore){ struct alloc_chain *link=_ogg_malloc(sizeof(*link)); vb->totaluse+=vb->localtop; link->next=vb->reap; link->ptr=vb->localstore; vb->reap=link; } /* highly conservative */ vb->localalloc=bytes; vb->localstore=_ogg_malloc(vb->localalloc); vb->localtop=0; } { void *ret=(void *)(((char *)vb->localstore)+vb->localtop); vb->localtop+=bytes; return ret; } } /* reap the chain, pull the ripcord */ void _vorbis_block_ripcord(vorbis_block *vb){ /* reap the chain */ struct alloc_chain *reap=vb->reap; while(reap){ struct alloc_chain *next=reap->next; _ogg_free(reap->ptr); memset(reap,0,sizeof(*reap)); _ogg_free(reap); reap=next; } /* consolidate storage */ if(vb->totaluse){ vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc); vb->localalloc+=vb->totaluse; vb->totaluse=0; } /* pull the ripcord */ vb->localtop=0; vb->reap=NULL; } int vorbis_block_clear(vorbis_block *vb){ int i; vorbis_block_internal *vbi=vb->internal; _vorbis_block_ripcord(vb); if(vb->localstore)_ogg_free(vb->localstore); if(vbi){ for(i=0;ipacketblob[i]); if(i!=PACKETBLOBS/2)_ogg_free(vbi->packetblob[i]); } _ogg_free(vbi); } memset(vb,0,sizeof(*vb)); return(0); } /* Analysis side code, but directly related to blocking. Thus it's here and not in analysis.c (which is for analysis transforms only). The init is here because some of it is shared */ static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){ int i; codec_setup_info *ci=vi->codec_setup; private_state *b=NULL; int hs; if(ci==NULL) return 1; hs=ci->halfrate_flag; memset(v,0,sizeof(*v)); b=v->backend_state=_ogg_calloc(1,sizeof(*b)); v->vi=vi; b->modebits=ilog2(ci->modes); b->transform[0]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[0])); b->transform[1]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[1])); /* MDCT is tranform 0 */ b->transform[0][0]=_ogg_calloc(1,sizeof(mdct_lookup)); b->transform[1][0]=_ogg_calloc(1,sizeof(mdct_lookup)); mdct_init(b->transform[0][0],ci->blocksizes[0]>>hs); mdct_init(b->transform[1][0],ci->blocksizes[1]>>hs); /* Vorbis I uses only window type 0 */ b->window[0]=ilog2(ci->blocksizes[0])-6; b->window[1]=ilog2(ci->blocksizes[1])-6; if(encp){ /* encode/decode differ here */ /* analysis always needs an fft */ drft_init(&b->fft_look[0],ci->blocksizes[0]); drft_init(&b->fft_look[1],ci->blocksizes[1]); /* finish the codebooks */ if(!ci->fullbooks){ ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); for(i=0;ibooks;i++) vorbis_book_init_encode(ci->fullbooks+i,ci->book_param[i]); } b->psy=_ogg_calloc(ci->psys,sizeof(*b->psy)); for(i=0;ipsys;i++){ _vp_psy_init(b->psy+i, ci->psy_param[i], &ci->psy_g_param, ci->blocksizes[ci->psy_param[i]->blockflag]/2, vi->rate); } v->analysisp=1; }else{ /* finish the codebooks */ if(!ci->fullbooks){ ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); for(i=0;ibooks;i++){ vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]); /* decode codebooks are now standalone after init */ vorbis_staticbook_destroy(ci->book_param[i]); ci->book_param[i]=NULL; } } } /* initialize the storage vectors. blocksize[1] is small for encode, but the correct size for decode */ v->pcm_storage=ci->blocksizes[1]; v->pcm=_ogg_malloc(vi->channels*sizeof(*v->pcm)); v->pcmret=_ogg_malloc(vi->channels*sizeof(*v->pcmret)); { int i; for(i=0;ichannels;i++) v->pcm[i]=_ogg_calloc(v->pcm_storage,sizeof(*v->pcm[i])); } /* all 1 (large block) or 0 (small block) */ /* explicitly set for the sake of clarity */ v->lW=0; /* previous window size */ v->W=0; /* current window size */ /* all vector indexes */ v->centerW=ci->blocksizes[1]/2; v->pcm_current=v->centerW; /* initialize all the backend lookups */ b->flr=_ogg_calloc(ci->floors,sizeof(*b->flr)); b->residue=_ogg_calloc(ci->residues,sizeof(*b->residue)); for(i=0;ifloors;i++) b->flr[i]=_floor_P[ci->floor_type[i]]-> look(v,ci->floor_param[i]); for(i=0;iresidues;i++) b->residue[i]=_residue_P[ci->residue_type[i]]-> look(v,ci->residue_param[i]); return 0; } /* arbitrary settings and spec-mandated numbers get filled in here */ int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi){ private_state *b=NULL; if(_vds_shared_init(v,vi,1))return 1; b=v->backend_state; b->psy_g_look=_vp_global_look(vi); /* Initialize the envelope state storage */ b->ve=_ogg_calloc(1,sizeof(*b->ve)); _ve_envelope_init(b->ve,vi); vorbis_bitrate_init(vi,&b->bms); /* compressed audio packets start after the headers with sequence number 3 */ v->sequence=3; return(0); } void vorbis_dsp_clear(vorbis_dsp_state *v){ int i; if(v){ vorbis_info *vi=v->vi; codec_setup_info *ci=(vi?vi->codec_setup:NULL); private_state *b=v->backend_state; if(b){ if(b->ve){ _ve_envelope_clear(b->ve); _ogg_free(b->ve); } if(b->transform[0]){ mdct_clear(b->transform[0][0]); _ogg_free(b->transform[0][0]); _ogg_free(b->transform[0]); } if(b->transform[1]){ mdct_clear(b->transform[1][0]); _ogg_free(b->transform[1][0]); _ogg_free(b->transform[1]); } if(b->flr){ if(ci) for(i=0;ifloors;i++) _floor_P[ci->floor_type[i]]-> free_look(b->flr[i]); _ogg_free(b->flr); } if(b->residue){ if(ci) for(i=0;iresidues;i++) _residue_P[ci->residue_type[i]]-> free_look(b->residue[i]); _ogg_free(b->residue); } if(b->psy){ if(ci) for(i=0;ipsys;i++) _vp_psy_clear(b->psy+i); _ogg_free(b->psy); } if(b->psy_g_look)_vp_global_free(b->psy_g_look); vorbis_bitrate_clear(&b->bms); drft_clear(&b->fft_look[0]); drft_clear(&b->fft_look[1]); } if(v->pcm){ if(vi) for(i=0;ichannels;i++) if(v->pcm[i])_ogg_free(v->pcm[i]); _ogg_free(v->pcm); if(v->pcmret)_ogg_free(v->pcmret); } if(b){ /* free header, header1, header2 */ if(b->header)_ogg_free(b->header); if(b->header1)_ogg_free(b->header1); if(b->header2)_ogg_free(b->header2); _ogg_free(b); } memset(v,0,sizeof(*v)); } } float **vorbis_analysis_buffer(vorbis_dsp_state *v, int vals){ int i; vorbis_info *vi=v->vi; private_state *b=v->backend_state; /* free header, header1, header2 */ if(b->header)_ogg_free(b->header);b->header=NULL; if(b->header1)_ogg_free(b->header1);b->header1=NULL; if(b->header2)_ogg_free(b->header2);b->header2=NULL; /* Do we have enough storage space for the requested buffer? If not, expand the PCM (and envelope) storage */ if(v->pcm_current+vals>=v->pcm_storage){ v->pcm_storage=v->pcm_current+vals*2; for(i=0;ichannels;i++){ v->pcm[i]=_ogg_realloc(v->pcm[i],v->pcm_storage*sizeof(*v->pcm[i])); } } for(i=0;ichannels;i++) v->pcmret[i]=v->pcm[i]+v->pcm_current; return(v->pcmret); } static void _preextrapolate_helper(vorbis_dsp_state *v){ int i; int order=32; float *lpc=alloca(order*sizeof(*lpc)); float *work=alloca(v->pcm_current*sizeof(*work)); long j; v->preextrapolate=1; if(v->pcm_current-v->centerW>order*2){ /* safety */ for(i=0;ivi->channels;i++){ /* need to run the extrapolation in reverse! */ for(j=0;jpcm_current;j++) work[j]=v->pcm[i][v->pcm_current-j-1]; /* prime as above */ vorbis_lpc_from_data(work,lpc,v->pcm_current-v->centerW,order); /* run the predictor filter */ vorbis_lpc_predict(lpc,work+v->pcm_current-v->centerW-order, order, work+v->pcm_current-v->centerW, v->centerW); for(j=0;jpcm_current;j++) v->pcm[i][v->pcm_current-j-1]=work[j]; } } } /* call with val<=0 to set eof */ int vorbis_analysis_wrote(vorbis_dsp_state *v, int vals){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; if(vals<=0){ int order=32; int i; float *lpc=alloca(order*sizeof(*lpc)); /* if it wasn't done earlier (very short sample) */ if(!v->preextrapolate) _preextrapolate_helper(v); /* We're encoding the end of the stream. Just make sure we have [at least] a few full blocks of zeroes at the end. */ /* actually, we don't want zeroes; that could drop a large amplitude off a cliff, creating spread spectrum noise that will suck to encode. Extrapolate for the sake of cleanliness. */ vorbis_analysis_buffer(v,ci->blocksizes[1]*3); v->eofflag=v->pcm_current; v->pcm_current+=ci->blocksizes[1]*3; for(i=0;ichannels;i++){ if(v->eofflag>order*2){ /* extrapolate with LPC to fill in */ long n; /* make a predictor filter */ n=v->eofflag; if(n>ci->blocksizes[1])n=ci->blocksizes[1]; vorbis_lpc_from_data(v->pcm[i]+v->eofflag-n,lpc,n,order); /* run the predictor filter */ vorbis_lpc_predict(lpc,v->pcm[i]+v->eofflag-order,order, v->pcm[i]+v->eofflag,v->pcm_current-v->eofflag); }else{ /* not enough data to extrapolate (unlikely to happen due to guarding the overlap, but bulletproof in case that assumtion goes away). zeroes will do. */ memset(v->pcm[i]+v->eofflag,0, (v->pcm_current-v->eofflag)*sizeof(*v->pcm[i])); } } }else{ if(v->pcm_current+vals>v->pcm_storage) return(OV_EINVAL); v->pcm_current+=vals; /* we may want to reverse extrapolate the beginning of a stream too... in case we're beginning on a cliff! */ /* clumsy, but simple. It only runs once, so simple is good. */ if(!v->preextrapolate && v->pcm_current-v->centerW>ci->blocksizes[1]) _preextrapolate_helper(v); } return(0); } /* do the deltas, envelope shaping, pre-echo and determine the size of the next block on which to continue analysis */ int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ int i; vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; private_state *b=v->backend_state; vorbis_look_psy_global *g=b->psy_g_look; long beginW=v->centerW-ci->blocksizes[v->W]/2,centerNext; vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; /* check to see if we're started... */ if(!v->preextrapolate)return(0); /* check to see if we're done... */ if(v->eofflag==-1)return(0); /* By our invariant, we have lW, W and centerW set. Search for the next boundary so we can determine nW (the next window size) which lets us compute the shape of the current block's window */ /* we do an envelope search even on a single blocksize; we may still be throwing more bits at impulses, and envelope search handles marking impulses too. */ { long bp=_ve_envelope_search(v); if(bp==-1){ if(v->eofflag==0)return(0); /* not enough data currently to search for a full long block */ v->nW=0; }else{ if(ci->blocksizes[0]==ci->blocksizes[1]) v->nW=0; else v->nW=bp; } } centerNext=v->centerW+ci->blocksizes[v->W]/4+ci->blocksizes[v->nW]/4; { /* center of next block + next block maximum right side. */ long blockbound=centerNext+ci->blocksizes[v->nW]/2; if(v->pcm_currentlW=v->lW; vb->W=v->W; vb->nW=v->nW; if(v->W){ if(!v->lW || !v->nW){ vbi->blocktype=BLOCKTYPE_TRANSITION; /*fprintf(stderr,"-");*/ }else{ vbi->blocktype=BLOCKTYPE_LONG; /*fprintf(stderr,"_");*/ } }else{ if(_ve_envelope_mark(v)){ vbi->blocktype=BLOCKTYPE_IMPULSE; /*fprintf(stderr,"|");*/ }else{ vbi->blocktype=BLOCKTYPE_PADDING; /*fprintf(stderr,".");*/ } } vb->vd=v; vb->sequence=v->sequence++; vb->granulepos=v->granulepos; vb->pcmend=ci->blocksizes[v->W]; /* copy the vectors; this uses the local storage in vb */ /* this tracks 'strongest peak' for later psychoacoustics */ /* moved to the global psy state; clean this mess up */ if(vbi->ampmax>g->ampmax)g->ampmax=vbi->ampmax; g->ampmax=_vp_ampmax_decay(g->ampmax,v); vbi->ampmax=g->ampmax; vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); vbi->pcmdelay=_vorbis_block_alloc(vb,sizeof(*vbi->pcmdelay)*vi->channels); for(i=0;ichannels;i++){ vbi->pcmdelay[i]= _vorbis_block_alloc(vb,(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); memcpy(vbi->pcmdelay[i],v->pcm[i],(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); vb->pcm[i]=vbi->pcmdelay[i]+beginW; /* before we added the delay vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); memcpy(vb->pcm[i],v->pcm[i]+beginW,ci->blocksizes[v->W]*sizeof(*vb->pcm[i])); */ } /* handle eof detection: eof==0 means that we've not yet received EOF eof>0 marks the last 'real' sample in pcm[] eof<0 'no more to do'; doesn't get here */ if(v->eofflag){ if(v->centerW>=v->eofflag){ v->eofflag=-1; vb->eofflag=1; return(1); } } /* advance storage vectors and clean up */ { int new_centerNext=ci->blocksizes[1]/2; int movementW=centerNext-new_centerNext; if(movementW>0){ _ve_envelope_shift(b->ve,movementW); v->pcm_current-=movementW; for(i=0;ichannels;i++) memmove(v->pcm[i],v->pcm[i]+movementW, v->pcm_current*sizeof(*v->pcm[i])); v->lW=v->W; v->W=v->nW; v->centerW=new_centerNext; if(v->eofflag){ v->eofflag-=movementW; if(v->eofflag<=0)v->eofflag=-1; /* do not add padding to end of stream! */ if(v->centerW>=v->eofflag){ v->granulepos+=movementW-(v->centerW-v->eofflag); }else{ v->granulepos+=movementW; } }else{ v->granulepos+=movementW; } } } /* done */ return(1); } int vorbis_synthesis_restart(vorbis_dsp_state *v){ vorbis_info *vi=v->vi; codec_setup_info *ci; int hs; if(!v->backend_state)return -1; if(!vi)return -1; ci=vi->codec_setup; if(!ci)return -1; hs=ci->halfrate_flag; v->centerW=ci->blocksizes[1]>>(hs+1); v->pcm_current=v->centerW>>hs; v->pcm_returned=-1; v->granulepos=-1; v->sequence=-1; v->eofflag=0; ((private_state *)(v->backend_state))->sample_count=-1; return(0); } int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ if(_vds_shared_init(v,vi,0)) return 1; vorbis_synthesis_restart(v); return 0; } /* Unlike in analysis, the window is only partially applied for each block. The time domain envelope is not yet handled at the point of calling (as it relies on the previous block). */ int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; private_state *b=v->backend_state; int hs=ci->halfrate_flag; int i,j; if(!vb)return(OV_EINVAL); if(v->pcm_current>v->pcm_returned && v->pcm_returned!=-1)return(OV_EINVAL); v->lW=v->W; v->W=vb->W; v->nW=-1; if((v->sequence==-1)|| (v->sequence+1 != vb->sequence)){ v->granulepos=-1; /* out of sequence; lose count */ b->sample_count=-1; } v->sequence=vb->sequence; if(vb->pcm){ /* no pcm to process if vorbis_synthesis_trackonly was called on block */ int n=ci->blocksizes[v->W]>>(hs+1); int n0=ci->blocksizes[0]>>(hs+1); int n1=ci->blocksizes[1]>>(hs+1); int thisCenter; int prevCenter; v->glue_bits+=vb->glue_bits; v->time_bits+=vb->time_bits; v->floor_bits+=vb->floor_bits; v->res_bits+=vb->res_bits; if(v->centerW){ thisCenter=n1; prevCenter=0; }else{ thisCenter=0; prevCenter=n1; } /* v->pcm is now used like a two-stage double buffer. We don't want to have to constantly shift *or* adjust memory usage. Don't accept a new block until the old is shifted out */ for(j=0;jchannels;j++){ /* the overlap/add section */ if(v->lW){ if(v->W){ /* large/large */ float *w=_vorbis_window_get(b->window[1]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]; for(i=0;iwindow[0]-hs); float *pcm=v->pcm[j]+prevCenter+n1/2-n0/2; float *p=vb->pcm[j]; for(i=0;iW){ /* small/large */ float *w=_vorbis_window_get(b->window[0]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]+n1/2-n0/2; for(i=0;iwindow[0]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]; for(i=0;ipcm[j]+thisCenter; float *p=vb->pcm[j]+n; for(i=0;icenterW) v->centerW=0; else v->centerW=n1; /* deal with initial packet state; we do this using the explicit pcm_returned==-1 flag otherwise we're sensitive to first block being short or long */ if(v->pcm_returned==-1){ v->pcm_returned=thisCenter; v->pcm_current=thisCenter; }else{ v->pcm_returned=prevCenter; v->pcm_current=prevCenter+ ((ci->blocksizes[v->lW]/4+ ci->blocksizes[v->W]/4)>>hs); } } /* track the frame number... This is for convenience, but also making sure our last packet doesn't end with added padding. If the last packet is partial, the number of samples we'll have to return will be past the vb->granulepos. This is not foolproof! It will be confused if we begin decoding at the last page after a seek or hole. In that case, we don't have a starting point to judge where the last frame is. For this reason, vorbisfile will always try to make sure it reads the last two marked pages in proper sequence */ if(b->sample_count==-1){ b->sample_count=0; }else{ b->sample_count+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; } if(v->granulepos==-1){ if(vb->granulepos!=-1){ /* only set if we have a position to set to */ v->granulepos=vb->granulepos; /* is this a short page? */ if(b->sample_count>v->granulepos){ /* corner case; if this is both the first and last audio page, then spec says the end is cut, not beginning */ if(vb->eofflag){ /* trim the end */ /* no preceeding granulepos; assume we started at zero (we'd have to in a short single-page stream) */ /* granulepos could be -1 due to a seek, but that would result in a long count, not short count */ v->pcm_current-=(b->sample_count-v->granulepos)>>hs; }else{ /* trim the beginning */ v->pcm_returned+=(b->sample_count-v->granulepos)>>hs; if(v->pcm_returned>v->pcm_current) v->pcm_returned=v->pcm_current; } } } }else{ v->granulepos+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){ if(v->granulepos>vb->granulepos){ long extra=v->granulepos-vb->granulepos; if(extra) if(vb->eofflag){ /* partial last frame. Strip the extra samples off */ v->pcm_current-=extra>>hs; } /* else {Shouldn't happen *unless* the bitstream is out of spec. Either way, believe the bitstream } */ } /* else {Shouldn't happen *unless* the bitstream is out of spec. Either way, believe the bitstream } */ v->granulepos=vb->granulepos; } } /* Update, cleanup */ if(vb->eofflag)v->eofflag=1; return(0); } /* pcm==NULL indicates we just want the pending samples, no more */ int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm){ vorbis_info *vi=v->vi; if(v->pcm_returned>-1 && v->pcm_returnedpcm_current){ if(pcm){ int i; for(i=0;ichannels;i++) v->pcmret[i]=v->pcm[i]+v->pcm_returned; *pcm=v->pcmret; } return(v->pcm_current-v->pcm_returned); } return(0); } int vorbis_synthesis_read(vorbis_dsp_state *v,int n){ if(n && v->pcm_returned+n>v->pcm_current)return(OV_EINVAL); v->pcm_returned+=n; return(0); } /* intended for use with a specific vorbisfile feature; we want access to the [usually synthetic/postextrapolated] buffer and lapping at the end of a decode cycle, specifically, a half-short-block worth. This funtion works like pcmout above, except it will also expose this implicit buffer data not normally decoded. */ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; int hs=ci->halfrate_flag; int n=ci->blocksizes[v->W]>>(hs+1); int n0=ci->blocksizes[0]>>(hs+1); int n1=ci->blocksizes[1]>>(hs+1); int i,j; if(v->pcm_returned<0)return 0; /* our returned data ends at pcm_returned; because the synthesis pcm buffer is a two-fragment ring, that means our data block may be fragmented by buffering, wrapping or a short block not filling out a buffer. To simplify things, we unfragment if it's at all possibly needed. Otherwise, we'd need to call lapout more than once as well as hold additional dsp state. Opt for simplicity. */ /* centerW was advanced by blockin; it would be the center of the *next* block */ if(v->centerW==n1){ /* the data buffer wraps; swap the halves */ /* slow, sure, small */ for(j=0;jchannels;j++){ float *p=v->pcm[j]; for(i=0;ipcm_current-=n1; v->pcm_returned-=n1; v->centerW=0; } /* solidify buffer into contiguous space */ if((v->lW^v->W)==1){ /* long/short or short/long */ for(j=0;jchannels;j++){ float *s=v->pcm[j]; float *d=v->pcm[j]+(n1-n0)/2; for(i=(n1+n0)/2-1;i>=0;--i) d[i]=s[i]; } v->pcm_returned+=(n1-n0)/2; v->pcm_current+=(n1-n0)/2; }else{ if(v->lW==0){ /* short/short */ for(j=0;jchannels;j++){ float *s=v->pcm[j]; float *d=v->pcm[j]+n1-n0; for(i=n0-1;i>=0;--i) d[i]=s[i]; } v->pcm_returned+=n1-n0; v->pcm_current+=n1-n0; } } if(pcm){ int i; for(i=0;ichannels;i++) v->pcmret[i]=v->pcm[i]+v->pcm_returned; *pcm=v->pcmret; } return(n1+n-v->pcm_returned); } float *vorbis_window(vorbis_dsp_state *v,int W){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; int hs=ci->halfrate_flag; private_state *b=v->backend_state; if(b->window[W]-1<0)return NULL; return _vorbis_window_get(b->window[W]-hs); } ================================================ FILE: 3rdParty/libvorbis/include/codebook.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: basic codebook pack/unpack/code/decode operations last mod: $Id: codebook.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include "vorbis/codec.h" #include "codebook.h" #include "scales.h" #include "misc.h" #include "os.h" /* packs the given codebook into the bitstream **************************/ int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){ long i,j; int ordered=0; /* first the basic parameters */ oggpack_write(opb,0x564342,24); oggpack_write(opb,c->dim,16); oggpack_write(opb,c->entries,24); /* pack the codewords. There are two packings; length ordered and length random. Decide between the two now. */ for(i=1;ientries;i++) if(c->lengthlist[i-1]==0 || c->lengthlist[i]lengthlist[i-1])break; if(i==c->entries)ordered=1; if(ordered){ /* length ordered. We only need to say how many codewords of each length. The actual codewords are generated deterministically */ long count=0; oggpack_write(opb,1,1); /* ordered */ oggpack_write(opb,c->lengthlist[0]-1,5); /* 1 to 32 */ for(i=1;ientries;i++){ long this=c->lengthlist[i]; long last=c->lengthlist[i-1]; if(this>last){ for(j=last;jentries-count)); count=i; } } } oggpack_write(opb,i-count,_ilog(c->entries-count)); }else{ /* length random. Again, we don't code the codeword itself, just the length. This time, though, we have to encode each length */ oggpack_write(opb,0,1); /* unordered */ /* algortihmic mapping has use for 'unused entries', which we tag here. The algorithmic mapping happens as usual, but the unused entry has no codeword. */ for(i=0;ientries;i++) if(c->lengthlist[i]==0)break; if(i==c->entries){ oggpack_write(opb,0,1); /* no unused entries */ for(i=0;ientries;i++) oggpack_write(opb,c->lengthlist[i]-1,5); }else{ oggpack_write(opb,1,1); /* we have unused entries; thus we tag */ for(i=0;ientries;i++){ if(c->lengthlist[i]==0){ oggpack_write(opb,0,1); }else{ oggpack_write(opb,1,1); oggpack_write(opb,c->lengthlist[i]-1,5); } } } } /* is the entry number the desired return value, or do we have a mapping? If we have a mapping, what type? */ oggpack_write(opb,c->maptype,4); switch(c->maptype){ case 0: /* no mapping */ break; case 1:case 2: /* implicitly populated value mapping */ /* explicitly populated value mapping */ if(!c->quantlist){ /* no quantlist? error */ return(-1); } /* values that define the dequantization */ oggpack_write(opb,c->q_min,32); oggpack_write(opb,c->q_delta,32); oggpack_write(opb,c->q_quant-1,4); oggpack_write(opb,c->q_sequencep,1); { int quantvals; switch(c->maptype){ case 1: /* a single column of (c->entries/c->dim) quantized values for building a full value list algorithmically (square lattice) */ quantvals=_book_maptype1_quantvals(c); break; case 2: /* every value (c->entries*c->dim total) specified explicitly */ quantvals=c->entries*c->dim; break; default: /* NOT_REACHABLE */ quantvals=-1; } /* quantized values */ for(i=0;iquantlist[i]),c->q_quant); } break; default: /* error case; we don't have any other map types now */ return(-1); } return(0); } /* unpacks a codebook from the packet buffer into the codebook struct, readies the codebook auxiliary structures for decode *************/ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ long i,j; memset(s,0,sizeof(*s)); s->allocedp=1; /* make sure alignment is correct */ if(oggpack_read(opb,24)!=0x564342)goto _eofout; /* first the basic parameters */ s->dim=oggpack_read(opb,16); s->entries=oggpack_read(opb,24); if(s->entries==-1)goto _eofout; /* codeword ordering.... length ordered or unordered? */ switch((int)oggpack_read(opb,1)){ case 0: /* unordered */ s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries); /* allocated but unused entries? */ if(oggpack_read(opb,1)){ /* yes, unused entries */ for(i=0;ientries;i++){ if(oggpack_read(opb,1)){ long num=oggpack_read(opb,5); if(num==-1)goto _eofout; s->lengthlist[i]=num+1; }else s->lengthlist[i]=0; } }else{ /* all entries used; no tagging */ for(i=0;ientries;i++){ long num=oggpack_read(opb,5); if(num==-1)goto _eofout; s->lengthlist[i]=num+1; } } break; case 1: /* ordered */ { long length=oggpack_read(opb,5)+1; s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries); for(i=0;ientries;){ long num=oggpack_read(opb,_ilog(s->entries-i)); if(num==-1)goto _eofout; for(j=0;jentries;j++,i++) s->lengthlist[i]=length; length++; } } break; default: /* EOF */ return(-1); } /* Do we have a mapping to unpack? */ switch((s->maptype=oggpack_read(opb,4))){ case 0: /* no mapping */ break; case 1: case 2: /* implicitly populated value mapping */ /* explicitly populated value mapping */ s->q_min=oggpack_read(opb,32); s->q_delta=oggpack_read(opb,32); s->q_quant=oggpack_read(opb,4)+1; s->q_sequencep=oggpack_read(opb,1); { int quantvals=0; switch(s->maptype){ case 1: quantvals=_book_maptype1_quantvals(s); break; case 2: quantvals=s->entries*s->dim; break; } /* quantized values */ s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals); for(i=0;iquantlist[i]=oggpack_read(opb,s->q_quant); if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout; } break; default: goto _errout; } /* all set */ return(0); _errout: _eofout: vorbis_staticbook_clear(s); return(-1); } /* returns the number of bits ************************************************/ int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b){ if(a<0 || a>=book->c->entries)return(0); oggpack_write(b,book->codelist[a],book->c->lengthlist[a]); return(book->c->lengthlist[a]); } /* One the encode side, our vector writers are each designed for a specific purpose, and the encoder is not flexible without modification: The LSP vector coder uses a single stage nearest-match with no interleave, so no step and no error return. This is specced by floor0 and doesn't change. Residue0 encoding interleaves, uses multiple stages, and each stage peels of a specific amount of resolution from a lattice (thus we want to match by threshold, not nearest match). Residue doesn't *have* to be encoded that way, but to change it, one will need to add more infrastructure on the encode side (decode side is specced and simpler) */ /* floor0 LSP (single stage, non interleaved, nearest match) */ /* returns entry number and *modifies a* to the quantization value *****/ int vorbis_book_errorv(codebook *book,float *a){ int dim=book->dim,k; int best=_best(book,a,1); for(k=0;kvaluelist+best*dim)[k]; return(best); } /* returns the number of bits and *modifies a* to the quantization value *****/ int vorbis_book_encodev(codebook *book,int best,float *a,oggpack_buffer *b){ int k,dim=book->dim; for(k=0;kvaluelist+best*dim)[k]; return(vorbis_book_encode(book,best,b)); } /* the 'eliminate the decode tree' optimization actually requires the codewords to be MSb first, not LSb. This is an annoying inelegancy (and one of the first places where carefully thought out design turned out to be wrong; Vorbis II and future Ogg codecs should go to an MSb bitpacker), but not actually the huge hit it appears to be. The first-stage decode table catches most words so that bitreverse is not in the main execution path. */ static ogg_uint32_t bitreverse(ogg_uint32_t x){ x= ((x>>16)&0x0000ffff) | ((x<<16)&0xffff0000); x= ((x>> 8)&0x00ff00ff) | ((x<< 8)&0xff00ff00); x= ((x>> 4)&0x0f0f0f0f) | ((x<< 4)&0xf0f0f0f0); x= ((x>> 2)&0x33333333) | ((x<< 2)&0xcccccccc); return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa); } STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){ int read=book->dec_maxlength; long lo,hi; long lok = oggpack_look(b,book->dec_firsttablen); if (lok >= 0) { long entry = book->dec_firsttable[lok]; if(entry&0x80000000UL){ lo=(entry>>15)&0x7fff; hi=book->used_entries-(entry&0x7fff); }else{ oggpack_adv(b, book->dec_codelengths[entry-1]); return(entry-1); } }else{ lo=0; hi=book->used_entries; } lok = oggpack_look(b, read); while(lok<0 && read>1) lok = oggpack_look(b, --read); if(lok<0)return -1; /* bisect search for the codeword in the ordered list */ { ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok); while(hi-lo>1){ long p=(hi-lo)>>1; long test=book->codelist[lo+p]>testword; lo+=p&(test-1); hi-=p&(-test); } if(book->dec_codelengths[lo]<=read){ oggpack_adv(b, book->dec_codelengths[lo]); return(lo); } } oggpack_adv(b, read); return(-1); } /* Decode side is specced and easier, because we don't need to find matches using different criteria; we simply read and map. There are two things we need to do 'depending': We may need to support interleave. We don't really, but it's convenient to do it here rather than rebuild the vector later. Cascades may be additive or multiplicitive; this is not inherent in the codebook, but set in the code using the codebook. Like interleaving, it's easiest to do it here. addmul==0 -> declarative (set the value) addmul==1 -> additive addmul==2 -> multiplicitive */ /* returns the [original, not compacted] entry number or -1 on eof *********/ long vorbis_book_decode(codebook *book, oggpack_buffer *b){ if(book->used_entries>0){ long packed_entry=decode_packed_entry_number(book,b); if(packed_entry>=0) return(book->dec_index[packed_entry]); } /* if there's no dec_index, the codebook unpacking isn't collapsed */ return(-1); } /* returns 0 on OK or -1 on eof *************************************/ long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){ if(book->used_entries>0){ int step=n/book->dim; long *entry = alloca(sizeof(*entry)*step); float **t = alloca(sizeof(*t)*step); int i,j,o; for (i = 0; i < step; i++) { entry[i]=decode_packed_entry_number(book,b); if(entry[i]==-1)return(-1); t[i] = book->valuelist+entry[i]*book->dim; } for(i=0,o=0;idim;i++,o+=step) for (j=0;jused_entries>0){ int i,j,entry; float *t; if(book->dim>8){ for(i=0;ivaluelist+entry*book->dim; for (j=0;jdim;) a[i++]+=t[j++]; } }else{ for(i=0;ivaluelist+entry*book->dim; j=0; switch((int)book->dim){ case 8: a[i++]+=t[j++]; case 7: a[i++]+=t[j++]; case 6: a[i++]+=t[j++]; case 5: a[i++]+=t[j++]; case 4: a[i++]+=t[j++]; case 3: a[i++]+=t[j++]; case 2: a[i++]+=t[j++]; case 1: a[i++]+=t[j++]; case 0: break; } } } } return(0); } long vorbis_book_decodev_set(codebook *book,float *a,oggpack_buffer *b,int n){ if(book->used_entries>0){ int i,j,entry; float *t; for(i=0;ivaluelist+entry*book->dim; for (j=0;jdim;) a[i++]=t[j++]; } }else{ int i,j; for(i=0;idim;) a[i++]=0.f; } } return(0); } long vorbis_book_decodevv_add(codebook *book,float **a,long offset,int ch, oggpack_buffer *b,int n){ long i,j,entry; int chptr=0; if(book->used_entries>0){ for(i=offset/ch;i<(offset+n)/ch;){ entry = decode_packed_entry_number(book,b); if(entry==-1)return(-1); { const float *t = book->valuelist+entry*book->dim; for (j=0;jdim;j++){ a[chptr++][i]+=t[j]; if(chptr==ch){ chptr=0; i++; } } } } } return(0); } #ifdef _V_SELFTEST /* Simple enough; pack a few candidate codebooks, unpack them. Code a number of vectors through (keeping track of the quantized values), and decode using the unpacked book. quantized version of in should exactly equal out */ #include #include "vorbis/book/lsp20_0.vqh" #include "vorbis/book/res0a_13.vqh" #define TESTSIZE 40 float test1[TESTSIZE]={ 0.105939f, 0.215373f, 0.429117f, 0.587974f, 0.181173f, 0.296583f, 0.515707f, 0.715261f, 0.162327f, 0.263834f, 0.342876f, 0.406025f, 0.103571f, 0.223561f, 0.368513f, 0.540313f, 0.136672f, 0.395882f, 0.587183f, 0.652476f, 0.114338f, 0.417300f, 0.525486f, 0.698679f, 0.147492f, 0.324481f, 0.643089f, 0.757582f, 0.139556f, 0.215795f, 0.324559f, 0.399387f, 0.120236f, 0.267420f, 0.446940f, 0.608760f, 0.115587f, 0.287234f, 0.571081f, 0.708603f, }; float test3[TESTSIZE]={ 0,1,-2,3,4,-5,6,7,8,9, 8,-2,7,-1,4,6,8,3,1,-9, 10,11,12,13,14,15,26,17,18,19, 30,-25,-30,-1,-5,-32,4,3,-2,0}; static_codebook *testlist[]={&_vq_book_lsp20_0, &_vq_book_res0a_13,NULL}; float *testvec[]={test1,test3}; int main(){ oggpack_buffer write; oggpack_buffer read; long ptr=0,i; oggpack_writeinit(&write); fprintf(stderr,"Testing codebook abstraction...:\n"); while(testlist[ptr]){ codebook c; static_codebook s; float *qv=alloca(sizeof(*qv)*TESTSIZE); float *iv=alloca(sizeof(*iv)*TESTSIZE); memcpy(qv,testvec[ptr],sizeof(*qv)*TESTSIZE); memset(iv,0,sizeof(*iv)*TESTSIZE); fprintf(stderr,"\tpacking/coding %ld... ",ptr); /* pack the codebook, write the testvector */ oggpack_reset(&write); vorbis_book_init_encode(&c,testlist[ptr]); /* get it into memory we can write */ vorbis_staticbook_pack(testlist[ptr],&write); fprintf(stderr,"Codebook size %ld bytes... ",oggpack_bytes(&write)); for(i=0;i.000001){ fprintf(stderr,"read (%g) != written (%g) at position (%ld)\n", iv[i],qv[i],i); exit(1); } fprintf(stderr,"OK\n"); ptr++; } /* The above is the trivial stuff; now try unquantizing a log scale codebook */ exit(0); } #endif ================================================ FILE: 3rdParty/libvorbis/include/codebook.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: basic shared codebook operations last mod: $Id: codebook.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_CODEBOOK_H_ #define _V_CODEBOOK_H_ #include /* This structure encapsulates huffman and VQ style encoding books; it doesn't do anything specific to either. valuelist/quantlist are nonNULL (and q_* significant) only if there's entry->value mapping to be done. If encode-side mapping must be done (and thus the entry needs to be hunted), the auxiliary encode pointer will point to a decision tree. This is true of both VQ and huffman, but is mostly useful with VQ. */ typedef struct static_codebook{ long dim; /* codebook dimensions (elements per vector) */ long entries; /* codebook entries */ long *lengthlist; /* codeword lengths in bits */ /* mapping ***************************************************************/ int maptype; /* 0=none 1=implicitly populated values from map column 2=listed arbitrary values */ /* The below does a linear, single monotonic sequence mapping. */ long q_min; /* packed 32 bit float; quant value 0 maps to minval */ long q_delta; /* packed 32 bit float; val 1 - val 0 == delta */ int q_quant; /* bits: 0 < quant <= 16 */ int q_sequencep; /* bitflag */ long *quantlist; /* map == 1: (int)(entries^(1/dim)) element column map map == 2: list of dim*entries quantized entry vals */ /* encode helpers ********************************************************/ struct encode_aux_nearestmatch *nearest_tree; struct encode_aux_threshmatch *thresh_tree; struct encode_aux_pigeonhole *pigeon_tree; int allocedp; } static_codebook; /* this structures an arbitrary trained book to quickly find the nearest cell match */ typedef struct encode_aux_nearestmatch{ /* pre-calculated partitioning tree */ long *ptr0; long *ptr1; long *p; /* decision points (each is an entry) */ long *q; /* decision points (each is an entry) */ long aux; /* number of tree entries */ long alloc; } encode_aux_nearestmatch; /* assumes a maptype of 1; encode side only, so that's OK */ typedef struct encode_aux_threshmatch{ float *quantthresh; long *quantmap; int quantvals; int threshvals; } encode_aux_threshmatch; typedef struct encode_aux_pigeonhole{ float min; float del; int mapentries; int quantvals; long *pigeonmap; long fittotal; long *fitlist; long *fitmap; long *fitlength; } encode_aux_pigeonhole; typedef struct codebook{ long dim; /* codebook dimensions (elements per vector) */ long entries; /* codebook entries */ long used_entries; /* populated codebook entries */ const static_codebook *c; /* for encode, the below are entry-ordered, fully populated */ /* for decode, the below are ordered by bitreversed codeword and only used entries are populated */ float *valuelist; /* list of dim*entries actual entry values */ ogg_uint32_t *codelist; /* list of bitstream codewords for each entry */ int *dec_index; /* only used if sparseness collapsed */ char *dec_codelengths; ogg_uint32_t *dec_firsttable; int dec_firsttablen; int dec_maxlength; } codebook; extern void vorbis_staticbook_clear(static_codebook *b); extern void vorbis_staticbook_destroy(static_codebook *b); extern int vorbis_book_init_encode(codebook *dest,const static_codebook *source); extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source); extern void vorbis_book_clear(codebook *b); extern float *_book_unquantize(const static_codebook *b,int n,int *map); extern float *_book_logdist(const static_codebook *b,float *vals); extern float _float32_unpack(long val); extern long _float32_pack(float val); extern int _best(codebook *book, float *a, int step); extern int _ilog(unsigned int v); extern long _book_maptype1_quantvals(const static_codebook *b); extern int vorbis_book_besterror(codebook *book,float *a,int step,int addmul); extern long vorbis_book_codeword(codebook *book,int entry); extern long vorbis_book_codelen(codebook *book,int entry); extern int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *b); extern int vorbis_staticbook_unpack(oggpack_buffer *b,static_codebook *c); extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b); extern int vorbis_book_errorv(codebook *book, float *a); extern int vorbis_book_encodev(codebook *book, int best,float *a, oggpack_buffer *b); extern long vorbis_book_decode(codebook *book, oggpack_buffer *b); extern long vorbis_book_decodevs_add(codebook *book, float *a, oggpack_buffer *b,int n); extern long vorbis_book_decodev_set(codebook *book, float *a, oggpack_buffer *b,int n); extern long vorbis_book_decodev_add(codebook *book, float *a, oggpack_buffer *b,int n); extern long vorbis_book_decodevv_add(codebook *book, float **a, long off,int ch, oggpack_buffer *b,int n); #endif ================================================ FILE: 3rdParty/libvorbis/include/codec.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * * by the Xiph.Org Foundation http://www.xiph.org/ * ******************************************************************** function: libvorbis codec headers last mod: $Id: codec.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _vorbis_codec_h_ #define _vorbis_codec_h_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ //#include #include "ogg.h" typedef struct vorbis_info{ int version; int channels; long rate; /* The below bitrate declarations are *hints*. Combinations of the three values carry the following implications: all three set to the same value: implies a fixed rate bitstream only nominal set: implies a VBR stream that averages the nominal bitrate. No hard upper/lower limit upper and or lower set: implies a VBR bitstream that obeys the bitrate limits. nominal may also be set to give a nominal rate. none set: the coder does not care to speculate. */ long bitrate_upper; long bitrate_nominal; long bitrate_lower; long bitrate_window; void *codec_setup; } vorbis_info; /* vorbis_dsp_state buffers the current vorbis audio analysis/synthesis state. The DSP state belongs to a specific logical bitstream ****************************************************/ typedef struct vorbis_dsp_state{ int analysisp; vorbis_info *vi; float **pcm; float **pcmret; int pcm_storage; int pcm_current; int pcm_returned; int preextrapolate; int eofflag; long lW; long W; long nW; long centerW; ogg_int64_t granulepos; ogg_int64_t sequence; ogg_int64_t glue_bits; ogg_int64_t time_bits; ogg_int64_t floor_bits; ogg_int64_t res_bits; void *backend_state; } vorbis_dsp_state; typedef struct vorbis_block{ /* necessary stream state for linking to the framing abstraction */ float **pcm; /* this is a pointer into local storage */ oggpack_buffer opb; long lW; long W; long nW; int pcmend; int mode; int eofflag; ogg_int64_t granulepos; ogg_int64_t sequence; vorbis_dsp_state *vd; /* For read-only access of configuration */ /* local storage to avoid remallocing; it's up to the mapping to structure it */ void *localstore; long localtop; long localalloc; long totaluse; struct alloc_chain *reap; /* bitmetrics for the frame */ long glue_bits; long time_bits; long floor_bits; long res_bits; void *internal; } vorbis_block; /* vorbis_block is a single block of data to be processed as part of the analysis/synthesis stream; it belongs to a specific logical bitstream, but is independant from other vorbis_blocks belonging to that logical bitstream. *************************************************/ struct alloc_chain{ void *ptr; struct alloc_chain *next; }; /* vorbis_info contains all the setup information specific to the specific compression/decompression mode in progress (eg, psychoacoustic settings, channel setup, options, codebook etc). vorbis_info and substructures are in backends.h. *********************************************************************/ /* the comments are not part of vorbis_info so that vorbis_info can be static storage */ typedef struct vorbis_comment{ /* unlimited user comment fields. libvorbis writes 'libvorbis' whatever vendor is set to in encode */ char **user_comments; int *comment_lengths; int comments; char *vendor; } vorbis_comment; /* libvorbis encodes in two abstraction layers; first we perform DSP and produce a packet (see docs/analysis.txt). The packet is then coded into a framed OggSquish bitstream by the second layer (see docs/framing.txt). Decode is the reverse process; we sync/frame the bitstream and extract individual packets, then decode the packet back into PCM audio. The extra framing/packetizing is used in streaming formats, such as files. Over the net (such as with UDP), the framing and packetization aren't necessary as they're provided by the transport and the streaming layer is not used */ /* Vorbis PRIMITIVES: general ***************************************/ extern void vorbis_info_init(vorbis_info *vi); extern void vorbis_info_clear(vorbis_info *vi); extern int vorbis_info_blocksize(vorbis_info *vi,int zo); extern void vorbis_comment_init(vorbis_comment *vc); extern void vorbis_comment_add(vorbis_comment *vc, char *comment); extern void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents); extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count); extern int vorbis_comment_query_count(vorbis_comment *vc, char *tag); extern void vorbis_comment_clear(vorbis_comment *vc); extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); extern int vorbis_block_clear(vorbis_block *vb); extern void vorbis_dsp_clear(vorbis_dsp_state *v); extern double vorbis_granule_time(vorbis_dsp_state *v, ogg_int64_t granulepos); /* Vorbis PRIMITIVES: analysis/DSP layer ****************************/ extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi); extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); extern int vorbis_analysis_headerout(vorbis_dsp_state *v, vorbis_comment *vc, ogg_packet *op, ogg_packet *op_comm, ogg_packet *op_code); extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals); extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals); extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb); extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op); extern int vorbis_bitrate_addblock(vorbis_block *vb); extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op); /* Vorbis PRIMITIVES: synthesis layer *******************************/ extern int vorbis_synthesis_idheader(ogg_packet *op); extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, ogg_packet *op); extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); extern int vorbis_synthesis_restart(vorbis_dsp_state *v); extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op); extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm); extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm); extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag); extern int vorbis_synthesis_halfrate_p(vorbis_info *v); /* Vorbis ERRORS and return codes ***********************************/ #define OV_FALSE -1 #define OV_EOF -2 #define OV_HOLE -3 #define OV_EREAD -128 #define OV_EFAULT -129 #define OV_EIMPL -130 #define OV_EINVAL -131 #define OV_ENOTVORBIS -132 #define OV_EBADHEADER -133 #define OV_EVERSION -134 #define OV_ENOTAUDIO -135 #define OV_EBADPACKET -136 #define OV_EBADLINK -137 #define OV_ENOSEEK -138 #ifdef __cplusplus } #endif /* __cplusplus */ #endif ================================================ FILE: 3rdParty/libvorbis/include/codec_internal.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: libvorbis codec headers last mod: $Id: codec_internal.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_CODECI_H_ #define _V_CODECI_H_ #include "envelope.h" #include "codebook.h" #define BLOCKTYPE_IMPULSE 0 #define BLOCKTYPE_PADDING 1 #define BLOCKTYPE_TRANSITION 0 #define BLOCKTYPE_LONG 1 #define PACKETBLOBS 15 typedef struct vorbis_block_internal{ float **pcmdelay; /* this is a pointer into local storage */ float ampmax; int blocktype; oggpack_buffer *packetblob[PACKETBLOBS]; /* initialized, must be freed; blob [PACKETBLOBS/2] points to the oggpack_buffer in the main vorbis_block */ } vorbis_block_internal; typedef void vorbis_look_floor; typedef void vorbis_look_residue; typedef void vorbis_look_transform; /* mode ************************************************************/ typedef struct { int blockflag; int windowtype; int transformtype; int mapping; } vorbis_info_mode; typedef void vorbis_info_floor; typedef void vorbis_info_residue; typedef void vorbis_info_mapping; #include "psy.h" #include "bitrate.h" typedef struct private_state { /* local lookup storage */ envelope_lookup *ve; /* envelope lookup */ int window[2]; vorbis_look_transform **transform[2]; /* block, type */ drft_lookup fft_look[2]; int modebits; vorbis_look_floor **flr; vorbis_look_residue **residue; vorbis_look_psy *psy; vorbis_look_psy_global *psy_g_look; /* local storage, only used on the encoding side. This way the application does not need to worry about freeing some packets' memory and not others'; packet storage is always tracked. Cleared next call to a _dsp_ function */ unsigned char *header; unsigned char *header1; unsigned char *header2; bitrate_manager_state bms; ogg_int64_t sample_count; } private_state; /* codec_setup_info contains all the setup information specific to the specific compression/decompression mode in progress (eg, psychoacoustic settings, channel setup, options, codebook etc). *********************************************************************/ #include "highlevel.h" typedef struct codec_setup_info { /* Vorbis supports only short and long blocks, but allows the encoder to choose the sizes */ long blocksizes[2]; /* modes are the primary means of supporting on-the-fly different blocksizes, different channel mappings (LR or M/A), different residue backends, etc. Each mode consists of a blocksize flag and a mapping (along with the mapping setup */ int modes; int maps; int floors; int residues; int books; int psys; /* encode only */ vorbis_info_mode *mode_param[64]; int map_type[64]; vorbis_info_mapping *map_param[64]; int floor_type[64]; vorbis_info_floor *floor_param[64]; int residue_type[64]; vorbis_info_residue *residue_param[64]; static_codebook *book_param[256]; codebook *fullbooks; vorbis_info_psy *psy_param[4]; /* encode only */ vorbis_info_psy_global psy_g_param; bitrate_manager_info bi; highlevel_encode_setup hi; /* used only by vorbisenc.c. It's a highly redundant structure, but improves clarity of program flow. */ int halfrate_flag; /* painless downsample for decode */ } codec_setup_info; extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi); extern void _vp_global_free(vorbis_look_psy_global *look); #endif ================================================ FILE: 3rdParty/libvorbis/include/envelope.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: PCM data envelope analysis last mod: $Id: envelope.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "os.h" #include "scales.h" #include "envelope.h" #include "mdct.h" #include "misc.h" void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; int ch=vi->channels; int i,j; int n=e->winlength=128; e->searchstep=64; /* not random */ e->minenergy=gi->preecho_minenergy; e->ch=ch; e->storage=128; e->cursor=ci->blocksizes[1]/2; e->mdct_win=_ogg_calloc(n,sizeof(*e->mdct_win)); mdct_init(&e->mdct,n); for(i=0;imdct_win[i]=sin(i/(n-1.)*M_PI); e->mdct_win[i]*=e->mdct_win[i]; } /* magic follows */ e->band[0].begin=2; e->band[0].end=4; e->band[1].begin=4; e->band[1].end=5; e->band[2].begin=6; e->band[2].end=6; e->band[3].begin=9; e->band[3].end=8; e->band[4].begin=13; e->band[4].end=8; e->band[5].begin=17; e->band[5].end=8; e->band[6].begin=22; e->band[6].end=8; for(j=0;jband[j].end; e->band[j].window=_ogg_malloc(n*sizeof(*e->band[0].window)); for(i=0;iband[j].window[i]=sin((i+.5)/n*M_PI); e->band[j].total+=e->band[j].window[i]; } e->band[j].total=1./e->band[j].total; } e->filter=_ogg_calloc(VE_BANDS*ch,sizeof(*e->filter)); e->mark=_ogg_calloc(e->storage,sizeof(*e->mark)); } void _ve_envelope_clear(envelope_lookup *e){ int i; mdct_clear(&e->mdct); for(i=0;iband[i].window); _ogg_free(e->mdct_win); _ogg_free(e->filter); _ogg_free(e->mark); memset(e,0,sizeof(*e)); } /* fairly straight threshhold-by-band based until we find something that works better and isn't patented. */ static int _ve_amp(envelope_lookup *ve, vorbis_info_psy_global *gi, float *data, envelope_band *bands, envelope_filter_state *filters, long pos){ long n=ve->winlength; int ret=0; long i,j; float decay; /* we want to have a 'minimum bar' for energy, else we're just basing blocks on quantization noise that outweighs the signal itself (for low power signals) */ float minV=ve->minenergy; float *vec=alloca(n*sizeof(*vec)); /* stretch is used to gradually lengthen the number of windows considered prevoius-to-potential-trigger */ int stretch=max(VE_MINSTRETCH,ve->stretch/2); float penalty=gi->stretch_penalty-(ve->stretch/2-VE_MINSTRETCH); if(penalty<0.f)penalty=0.f; if(penalty>gi->stretch_penalty)penalty=gi->stretch_penalty; /*_analysis_output_always("lpcm",seq2,data,n,0,0, totalshift+pos*ve->searchstep);*/ /* window and transform */ for(i=0;imdct_win[i]; mdct_forward(&ve->mdct,vec,vec); /*_analysis_output_always("mdct",seq2,vec,n/2,0,1,0); */ /* near-DC spreading function; this has nothing to do with psychoacoustics, just sidelobe leakage and window size */ { float temp=vec[0]*vec[0]+.7*vec[1]*vec[1]+.2*vec[2]*vec[2]; int ptr=filters->nearptr; /* the accumulation is regularly refreshed from scratch to avoid floating point creep */ if(ptr==0){ decay=filters->nearDC_acc=filters->nearDC_partialacc+temp; filters->nearDC_partialacc=temp; }else{ decay=filters->nearDC_acc+=temp; filters->nearDC_partialacc+=temp; } filters->nearDC_acc-=filters->nearDC[ptr]; filters->nearDC[ptr]=temp; decay*=(1./(VE_NEARDC+1)); filters->nearptr++; if(filters->nearptr>=VE_NEARDC)filters->nearptr=0; decay=todB(&decay)*.5-15.f; } /* perform spreading and limiting, also smooth the spectrum. yes, the MDCT results in all real coefficients, but it still *behaves* like real/imaginary pairs */ for(i=0;i>1]=val; decay-=8.; } /*_analysis_output_always("spread",seq2++,vec,n/4,0,0,0);*/ /* perform preecho/postecho triggering by band */ for(j=0;j=VE_AMP)filters[j].ampptr=0; } /* look at min/max, decide trigger */ if(valmax>gi->preecho_thresh[j]+penalty){ ret|=1; ret|=4; } if(valminpostecho_thresh[j]-penalty)ret|=2; } return(ret); } #if 0 static int seq=0; static ogg_int64_t totalshift=-1024; #endif long _ve_envelope_search(vorbis_dsp_state *v){ vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; envelope_lookup *ve=((private_state *)(v->backend_state))->ve; long i,j; int first=ve->current/ve->searchstep; int last=v->pcm_current/ve->searchstep-VE_WIN; if(first<0)first=0; /* make sure we have enough storage to match the PCM */ if(last+VE_WIN+VE_POST>ve->storage){ ve->storage=last+VE_WIN+VE_POST; /* be sure */ ve->mark=_ogg_realloc(ve->mark,ve->storage*sizeof(*ve->mark)); } for(j=first;jstretch++; if(ve->stretch>VE_MAXSTRETCH*2) ve->stretch=VE_MAXSTRETCH*2; for(i=0;ich;i++){ float *pcm=v->pcm[i]+ve->searchstep*(j); ret|=_ve_amp(ve,gi,pcm,ve->band,ve->filter+i*VE_BANDS,j); } ve->mark[j+VE_POST]=0; if(ret&1){ ve->mark[j]=1; ve->mark[j+1]=1; } if(ret&2){ ve->mark[j]=1; if(j>0)ve->mark[j-1]=1; } if(ret&4)ve->stretch=-1; } ve->current=last*ve->searchstep; { long centerW=v->centerW; long testW= centerW+ ci->blocksizes[v->W]/4+ ci->blocksizes[1]/2+ ci->blocksizes[0]/4; j=ve->cursor; while(jcurrent-(ve->searchstep)){/* account for postecho working back one window */ if(j>=testW)return(1); ve->cursor=j; if(ve->mark[j/ve->searchstep]){ if(j>centerW){ #if 0 if(j>ve->curmark){ float *marker=alloca(v->pcm_current*sizeof(*marker)); int l,m; memset(marker,0,sizeof(*marker)*v->pcm_current); fprintf(stderr,"mark! seq=%d, cursor:%fs time:%fs\n", seq, (totalshift+ve->cursor)/44100., (totalshift+j)/44100.); _analysis_output_always("pcmL",seq,v->pcm[0],v->pcm_current,0,0,totalshift); _analysis_output_always("pcmR",seq,v->pcm[1],v->pcm_current,0,0,totalshift); _analysis_output_always("markL",seq,v->pcm[0],j,0,0,totalshift); _analysis_output_always("markR",seq,v->pcm[1],j,0,0,totalshift); for(m=0;msearchstep]=ve->filter[m].markers[l]*.1; _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift); } for(m=0;msearchstep]=ve->filter[m+VE_BANDS].markers[l]*.1; _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift); } for(l=0;lsearchstep]=ve->mark[l]*.4; _analysis_output_always("mark",seq,marker,v->pcm_current,0,0,totalshift); seq++; } #endif ve->curmark=j; if(j>=testW)return(1); return(0); } } j+=ve->searchstep; } } return(-1); } int _ve_envelope_mark(vorbis_dsp_state *v){ envelope_lookup *ve=((private_state *)(v->backend_state))->ve; vorbis_info *vi=v->vi; codec_setup_info *ci=vi->codec_setup; long centerW=v->centerW; long beginW=centerW-ci->blocksizes[v->W]/4; long endW=centerW+ci->blocksizes[v->W]/4; if(v->W){ beginW-=ci->blocksizes[v->lW]/4; endW+=ci->blocksizes[v->nW]/4; }else{ beginW-=ci->blocksizes[0]/4; endW+=ci->blocksizes[0]/4; } if(ve->curmark>=beginW && ve->curmarksearchstep; long last=endW/ve->searchstep; long i; for(i=first;imark[i])return(1); } return(0); } void _ve_envelope_shift(envelope_lookup *e,long shift){ int smallsize=e->current/e->searchstep+VE_POST; /* adjust for placing marks ahead of ve->current */ int smallshift=shift/e->searchstep; memmove(e->mark,e->mark+smallshift,(smallsize-smallshift)*sizeof(*e->mark)); #if 0 for(i=0;ich;i++) memmove(e->filter[i].markers, e->filter[i].markers+smallshift, (1024-smallshift)*sizeof(*(*e->filter).markers)); totalshift+=shift; #endif e->current-=shift; if(e->curmark>=0) e->curmark-=shift; e->cursor-=shift; } ================================================ FILE: 3rdParty/libvorbis/include/envelope.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: PCM data envelope analysis and manipulation last mod: $Id: envelope.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_ENVELOPE_ #define _V_ENVELOPE_ #include "mdct.h" #define VE_PRE 16 #define VE_WIN 4 #define VE_POST 2 #define VE_AMP (VE_PRE+VE_POST-1) #define VE_BANDS 7 #define VE_NEARDC 15 #define VE_MINSTRETCH 2 /* a bit less than short block */ #define VE_MAXSTRETCH 12 /* one-third full block */ typedef struct { float ampbuf[VE_AMP]; int ampptr; float nearDC[VE_NEARDC]; float nearDC_acc; float nearDC_partialacc; int nearptr; } envelope_filter_state; typedef struct { int begin; int end; float *window; float total; } envelope_band; typedef struct { int ch; int winlength; int searchstep; float minenergy; mdct_lookup mdct; float *mdct_win; envelope_band band[VE_BANDS]; envelope_filter_state *filter; int stretch; int *mark; long storage; long current; long curmark; long cursor; } envelope_lookup; extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi); extern void _ve_envelope_clear(envelope_lookup *e); extern long _ve_envelope_search(vorbis_dsp_state *v); extern void _ve_envelope_shift(envelope_lookup *e,long shift); extern int _ve_envelope_mark(vorbis_dsp_state *v); #endif ================================================ FILE: 3rdParty/libvorbis/include/floor0.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: floor backend 0 implementation last mod: $Id: floor0.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "registry.h" #include "lpc.h" #include "lsp.h" #include "codebook.h" #include "scales.h" #include "misc.h" #include "os.h" #include "misc.h" #include typedef struct { int ln; int m; int **linearmap; int n[2]; vorbis_info_floor0 *vi; long bits; long frames; } vorbis_look_floor0; /***********************************************/ static void floor0_free_info(vorbis_info_floor *i){ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; if(info){ memset(info,0,sizeof(*info)); _ogg_free(info); } } static void floor0_free_look(vorbis_look_floor *i){ vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; if(look){ if(look->linearmap){ if(look->linearmap[0])_ogg_free(look->linearmap[0]); if(look->linearmap[1])_ogg_free(look->linearmap[1]); _ogg_free(look->linearmap); } memset(look,0,sizeof(*look)); _ogg_free(look); } } static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){ codec_setup_info *ci=vi->codec_setup; int j; vorbis_info_floor0 *info=_ogg_malloc(sizeof(*info)); info->order=oggpack_read(opb,8); info->rate=oggpack_read(opb,16); info->barkmap=oggpack_read(opb,16); info->ampbits=oggpack_read(opb,6); info->ampdB=oggpack_read(opb,8); info->numbooks=oggpack_read(opb,4)+1; if(info->order<1)goto err_out; if(info->rate<1)goto err_out; if(info->barkmap<1)goto err_out; if(info->numbooks<1)goto err_out; for(j=0;jnumbooks;j++){ info->books[j]=oggpack_read(opb,8); if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out; } return(info); err_out: floor0_free_info(info); return(NULL); } /* initialize Bark scale and normalization lookups. We could do this with static tables, but Vorbis allows a number of possible combinations, so it's best to do it computationally. The below is authoritative in terms of defining scale mapping. Note that the scale depends on the sampling rate as well as the linear block and mapping sizes */ static void floor0_map_lazy_init(vorbis_block *vb, vorbis_info_floor *infoX, vorbis_look_floor0 *look){ if(!look->linearmap[vb->W]){ vorbis_dsp_state *vd=vb->vd; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; vorbis_info_floor0 *info=(vorbis_info_floor0 *)infoX; int W=vb->W; int n=ci->blocksizes[W]/2,j; /* we choose a scaling constant so that: floor(bark(rate/2-1)*C)=mapped-1 floor(bark(rate/2)*C)=mapped */ float scale=look->ln/toBARK(info->rate/2.f); /* the mapping from a linear scale to a smaller bark scale is straightforward. We do *not* make sure that the linear mapping does not skip bark-scale bins; the decoder simply skips them and the encoder may do what it wishes in filling them. They're necessary in some mapping combinations to keep the scale spacing accurate */ look->linearmap[W]=_ogg_malloc((n+1)*sizeof(**look->linearmap)); for(j=0;jrate/2.f)/n*j) *scale); /* bark numbers represent band edges */ if(val>=look->ln)val=look->ln-1; /* guard against the approximation */ look->linearmap[W][j]=val; } look->linearmap[W][j]=-1; look->n[W]=n; } } static vorbis_look_floor *floor0_look(vorbis_dsp_state *vd, vorbis_info_floor *i){ vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; vorbis_look_floor0 *look=_ogg_calloc(1,sizeof(*look)); look->m=info->order; look->ln=info->barkmap; look->vi=info; look->linearmap=_ogg_calloc(2,sizeof(*look->linearmap)); return look; } static void *floor0_inverse1(vorbis_block *vb,vorbis_look_floor *i){ vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; vorbis_info_floor0 *info=look->vi; int j,k; int ampraw=oggpack_read(&vb->opb,info->ampbits); if(ampraw>0){ /* also handles the -1 out of data case */ long maxval=(1<ampbits)-1; float amp=(float)ampraw/maxval*info->ampdB; int booknum=oggpack_read(&vb->opb,_ilog(info->numbooks)); if(booknum!=-1 && booknumnumbooks){ /* be paranoid */ codec_setup_info *ci=vb->vd->vi->codec_setup; codebook *b=ci->fullbooks+info->books[booknum]; float last=0.f; /* the additional b->dim is a guard against any possible stack smash; b->dim is provably more than we can overflow the vector */ float *lsp=_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+b->dim+1)); for(j=0;jm;j+=b->dim) if(vorbis_book_decodev_set(b,lsp+j,&vb->opb,b->dim)==-1)goto eop; for(j=0;jm;){ for(k=0;kdim;k++,j++)lsp[j]+=last; last=lsp[j-1]; } lsp[look->m]=amp; return(lsp); } } eop: return(NULL); } static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i, void *memo,float *out){ vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; vorbis_info_floor0 *info=look->vi; floor0_map_lazy_init(vb,info,look); if(memo){ float *lsp=(float *)memo; float amp=lsp[look->m]; /* take the coefficients back to a spectral envelope curve */ vorbis_lsp_to_curve(out, look->linearmap[vb->W], look->n[vb->W], look->ln, lsp,look->m,amp,(float)info->ampdB); return(1); } memset(out,0,sizeof(*out)*look->n[vb->W]); return(0); } /* export hooks */ vorbis_func_floor floor0_exportbundle={ NULL,&floor0_unpack,&floor0_look,&floor0_free_info, &floor0_free_look,&floor0_inverse1,&floor0_inverse2 }; ================================================ FILE: 3rdParty/libvorbis/include/floor1.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: floor backend 1 implementation last mod: $Id: floor1.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "registry.h" #include "codebook.h" #include "misc.h" #include "scales.h" #include #define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */ typedef struct { int sorted_index[VIF_POSIT+2]; int forward_index[VIF_POSIT+2]; int reverse_index[VIF_POSIT+2]; int hineighbor[VIF_POSIT]; int loneighbor[VIF_POSIT]; int posts; int n; int quant_q; vorbis_info_floor1 *vi; long phrasebits; long postbits; long frames; } vorbis_look_floor1; typedef struct lsfit_acc{ long x0; long x1; long xa; long ya; long x2a; long y2a; long xya; long an; } lsfit_acc; /***********************************************/ static void floor1_free_info(vorbis_info_floor *i){ vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; if(info){ memset(info,0,sizeof(*info)); _ogg_free(info); } } static void floor1_free_look(vorbis_look_floor *i){ vorbis_look_floor1 *look=(vorbis_look_floor1 *)i; if(look){ /*fprintf(stderr,"floor 1 bit usage %f:%f (%f total)\n", (float)look->phrasebits/look->frames, (float)look->postbits/look->frames, (float)(look->postbits+look->phrasebits)/look->frames);*/ memset(look,0,sizeof(*look)); _ogg_free(look); } } static int ilog(unsigned int v){ int ret=0; while(v){ ret++; v>>=1; } return(ret); } static int ilog2(unsigned int v){ int ret=0; if(v)--v; while(v){ ret++; v>>=1; } return(ret); } static void floor1_pack (vorbis_info_floor *i,oggpack_buffer *opb){ vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; int j,k; int count=0; int rangebits; int maxposit=info->postlist[1]; int maxclass=-1; /* save out partitions */ oggpack_write(opb,info->partitions,5); /* only 0 to 31 legal */ for(j=0;jpartitions;j++){ oggpack_write(opb,info->partitionclass[j],4); /* only 0 to 15 legal */ if(maxclasspartitionclass[j])maxclass=info->partitionclass[j]; } /* save out partition classes */ for(j=0;jclass_dim[j]-1,3); /* 1 to 8 */ oggpack_write(opb,info->class_subs[j],2); /* 0 to 3 */ if(info->class_subs[j])oggpack_write(opb,info->class_book[j],8); for(k=0;k<(1<class_subs[j]);k++) oggpack_write(opb,info->class_subbook[j][k]+1,8); } /* save out the post list */ oggpack_write(opb,info->mult-1,2); /* only 1,2,3,4 legal now */ oggpack_write(opb,ilog2(maxposit),4); rangebits=ilog2(maxposit); for(j=0,k=0;jpartitions;j++){ count+=info->class_dim[info->partitionclass[j]]; for(;kpostlist[k+2],rangebits); } } static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){ codec_setup_info *ci=vi->codec_setup; int j,k,count=0,maxclass=-1,rangebits; vorbis_info_floor1 *info=_ogg_calloc(1,sizeof(*info)); /* read partitions */ info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */ for(j=0;jpartitions;j++){ info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */ if(maxclasspartitionclass[j])maxclass=info->partitionclass[j]; } /* read partition classes */ for(j=0;jclass_dim[j]=oggpack_read(opb,3)+1; /* 1 to 8 */ info->class_subs[j]=oggpack_read(opb,2); /* 0,1,2,3 bits */ if(info->class_subs[j]<0) goto err_out; if(info->class_subs[j])info->class_book[j]=oggpack_read(opb,8); if(info->class_book[j]<0 || info->class_book[j]>=ci->books) goto err_out; for(k=0;k<(1<class_subs[j]);k++){ info->class_subbook[j][k]=oggpack_read(opb,8)-1; if(info->class_subbook[j][k]<-1 || info->class_subbook[j][k]>=ci->books) goto err_out; } } /* read the post list */ info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */ rangebits=oggpack_read(opb,4); for(j=0,k=0;jpartitions;j++){ count+=info->class_dim[info->partitionclass[j]]; for(;kpostlist[k+2]=oggpack_read(opb,rangebits); if(t<0 || t>=(1<postlist[0]=0; info->postlist[1]=1<vi=info; look->n=info->postlist[1]; /* we drop each position value in-between already decoded values, and use linear interpolation to predict each new value past the edges. The positions are read in the order of the position list... we precompute the bounding positions in the lookup. Of course, the neighbors can change (if a position is declined), but this is an initial mapping */ for(i=0;ipartitions;i++)n+=info->class_dim[info->partitionclass[i]]; n+=2; look->posts=n; /* also store a sorted position index */ for(i=0;ipostlist+i; qsort(sortpointer,n,sizeof(*sortpointer),icomp); /* points from sort order back to range number */ for(i=0;iforward_index[i]=sortpointer[i]-info->postlist; /* points from range order to sorted position */ for(i=0;ireverse_index[look->forward_index[i]]=i; /* we actually need the post values too */ for(i=0;isorted_index[i]=info->postlist[look->forward_index[i]]; /* quantize values to multiplier spec */ switch(info->mult){ case 1: /* 1024 -> 256 */ look->quant_q=256; break; case 2: /* 1024 -> 128 */ look->quant_q=128; break; case 3: /* 1024 -> 86 */ look->quant_q=86; break; case 4: /* 1024 -> 64 */ look->quant_q=64; break; } /* discover our neighbors for decode where we don't use fit flags (that would push the neighbors outward) */ for(i=0;in; int currentx=info->postlist[i+2]; for(j=0;jpostlist[j]; if(x>lx && xcurrentx){ hi=j; hx=x; } } look->loneighbor[i]=lo; look->hineighbor[i]=hi; } return(look); } static int render_point(int x0,int x1,int y0,int y1,int x){ y0&=0x7fff; /* mask off flag */ y1&=0x7fff; { int dy=y1-y0; int adx=x1-x0; int ady=abs(dy); int err=ady*(x-x0); int off=err/adx; if(dy<0)return(y0-off); return(y0+off); } } static int vorbis_dBquant(const float *x){ int i= *x*7.3142857f+1023.5f; if(i>1023)return(1023); if(i<0)return(0); return i; } static float FLOOR1_fromdB_LOOKUP[256]={ 1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, 1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, 1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, 2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, 2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, 3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, 4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, 6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, 7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, 1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, 1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, 1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, 2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, 2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, 3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, 4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, 5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, 7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, 9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, 1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, 1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, 2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, 2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, 3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, 4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, 5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, 7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, 9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, 0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, 0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, 0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, 0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, 0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, 0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, 0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, 0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, 0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, 0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, 0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, 0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, 0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, 0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, 0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, 0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, 0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, 0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, 0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, 0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, 0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, 0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, 0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, 0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, 0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, 0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, 0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, 0.82788260F, 0.88168307F, 0.9389798F, 1.F, }; static void render_line(int n, int x0,int x1,int y0,int y1,float *d){ int dy=y1-y0; int adx=x1-x0; int ady=abs(dy); int base=dy/adx; int sy=(dy<0?base-1:base+1); int x=x0; int y=y0; int err=0; ady-=abs(base*adx); if(n>x1)n=x1; if(x=adx){ err-=adx; y+=sy; }else{ y+=base; } d[x]*=FLOOR1_fromdB_LOOKUP[y]; } } static void render_line0(int x0,int x1,int y0,int y1,int *d){ int dy=y1-y0; int adx=x1-x0; int ady=abs(dy); int base=dy/adx; int sy=(dy<0?base-1:base+1); int x=x0; int y=y0; int err=0; ady-=abs(base*adx); d[x]=y; while(++x=adx){ err-=adx; y+=sy; }else{ y+=base; } d[x]=y; } } /* the floor has already been filtered to only include relevant sections */ static int accumulate_fit(const float *flr,const float *mdct, int x0, int x1,lsfit_acc *a, int n,vorbis_info_floor1 *info){ long i; int quantized=vorbis_dBquant(flr+x0); long xa=0,ya=0,x2a=0,y2a=0,xya=0,na=0, xb=0,yb=0,x2b=0,y2b=0,xyb=0,nb=0; memset(a,0,sizeof(*a)); a->x0=x0; a->x1=x1; if(x1>=n)x1=n-1; for(i=x0;i<=x1;i++){ int quantized=vorbis_dBquant(flr+i); if(quantized){ if(mdct[i]+info->twofitatten>=flr[i]){ xa += i; ya += quantized; x2a += i*i; y2a += quantized*quantized; xya += i*quantized; na++; }else{ xb += i; yb += quantized; x2b += i*i; y2b += quantized*quantized; xyb += i*quantized; nb++; } } } xb+=xa; yb+=ya; x2b+=x2a; y2b+=y2a; xyb+=xya; nb+=na; /* weight toward the actually used frequencies if we meet the threshhold */ { int weight=nb*info->twofitweight/(na+1); a->xa=xa*weight+xb; a->ya=ya*weight+yb; a->x2a=x2a*weight+x2b; a->y2a=y2a*weight+y2b; a->xya=xya*weight+xyb; a->an=na*weight+nb; } return(na); } static void fit_line(lsfit_acc *a,int fits,int *y0,int *y1){ long x=0,y=0,x2=0,y2=0,xy=0,an=0,i; long x0=a[0].x0; long x1=a[fits-1].x1; for(i=0;i=0){ x+= x0; y+= *y0; x2+= x0 * x0; y2+= *y0 * *y0; xy+= *y0 * x0; an++; } if(*y1>=0){ x+= x1; y+= *y1; x2+= x1 * x1; y2+= *y1 * *y1; xy+= *y1 * x1; an++; } if(an){ /* need 64 bit multiplies, which C doesn't give portably as int */ double fx=x; double fy=y; double fx2=x2; double fxy=xy; double denom=1./(an*fx2-fx*fx); double a=(fy*fx2-fxy*fx)*denom; double b=(an*fxy-fx*fy)*denom; *y0=rint(a+b*x0); *y1=rint(a+b*x1); /* limit to our range! */ if(*y0>1023)*y0=1023; if(*y1>1023)*y1=1023; if(*y0<0)*y0=0; if(*y1<0)*y1=0; }else{ *y0=0; *y1=0; } } /*static void fit_line_point(lsfit_acc *a,int fits,int *y0,int *y1){ long y=0; int i; for(i=0;itwofitatten>=mask[x]){ if(y+info->maxovermaxunder>val)return(1); } while(++x=adx){ err-=adx; y+=sy; }else{ y+=base; } val=vorbis_dBquant(mask+x); mse+=((y-val)*(y-val)); n++; if(mdct[x]+info->twofitatten>=mask[x]){ if(val){ if(y+info->maxovermaxunder>val)return(1); } } } if(info->maxover*info->maxover/n>info->maxerr)return(0); if(info->maxunder*info->maxunder/n>info->maxerr)return(0); if(mse/n>info->maxerr)return(1); return(0); } static int post_Y(int *A,int *B,int pos){ if(A[pos]<0) return B[pos]; if(B[pos]<0) return A[pos]; return (A[pos]+B[pos])>>1; } static int seq=0; int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look, const float *logmdct, /* in */ const float *logmask){ long i,j; vorbis_info_floor1 *info=look->vi; long n=look->n; long posts=look->posts; long nonzero=0; lsfit_acc fits[VIF_POSIT+1]; int fit_valueA[VIF_POSIT+2]; /* index by range list position */ int fit_valueB[VIF_POSIT+2]; /* index by range list position */ int loneighbor[VIF_POSIT+2]; /* sorted index of range list position (+2) */ int hineighbor[VIF_POSIT+2]; int *output=NULL; int memo[VIF_POSIT+2]; for(i=0;isorted_index[i], look->sorted_index[i+1],fits+i, n,info); } if(nonzero){ /* start by fitting the implicit base case.... */ int y0=-200; int y1=-200; fit_line(fits,posts-1,&y0,&y1); fit_valueA[0]=y0; fit_valueB[0]=y0; fit_valueB[1]=y1; fit_valueA[1]=y1; /* Non degenerate case */ /* start progressive splitting. This is a greedy, non-optimal algorithm, but simple and close enough to the best answer. */ for(i=2;ireverse_index[i]; int ln=loneighbor[sortpos]; int hn=hineighbor[sortpos]; /* eliminate repeat searches of a particular range with a memo */ if(memo[ln]!=hn){ /* haven't performed this error search yet */ int lsortpos=look->reverse_index[ln]; int hsortpos=look->reverse_index[hn]; memo[ln]=hn; { /* A note: we want to bound/minimize *local*, not global, error */ int lx=info->postlist[ln]; int hx=info->postlist[hn]; int ly=post_Y(fit_valueA,fit_valueB,ln); int hy=post_Y(fit_valueA,fit_valueB,hn); if(ly==-1 || hy==-1){ exit(1); } if(inspect_error(lx,hx,ly,hy,logmask,logmdct,info)){ /* outside error bounds/begin search area. Split it. */ int ly0=-200; int ly1=-200; int hy0=-200; int hy1=-200; fit_line(fits+lsortpos,sortpos-lsortpos,&ly0,&ly1); fit_line(fits+sortpos,hsortpos-sortpos,&hy0,&hy1); /* store new edge values */ fit_valueB[ln]=ly0; if(ln==0)fit_valueA[ln]=ly0; fit_valueA[i]=ly1; fit_valueB[i]=hy0; fit_valueA[hn]=hy1; if(hn==1)fit_valueB[hn]=hy1; if(ly1>=0 || hy0>=0){ /* store new neighbor values */ for(j=sortpos-1;j>=0;j--) if(hineighbor[j]==hn) hineighbor[j]=i; else break; for(j=sortpos+1;jloneighbor[i-2]; int hn=look->hineighbor[i-2]; int x0=info->postlist[ln]; int x1=info->postlist[hn]; int y0=output[ln]; int y1=output[hn]; int predicted=render_point(x0,x1,y0,y1,info->postlist[i]); int vx=post_Y(fit_valueA,fit_valueB,i); if(vx>=0 && predicted!=vx){ output[i]=vx; }else{ output[i]= predicted|0x8000; } } } return(output); } int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor1 *look, int *A,int *B, int del){ long i; long posts=look->posts; int *output=NULL; if(A && B){ output=_vorbis_block_alloc(vb,sizeof(*output)*posts); for(i=0;i>16; if(A[i]&0x8000 && B[i]&0x8000)output[i]|=0x8000; } } return(output); } int floor1_encode(oggpack_buffer *opb,vorbis_block *vb, vorbis_look_floor1 *look, int *post,int *ilogmask){ long i,j; vorbis_info_floor1 *info=look->vi; long n=look->n; long posts=look->posts; codec_setup_info *ci=vb->vd->vi->codec_setup; int out[VIF_POSIT+2]; static_codebook **sbooks=ci->book_param; codebook *books=ci->fullbooks; static long seq=0; /* quantize values to multiplier spec */ if(post){ for(i=0;imult){ case 1: /* 1024 -> 256 */ val>>=2; break; case 2: /* 1024 -> 128 */ val>>=3; break; case 3: /* 1024 -> 86 */ val/=12; break; case 4: /* 1024 -> 64 */ val>>=4; break; } post[i]=val | (post[i]&0x8000); } out[0]=post[0]; out[1]=post[1]; /* find prediction values for each post and subtract them */ for(i=2;iloneighbor[i-2]; int hn=look->hineighbor[i-2]; int x0=info->postlist[ln]; int x1=info->postlist[hn]; int y0=post[ln]; int y1=post[hn]; int predicted=render_point(x0,x1,y0,y1,info->postlist[i]); if((post[i]&0x8000) || (predicted==post[i])){ post[i]=predicted|0x8000; /* in case there was roundoff jitter in interpolation */ out[i]=0; }else{ int headroom=(look->quant_q-predictedquant_q-predicted:predicted); int val=post[i]-predicted; /* at this point the 'deviation' value is in the range +/- max range, but the real, unique range can always be mapped to only [0-maxrange). So we want to wrap the deviation into this limited range, but do it in the way that least screws an essentially gaussian probability distribution. */ if(val<0) if(val<-headroom) val=headroom-val-1; else val=-1-(val<<1); else if(val>=headroom) val= val+headroom; else val<<=1; out[i]=val; post[ln]&=0x7fff; post[hn]&=0x7fff; } } /* we have everything we need. pack it out */ /* mark nontrivial floor */ oggpack_write(opb,1,1); /* beginning/end post */ look->frames++; look->postbits+=ilog(look->quant_q-1)*2; oggpack_write(opb,out[0],ilog(look->quant_q-1)); oggpack_write(opb,out[1],ilog(look->quant_q-1)); /* partition by partition */ for(i=0,j=2;ipartitions;i++){ int class=info->partitionclass[i]; int cdim=info->class_dim[class]; int csubbits=info->class_subs[class]; int csub=1<class_subbook[class][k]; if(booknum<0){ maxval[k]=1; }else{ maxval[k]=sbooks[info->class_subbook[class][k]]->entries; } } for(k=0;kphrasebits+= vorbis_book_encode(books+info->class_book[class],cval,opb); #ifdef TRAIN_FLOOR1 { FILE *of; char buffer[80]; sprintf(buffer,"line_%dx%ld_class%d.vqd", vb->pcmend/2,posts-2,class); of=fopen(buffer,"a"); fprintf(of,"%d\n",cval); fclose(of); } #endif } /* write post values */ for(k=0;kclass_subbook[class][bookas[k]]; if(book>=0){ /* hack to allow training with 'bad' books */ if(out[j+k]<(books+book)->entries) look->postbits+=vorbis_book_encode(books+book, out[j+k],opb); /*else fprintf(stderr,"+!");*/ #ifdef TRAIN_FLOOR1 { FILE *of; char buffer[80]; sprintf(buffer,"line_%dx%ld_%dsub%d.vqd", vb->pcmend/2,posts-2,class,bookas[k]); of=fopen(buffer,"a"); fprintf(of,"%d\n",out[j+k]); fclose(of); } #endif } } j+=cdim; } { /* generate quantized floor equivalent to what we'd unpack in decode */ /* render the lines */ int hx=0; int lx=0; int ly=post[0]*info->mult; for(j=1;jposts;j++){ int current=look->forward_index[j]; int hy=post[current]&0x7fff; if(hy==post[current]){ hy*=info->mult; hx=info->postlist[current]; render_line0(lx,hx,ly,hy,ilogmask); lx=hx; ly=hy; } } for(j=hx;jpcmend/2;j++)ilogmask[j]=ly; /* be certain */ seq++; return(1); } }else{ oggpack_write(opb,0,1); memset(ilogmask,0,vb->pcmend/2*sizeof(*ilogmask)); seq++; return(0); } } static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; vorbis_info_floor1 *info=look->vi; codec_setup_info *ci=vb->vd->vi->codec_setup; int i,j,k; codebook *books=ci->fullbooks; /* unpack wrapped/predicted values from stream */ if(oggpack_read(&vb->opb,1)==1){ int *fit_value=_vorbis_block_alloc(vb,(look->posts)*sizeof(*fit_value)); fit_value[0]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); fit_value[1]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); /* partition by partition */ for(i=0,j=2;ipartitions;i++){ int class=info->partitionclass[i]; int cdim=info->class_dim[class]; int csubbits=info->class_subs[class]; int csub=1<class_book[class],&vb->opb); if(cval==-1)goto eop; } for(k=0;kclass_subbook[class][cval&(csub-1)]; cval>>=csubbits; if(book>=0){ if((fit_value[j+k]=vorbis_book_decode(books+book,&vb->opb))==-1) goto eop; }else{ fit_value[j+k]=0; } } j+=cdim; } /* unwrap positive values and reconsitute via linear interpolation */ for(i=2;iposts;i++){ int predicted=render_point(info->postlist[look->loneighbor[i-2]], info->postlist[look->hineighbor[i-2]], fit_value[look->loneighbor[i-2]], fit_value[look->hineighbor[i-2]], info->postlist[i]); int hiroom=look->quant_q-predicted; int loroom=predicted; int room=(hiroom=room){ if(hiroom>loroom){ val = val-loroom; }else{ val = -1-(val-hiroom); } }else{ if(val&1){ val= -((val+1)>>1); }else{ val>>=1; } } fit_value[i]=val+predicted; fit_value[look->loneighbor[i-2]]&=0x7fff; fit_value[look->hineighbor[i-2]]&=0x7fff; }else{ fit_value[i]=predicted|0x8000; } } return(fit_value); } eop: return(NULL); } static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, float *out){ vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; vorbis_info_floor1 *info=look->vi; codec_setup_info *ci=vb->vd->vi->codec_setup; int n=ci->blocksizes[vb->W]/2; int j; if(memo){ /* render the lines */ int *fit_value=(int *)memo; int hx=0; int lx=0; int ly=fit_value[0]*info->mult; for(j=1;jposts;j++){ int current=look->forward_index[j]; int hy=fit_value[current]&0x7fff; if(hy==fit_value[current]){ hy*=info->mult; hx=info->postlist[current]; render_line(n,lx,hx,ly,hy,out); lx=hx; ly=hy; } } for(j=hx;j header packets last mod: $Id: info.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ /* general handling of the header and the vorbis_info structure (and substructures) */ #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "codebook.h" #include "registry.h" #include "window.h" #include "psy.h" #include "misc.h" #include "os.h" /* helpers */ static int ilog2(unsigned int v){ int ret=0; if(v)--v; while(v){ ret++; v>>=1; } return(ret); } static void _v_writestring(oggpack_buffer *o,char *s, int bytes){ while(bytes--){ oggpack_write(o,*s++,8); } } static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){ while(bytes--){ *buf++=oggpack_read(o,8); } } void vorbis_comment_init(vorbis_comment *vc){ memset(vc,0,sizeof(*vc)); } void vorbis_comment_add(vorbis_comment *vc,char *comment){ vc->user_comments=_ogg_realloc(vc->user_comments, (vc->comments+2)*sizeof(*vc->user_comments)); vc->comment_lengths=_ogg_realloc(vc->comment_lengths, (vc->comments+2)*sizeof(*vc->comment_lengths)); vc->comment_lengths[vc->comments]=strlen(comment); vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1); strcpy(vc->user_comments[vc->comments], comment); vc->comments++; vc->user_comments[vc->comments]=NULL; } void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents){ char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */ strcpy(comment, tag); strcat(comment, "="); strcat(comment, contents); vorbis_comment_add(vc, comment); } /* This is more or less the same as strncasecmp - but that doesn't exist * everywhere, and this is a fairly trivial function, so we include it */ static int tagcompare(const char *s1, const char *s2, int n){ int c=0; while(c < n){ if(toupper(s1[c]) != toupper(s2[c])) return !0; c++; } return 0; } char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){ long i; int found = 0; int taglen = strlen(tag)+1; /* +1 for the = we append */ char *fulltag = alloca(taglen+ 1); strcpy(fulltag, tag); strcat(fulltag, "="); for(i=0;icomments;i++){ if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ if(count == found) /* We return a pointer to the data, not a copy */ return vc->user_comments[i] + taglen; else found++; } } return NULL; /* didn't find anything */ } int vorbis_comment_query_count(vorbis_comment *vc, char *tag){ int i,count=0; int taglen = strlen(tag)+1; /* +1 for the = we append */ char *fulltag = alloca(taglen+1); strcpy(fulltag,tag); strcat(fulltag, "="); for(i=0;icomments;i++){ if(!tagcompare(vc->user_comments[i], fulltag, taglen)) count++; } return count; } void vorbis_comment_clear(vorbis_comment *vc){ if(vc){ long i; for(i=0;icomments;i++) if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); if(vc->user_comments)_ogg_free(vc->user_comments); if(vc->comment_lengths)_ogg_free(vc->comment_lengths); if(vc->vendor)_ogg_free(vc->vendor); memset(vc,0,sizeof(*vc)); } } /* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long. They may be equal, but short will never ge greater than long */ int vorbis_info_blocksize(vorbis_info *vi,int zo){ codec_setup_info *ci = vi->codec_setup; return ci ? ci->blocksizes[zo] : -1; } /* used by synthesis, which has a full, alloced vi */ void vorbis_info_init(vorbis_info *vi){ memset(vi,0,sizeof(*vi)); vi->codec_setup=_ogg_calloc(1,sizeof(codec_setup_info)); } void vorbis_info_clear(vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; int i; if(ci){ for(i=0;imodes;i++) if(ci->mode_param[i])_ogg_free(ci->mode_param[i]); for(i=0;imaps;i++) /* unpack does the range checking */ if(ci->map_param[i]) /* this may be cleaning up an aborted unpack, in which case the below type cannot be trusted */ _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]); for(i=0;ifloors;i++) /* unpack does the range checking */ if(ci->floor_param[i]) /* this may be cleaning up an aborted unpack, in which case the below type cannot be trusted */ _floor_P[ci->floor_type[i]]->free_info(ci->floor_param[i]); for(i=0;iresidues;i++) /* unpack does the range checking */ if(ci->residue_param[i]) /* this may be cleaning up an aborted unpack, in which case the below type cannot be trusted */ _residue_P[ci->residue_type[i]]->free_info(ci->residue_param[i]); for(i=0;ibooks;i++){ if(ci->book_param[i]){ /* knows if the book was not alloced */ vorbis_staticbook_destroy(ci->book_param[i]); } if(ci->fullbooks) vorbis_book_clear(ci->fullbooks+i); } if(ci->fullbooks) _ogg_free(ci->fullbooks); for(i=0;ipsys;i++) _vi_psy_free(ci->psy_param[i]); _ogg_free(ci); } memset(vi,0,sizeof(*vi)); } /* Header packing/unpacking ********************************************/ static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ codec_setup_info *ci=vi->codec_setup; if(!ci)return(OV_EFAULT); vi->version=oggpack_read(opb,32); if(vi->version!=0)return(OV_EVERSION); vi->channels=oggpack_read(opb,8); vi->rate=oggpack_read(opb,32); vi->bitrate_upper=oggpack_read(opb,32); vi->bitrate_nominal=oggpack_read(opb,32); vi->bitrate_lower=oggpack_read(opb,32); ci->blocksizes[0]=1<blocksizes[1]=1<rate<1)goto err_out; if(vi->channels<1)goto err_out; if(ci->blocksizes[0]<64)goto err_out; if(ci->blocksizes[1]blocksizes[0])goto err_out; if(ci->blocksizes[1]>8192)goto err_out; if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ return(0); err_out: vorbis_info_clear(vi); return(OV_EBADHEADER); } static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ int i; int vendorlen=oggpack_read(opb,32); if(vendorlen<0)goto err_out; vc->vendor=_ogg_calloc(vendorlen+1,1); _v_readstring(opb,vc->vendor,vendorlen); vc->comments=oggpack_read(opb,32); if(vc->comments<0)goto err_out; vc->user_comments=_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); vc->comment_lengths=_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); for(i=0;icomments;i++){ int len=oggpack_read(opb,32); if(len<0)goto err_out; vc->comment_lengths[i]=len; vc->user_comments[i]=_ogg_calloc(len+1,1); _v_readstring(opb,vc->user_comments[i],len); } if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ return(0); err_out: vorbis_comment_clear(vc); return(OV_EBADHEADER); } /* all of the real encoding details are here. The modes, books, everything */ static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ codec_setup_info *ci=vi->codec_setup; int i; if(!ci)return(OV_EFAULT); /* codebooks */ ci->books=oggpack_read(opb,8)+1; /*ci->book_param=_ogg_calloc(ci->books,sizeof(*ci->book_param));*/ for(i=0;ibooks;i++){ ci->book_param[i]=_ogg_calloc(1,sizeof(*ci->book_param[i])); if(vorbis_staticbook_unpack(opb,ci->book_param[i]))goto err_out; } /* time backend settings; hooks are unused */ { int times=oggpack_read(opb,6)+1; for(i=0;i=VI_TIMEB)goto err_out; } } /* floor backend settings */ ci->floors=oggpack_read(opb,6)+1; /*ci->floor_type=_ogg_malloc(ci->floors*sizeof(*ci->floor_type));*/ /*ci->floor_param=_ogg_calloc(ci->floors,sizeof(void *));*/ for(i=0;ifloors;i++){ ci->floor_type[i]=oggpack_read(opb,16); if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out; ci->floor_param[i]=_floor_P[ci->floor_type[i]]->unpack(vi,opb); if(!ci->floor_param[i])goto err_out; } /* residue backend settings */ ci->residues=oggpack_read(opb,6)+1; /*ci->residue_type=_ogg_malloc(ci->residues*sizeof(*ci->residue_type));*/ /*ci->residue_param=_ogg_calloc(ci->residues,sizeof(void *));*/ for(i=0;iresidues;i++){ ci->residue_type[i]=oggpack_read(opb,16); if(ci->residue_type[i]<0 || ci->residue_type[i]>=VI_RESB)goto err_out; ci->residue_param[i]=_residue_P[ci->residue_type[i]]->unpack(vi,opb); if(!ci->residue_param[i])goto err_out; } /* map backend settings */ ci->maps=oggpack_read(opb,6)+1; /*ci->map_type=_ogg_malloc(ci->maps*sizeof(*ci->map_type));*/ /*ci->map_param=_ogg_calloc(ci->maps,sizeof(void *));*/ for(i=0;imaps;i++){ ci->map_type[i]=oggpack_read(opb,16); if(ci->map_type[i]<0 || ci->map_type[i]>=VI_MAPB)goto err_out; ci->map_param[i]=_mapping_P[ci->map_type[i]]->unpack(vi,opb); if(!ci->map_param[i])goto err_out; } /* mode settings */ ci->modes=oggpack_read(opb,6)+1; /*vi->mode_param=_ogg_calloc(vi->modes,sizeof(void *));*/ for(i=0;imodes;i++){ ci->mode_param[i]=_ogg_calloc(1,sizeof(*ci->mode_param[i])); ci->mode_param[i]->blockflag=oggpack_read(opb,1); ci->mode_param[i]->windowtype=oggpack_read(opb,16); ci->mode_param[i]->transformtype=oggpack_read(opb,16); ci->mode_param[i]->mapping=oggpack_read(opb,8); if(ci->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out; if(ci->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out; if(ci->mode_param[i]->mapping>=ci->maps)goto err_out; } if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */ return(0); err_out: vorbis_info_clear(vi); return(OV_EBADHEADER); } /* Is this packet a vorbis ID header? */ int vorbis_synthesis_idheader(ogg_packet *op){ oggpack_buffer opb; char buffer[6]; if(op){ oggpack_readinit(&opb,op->packet,op->bytes); if(!op->b_o_s) return(0); /* Not the initial packet */ if(oggpack_read(&opb,8) != 1) return 0; /* not an ID header */ memset(buffer,0,6); _v_readstring(&opb,buffer,6); if(memcmp(buffer,"vorbis",6)) return 0; /* not vorbis */ return 1; } return 0; } /* The Vorbis header is in three packets; the initial small packet in the first page that identifies basic parameters, a second packet with bitstream comments and a third packet that holds the codebook. */ int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ oggpack_buffer opb; if(op){ oggpack_readinit(&opb,op->packet,op->bytes); /* Which of the three types of header is this? */ /* Also verify header-ness, vorbis */ { char buffer[6]; int packtype=oggpack_read(&opb,8); memset(buffer,0,6); _v_readstring(&opb,buffer,6); if(memcmp(buffer,"vorbis",6)){ /* not a vorbis header */ return(OV_ENOTVORBIS); } switch(packtype){ case 0x01: /* least significant *bit* is read first */ if(!op->b_o_s){ /* Not the initial packet */ return(OV_EBADHEADER); } if(vi->rate!=0){ /* previously initialized info header */ return(OV_EBADHEADER); } return(_vorbis_unpack_info(vi,&opb)); case 0x03: /* least significant *bit* is read first */ if(vi->rate==0){ /* um... we didn't get the initial header */ return(OV_EBADHEADER); } return(_vorbis_unpack_comment(vc,&opb)); case 0x05: /* least significant *bit* is read first */ if(vi->rate==0 || vc->vendor==NULL){ /* um... we didn;t get the initial header or comments yet */ return(OV_EBADHEADER); } return(_vorbis_unpack_books(vi,&opb)); default: /* Not a valid vorbis header type */ return(OV_EBADHEADER); break; } } } return(OV_EBADHEADER); } /* pack side **********************************************************/ static int _vorbis_pack_info(oggpack_buffer *opb,vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; if(!ci)return(OV_EFAULT); /* preamble */ oggpack_write(opb,0x01,8); _v_writestring(opb,"vorbis", 6); /* basic information about the stream */ oggpack_write(opb,0x00,32); oggpack_write(opb,vi->channels,8); oggpack_write(opb,vi->rate,32); oggpack_write(opb,vi->bitrate_upper,32); oggpack_write(opb,vi->bitrate_nominal,32); oggpack_write(opb,vi->bitrate_lower,32); oggpack_write(opb,ilog2(ci->blocksizes[0]),4); oggpack_write(opb,ilog2(ci->blocksizes[1]),4); oggpack_write(opb,1,1); return(0); } static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ char temp[]="Xiph.Org libVorbis I 20070622"; int bytes = strlen(temp); /* preamble */ oggpack_write(opb,0x03,8); _v_writestring(opb,"vorbis", 6); /* vendor */ oggpack_write(opb,bytes,32); _v_writestring(opb,temp, bytes); /* comments */ oggpack_write(opb,vc->comments,32); if(vc->comments){ int i; for(i=0;icomments;i++){ if(vc->user_comments[i]){ oggpack_write(opb,vc->comment_lengths[i],32); _v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]); }else{ oggpack_write(opb,0,32); } } } oggpack_write(opb,1,1); return(0); } static int _vorbis_pack_books(oggpack_buffer *opb,vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; int i; if(!ci)return(OV_EFAULT); oggpack_write(opb,0x05,8); _v_writestring(opb,"vorbis", 6); /* books */ oggpack_write(opb,ci->books-1,8); for(i=0;ibooks;i++) if(vorbis_staticbook_pack(ci->book_param[i],opb))goto err_out; /* times; hook placeholders */ oggpack_write(opb,0,6); oggpack_write(opb,0,16); /* floors */ oggpack_write(opb,ci->floors-1,6); for(i=0;ifloors;i++){ oggpack_write(opb,ci->floor_type[i],16); if(_floor_P[ci->floor_type[i]]->pack) _floor_P[ci->floor_type[i]]->pack(ci->floor_param[i],opb); else goto err_out; } /* residues */ oggpack_write(opb,ci->residues-1,6); for(i=0;iresidues;i++){ oggpack_write(opb,ci->residue_type[i],16); _residue_P[ci->residue_type[i]]->pack(ci->residue_param[i],opb); } /* maps */ oggpack_write(opb,ci->maps-1,6); for(i=0;imaps;i++){ oggpack_write(opb,ci->map_type[i],16); _mapping_P[ci->map_type[i]]->pack(vi,ci->map_param[i],opb); } /* modes */ oggpack_write(opb,ci->modes-1,6); for(i=0;imodes;i++){ oggpack_write(opb,ci->mode_param[i]->blockflag,1); oggpack_write(opb,ci->mode_param[i]->windowtype,16); oggpack_write(opb,ci->mode_param[i]->transformtype,16); oggpack_write(opb,ci->mode_param[i]->mapping,8); } oggpack_write(opb,1,1); return(0); err_out: return(-1); } int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op){ oggpack_buffer opb; oggpack_writeinit(&opb); if(_vorbis_pack_comment(&opb,vc)) return OV_EIMPL; op->packet = _ogg_malloc(oggpack_bytes(&opb)); memcpy(op->packet, opb.buffer, oggpack_bytes(&opb)); op->bytes=oggpack_bytes(&opb); op->b_o_s=0; op->e_o_s=0; op->granulepos=0; op->packetno=1; return 0; } int vorbis_analysis_headerout(vorbis_dsp_state *v, vorbis_comment *vc, ogg_packet *op, ogg_packet *op_comm, ogg_packet *op_code){ int ret=OV_EIMPL; vorbis_info *vi=v->vi; oggpack_buffer opb; private_state *b=v->backend_state; if(!b){ ret=OV_EFAULT; goto err_out; } /* first header packet **********************************************/ oggpack_writeinit(&opb); if(_vorbis_pack_info(&opb,vi))goto err_out; /* build the packet */ if(b->header)_ogg_free(b->header); b->header=_ogg_malloc(oggpack_bytes(&opb)); memcpy(b->header,opb.buffer,oggpack_bytes(&opb)); op->packet=b->header; op->bytes=oggpack_bytes(&opb); op->b_o_s=1; op->e_o_s=0; op->granulepos=0; op->packetno=0; /* second header packet (comments) **********************************/ oggpack_reset(&opb); if(_vorbis_pack_comment(&opb,vc))goto err_out; if(b->header1)_ogg_free(b->header1); b->header1=_ogg_malloc(oggpack_bytes(&opb)); memcpy(b->header1,opb.buffer,oggpack_bytes(&opb)); op_comm->packet=b->header1; op_comm->bytes=oggpack_bytes(&opb); op_comm->b_o_s=0; op_comm->e_o_s=0; op_comm->granulepos=0; op_comm->packetno=1; /* third header packet (modes/codebooks) ****************************/ oggpack_reset(&opb); if(_vorbis_pack_books(&opb,vi))goto err_out; if(b->header2)_ogg_free(b->header2); b->header2=_ogg_malloc(oggpack_bytes(&opb)); memcpy(b->header2,opb.buffer,oggpack_bytes(&opb)); op_code->packet=b->header2; op_code->bytes=oggpack_bytes(&opb); op_code->b_o_s=0; op_code->e_o_s=0; op_code->granulepos=0; op_code->packetno=2; oggpack_writeclear(&opb); return(0); err_out: oggpack_writeclear(&opb); memset(op,0,sizeof(*op)); memset(op_comm,0,sizeof(*op_comm)); memset(op_code,0,sizeof(*op_code)); if(b){ if(b->header)_ogg_free(b->header); if(b->header1)_ogg_free(b->header1); if(b->header2)_ogg_free(b->header2); b->header=NULL; b->header1=NULL; b->header2=NULL; } return(ret); } double vorbis_granule_time(vorbis_dsp_state *v,ogg_int64_t granulepos){ if(granulepos>=0) return((double)granulepos/v->vi->rate); return(-1); } ================================================ FILE: 3rdParty/libvorbis/include/lookup.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: lookup based functions last mod: $Id: lookup.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include "lookup.h" #include "lookup_data.h" #include "os.h" #include "misc.h" #ifdef FLOAT_LOOKUP /* interpolated lookup based cos function, domain 0 to PI only */ float vorbis_coslook(float a){ double d=a*(.31830989*(float)COS_LOOKUP_SZ); int i=vorbis_ftoi(d-.5); return COS_LOOKUP[i]+ (d-i)*(COS_LOOKUP[i+1]-COS_LOOKUP[i]); } /* interpolated 1./sqrt(p) where .5 <= p < 1. */ float vorbis_invsqlook(float a){ double d=a*(2.f*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ; int i=vorbis_ftoi(d-.5f); return INVSQ_LOOKUP[i]+ (d-i)*(INVSQ_LOOKUP[i+1]-INVSQ_LOOKUP[i]); } /* interpolated 1./sqrt(p) where .5 <= p < 1. */ float vorbis_invsq2explook(int a){ return INVSQ2EXP_LOOKUP[a-INVSQ2EXP_LOOKUP_MIN]; } #include /* interpolated lookup based fromdB function, domain -140dB to 0dB only */ float vorbis_fromdBlook(float a){ int i=vorbis_ftoi(a*((float)(-(1<=(FROMdB_LOOKUP_SZ<>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]); } #endif #ifdef INT_LOOKUP /* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in 16.16 format returns in m.8 format */ long vorbis_invsqlook_i(long a,long e){ long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); long d=(a&INVSQ_LOOKUP_I_MASK)<<(16-INVSQ_LOOKUP_I_SHIFT); /* 0.16 */ long val=INVSQ_LOOKUP_I[i]- /* 1.16 */ (((INVSQ_LOOKUP_I[i]-INVSQ_LOOKUP_I[i+1])* /* 0.16 */ d)>>16); /* result 1.16 */ e+=32; if(e&1)val=(val*5792)>>13; /* multiply val by 1/sqrt(2) */ e=(e>>1)-8; return(val>>e); } /* interpolated lookup based fromdB function, domain -140dB to 0dB only */ /* a is in n.12 format */ float vorbis_fromdBlook_i(long a){ int i=(-a)>>(12-FROMdB2_SHIFT); return (i<0)?1.f: ((i>=(FROMdB_LOOKUP_SZ<>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]); } /* interpolated lookup based cos function, domain 0 to PI only */ /* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */ long vorbis_coslook_i(long a){ int i=a>>COS_LOOKUP_I_SHIFT; int d=a&COS_LOOKUP_I_MASK; return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>> COS_LOOKUP_I_SHIFT); } #endif ================================================ FILE: 3rdParty/libvorbis/include/lookup.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: lookup based functions last mod: $Id: lookup.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_LOOKUP_H_ #ifdef FLOAT_LOOKUP extern float vorbis_coslook(float a); extern float vorbis_invsqlook(float a); extern float vorbis_invsq2explook(int a); extern float vorbis_fromdBlook(float a); #endif #ifdef INT_LOOKUP extern long vorbis_invsqlook_i(long a,long e); extern long vorbis_coslook_i(long a); extern float vorbis_fromdBlook_i(long a); #endif #endif ================================================ FILE: 3rdParty/libvorbis/include/lookup_data.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: lookup data; generated by lookups.pl; edit there last mod: $Id: lookup_data.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_LOOKUP_DATA_H_ #ifdef FLOAT_LOOKUP #define COS_LOOKUP_SZ 128 static float COS_LOOKUP[COS_LOOKUP_SZ+1]={ +1.0000000000000f,+0.9996988186962f,+0.9987954562052f,+0.9972904566787f, +0.9951847266722f,+0.9924795345987f,+0.9891765099648f,+0.9852776423889f, +0.9807852804032f,+0.9757021300385f,+0.9700312531945f,+0.9637760657954f, +0.9569403357322f,+0.9495281805930f,+0.9415440651830f,+0.9329927988347f, +0.9238795325113f,+0.9142097557035f,+0.9039892931234f,+0.8932243011955f, +0.8819212643484f,+0.8700869911087f,+0.8577286100003f,+0.8448535652497f, +0.8314696123025f,+0.8175848131516f,+0.8032075314806f,+0.7883464276266f, +0.7730104533627f,+0.7572088465065f,+0.7409511253550f,+0.7242470829515f, +0.7071067811865f,+0.6895405447371f,+0.6715589548470f,+0.6531728429538f, +0.6343932841636f,+0.6152315905806f,+0.5956993044924f,+0.5758081914178f, +0.5555702330196f,+0.5349976198871f,+0.5141027441932f,+0.4928981922298f, +0.4713967368260f,+0.4496113296546f,+0.4275550934303f,+0.4052413140050f, +0.3826834323651f,+0.3598950365350f,+0.3368898533922f,+0.3136817403989f, +0.2902846772545f,+0.2667127574749f,+0.2429801799033f,+0.2191012401569f, +0.1950903220161f,+0.1709618887603f,+0.1467304744554f,+0.1224106751992f, +0.0980171403296f,+0.0735645635997f,+0.0490676743274f,+0.0245412285229f, +0.0000000000000f,-0.0245412285229f,-0.0490676743274f,-0.0735645635997f, -0.0980171403296f,-0.1224106751992f,-0.1467304744554f,-0.1709618887603f, -0.1950903220161f,-0.2191012401569f,-0.2429801799033f,-0.2667127574749f, -0.2902846772545f,-0.3136817403989f,-0.3368898533922f,-0.3598950365350f, -0.3826834323651f,-0.4052413140050f,-0.4275550934303f,-0.4496113296546f, -0.4713967368260f,-0.4928981922298f,-0.5141027441932f,-0.5349976198871f, -0.5555702330196f,-0.5758081914178f,-0.5956993044924f,-0.6152315905806f, -0.6343932841636f,-0.6531728429538f,-0.6715589548470f,-0.6895405447371f, -0.7071067811865f,-0.7242470829515f,-0.7409511253550f,-0.7572088465065f, -0.7730104533627f,-0.7883464276266f,-0.8032075314806f,-0.8175848131516f, -0.8314696123025f,-0.8448535652497f,-0.8577286100003f,-0.8700869911087f, -0.8819212643484f,-0.8932243011955f,-0.9039892931234f,-0.9142097557035f, -0.9238795325113f,-0.9329927988347f,-0.9415440651830f,-0.9495281805930f, -0.9569403357322f,-0.9637760657954f,-0.9700312531945f,-0.9757021300385f, -0.9807852804032f,-0.9852776423889f,-0.9891765099648f,-0.9924795345987f, -0.9951847266722f,-0.9972904566787f,-0.9987954562052f,-0.9996988186962f, -1.0000000000000f, }; #define INVSQ_LOOKUP_SZ 32 static float INVSQ_LOOKUP[INVSQ_LOOKUP_SZ+1]={ 1.414213562373f,1.392621247646f,1.371988681140f,1.352246807566f, 1.333333333333f,1.315191898443f,1.297771369046f,1.281025230441f, 1.264911064067f,1.249390095109f,1.234426799697f,1.219988562661f, 1.206045378311f,1.192569588000f,1.179535649239f,1.166919931983f, 1.154700538379f,1.142857142857f,1.131370849898f,1.120224067222f, 1.109400392450f,1.098884511590f,1.088662107904f,1.078719779941f, 1.069044967650f,1.059625885652f,1.050451462878f,1.041511287847f, 1.032795558989f,1.024295039463f,1.016001016002f,1.007905261358f, 1.000000000000f, }; #define INVSQ2EXP_LOOKUP_MIN (-32) #define INVSQ2EXP_LOOKUP_MAX 32 static float INVSQ2EXP_LOOKUP[INVSQ2EXP_LOOKUP_MAX-\ INVSQ2EXP_LOOKUP_MIN+1]={ 65536.f, 46340.95001f, 32768.f, 23170.47501f, 16384.f, 11585.2375f, 8192.f, 5792.618751f, 4096.f, 2896.309376f, 2048.f, 1448.154688f, 1024.f, 724.0773439f, 512.f, 362.038672f, 256.f, 181.019336f, 128.f, 90.50966799f, 64.f, 45.254834f, 32.f, 22.627417f, 16.f, 11.3137085f, 8.f, 5.656854249f, 4.f, 2.828427125f, 2.f, 1.414213562f, 1.f, 0.7071067812f, 0.5f, 0.3535533906f, 0.25f, 0.1767766953f, 0.125f, 0.08838834765f, 0.0625f, 0.04419417382f, 0.03125f, 0.02209708691f, 0.015625f, 0.01104854346f, 0.0078125f, 0.005524271728f, 0.00390625f, 0.002762135864f, 0.001953125f, 0.001381067932f, 0.0009765625f, 0.000690533966f, 0.00048828125f, 0.000345266983f, 0.000244140625f,0.0001726334915f,0.0001220703125f,8.631674575e-05f, 6.103515625e-05f,4.315837288e-05f,3.051757812e-05f,2.157918644e-05f, 1.525878906e-05f, }; #endif #define FROMdB_LOOKUP_SZ 35 #define FROMdB2_LOOKUP_SZ 32 #define FROMdB_SHIFT 5 #define FROMdB2_SHIFT 3 #define FROMdB2_MASK 31 static float FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={ 1.f, 0.6309573445f, 0.3981071706f, 0.2511886432f, 0.1584893192f, 0.1f, 0.06309573445f, 0.03981071706f, 0.02511886432f, 0.01584893192f, 0.01f, 0.006309573445f, 0.003981071706f, 0.002511886432f, 0.001584893192f, 0.001f, 0.0006309573445f,0.0003981071706f,0.0002511886432f,0.0001584893192f, 0.0001f,6.309573445e-05f,3.981071706e-05f,2.511886432e-05f, 1.584893192e-05f, 1e-05f,6.309573445e-06f,3.981071706e-06f, 2.511886432e-06f,1.584893192e-06f, 1e-06f,6.309573445e-07f, 3.981071706e-07f,2.511886432e-07f,1.584893192e-07f, }; static float FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={ 0.9928302478f, 0.9786445908f, 0.9646616199f, 0.9508784391f, 0.9372921937f, 0.92390007f, 0.9106992942f, 0.8976871324f, 0.8848608897f, 0.8722179097f, 0.8597555737f, 0.8474713009f, 0.835362547f, 0.8234268041f, 0.8116616003f, 0.8000644989f, 0.7886330981f, 0.7773650302f, 0.7662579617f, 0.755309592f, 0.7445176537f, 0.7338799116f, 0.7233941627f, 0.7130582353f, 0.7028699885f, 0.6928273125f, 0.6829281272f, 0.6731703824f, 0.6635520573f, 0.6540711597f, 0.6447257262f, 0.6355138211f, }; #ifdef INT_LOOKUP #define INVSQ_LOOKUP_I_SHIFT 10 #define INVSQ_LOOKUP_I_MASK 1023 static long INVSQ_LOOKUP_I[64+1]={ 92682l, 91966l, 91267l, 90583l, 89915l, 89261l, 88621l, 87995l, 87381l, 86781l, 86192l, 85616l, 85051l, 84497l, 83953l, 83420l, 82897l, 82384l, 81880l, 81385l, 80899l, 80422l, 79953l, 79492l, 79039l, 78594l, 78156l, 77726l, 77302l, 76885l, 76475l, 76072l, 75674l, 75283l, 74898l, 74519l, 74146l, 73778l, 73415l, 73058l, 72706l, 72359l, 72016l, 71679l, 71347l, 71019l, 70695l, 70376l, 70061l, 69750l, 69444l, 69141l, 68842l, 68548l, 68256l, 67969l, 67685l, 67405l, 67128l, 66855l, 66585l, 66318l, 66054l, 65794l, 65536l, }; #define COS_LOOKUP_I_SHIFT 9 #define COS_LOOKUP_I_MASK 511 #define COS_LOOKUP_I_SZ 128 static long COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={ 16384l, 16379l, 16364l, 16340l, 16305l, 16261l, 16207l, 16143l, 16069l, 15986l, 15893l, 15791l, 15679l, 15557l, 15426l, 15286l, 15137l, 14978l, 14811l, 14635l, 14449l, 14256l, 14053l, 13842l, 13623l, 13395l, 13160l, 12916l, 12665l, 12406l, 12140l, 11866l, 11585l, 11297l, 11003l, 10702l, 10394l, 10080l, 9760l, 9434l, 9102l, 8765l, 8423l, 8076l, 7723l, 7366l, 7005l, 6639l, 6270l, 5897l, 5520l, 5139l, 4756l, 4370l, 3981l, 3590l, 3196l, 2801l, 2404l, 2006l, 1606l, 1205l, 804l, 402l, 0l, -401l, -803l, -1204l, -1605l, -2005l, -2403l, -2800l, -3195l, -3589l, -3980l, -4369l, -4755l, -5138l, -5519l, -5896l, -6269l, -6638l, -7004l, -7365l, -7722l, -8075l, -8422l, -8764l, -9101l, -9433l, -9759l, -10079l, -10393l, -10701l, -11002l, -11296l, -11584l, -11865l, -12139l, -12405l, -12664l, -12915l, -13159l, -13394l, -13622l, -13841l, -14052l, -14255l, -14448l, -14634l, -14810l, -14977l, -15136l, -15285l, -15425l, -15556l, -15678l, -15790l, -15892l, -15985l, -16068l, -16142l, -16206l, -16260l, -16304l, -16339l, -16363l, -16378l, -16383l, }; #endif #endif ================================================ FILE: 3rdParty/libvorbis/include/lpc.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: LPC low level routines last mod: $Id: lpc.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ /* Some of these routines (autocorrelator, LPC coefficient estimator) are derived from code written by Jutta Degener and Carsten Bormann; thus we include their copyright below. The entirety of this file is freely redistributable on the condition that both of these copyright notices are preserved without modification. */ /* Preserved Copyright: *********************************************/ /* Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, Technische Universita"t Berlin Any use of this software is permitted provided that this notice is not removed and that neither the authors nor the Technische Universita"t Berlin are deemed to have made any representations as to the suitability of this software for any purpose nor are held responsible for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. As a matter of courtesy, the authors request to be informed about uses this software has found, about bugs in this software, and about any improvements that may be of general interest. Berlin, 28.11.1994 Jutta Degener Carsten Bormann *********************************************************************/ #include #include #include #include "os.h" #include "smallft.h" #include "lpc.h" #include "scales.h" #include "misc.h" /* Autocorrelation LPC coeff generation algorithm invented by N. Levinson in 1947, modified by J. Durbin in 1959. */ /* Input : n elements of time doamin data Output: m lpc coefficients, excitation energy */ float vorbis_lpc_from_data(float *data,float *lpci,int n,int m){ double *aut=alloca(sizeof(*aut)*(m+1)); double *lpc=alloca(sizeof(*lpc)*(m)); double error; int i,j; /* autocorrelation, p+1 lag coefficients */ j=m+1; while(j--){ double d=0; /* double needed for accumulator depth */ for(i=j;i #include #include #include "lsp.h" #include "os.h" #include "misc.h" #include "lookup.h" #include "scales.h" /* three possible LSP to f curve functions; the exact computation (float), a lookup based float implementation, and an integer implementation. The float lookup is likely the optimal choice on any machine with an FPU. The integer implementation is *not* fixed point (due to the need for a large dynamic range and thus a seperately tracked exponent) and thus much more complex than the relatively simple float implementations. It's mostly for future work on a fully fixed point implementation for processors like the ARM family. */ /* undefine both for the 'old' but more precise implementation */ #define FLOAT_LOOKUP #undef INT_LOOKUP #ifdef FLOAT_LOOKUP #include "lookup.c" /* catch this in the build system; we #include for compilers (like gcc) that can't inline across modules */ /* side effect: changes *lsp to cosines of lsp */ void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, float amp,float ampoffset){ int i; float wdel=M_PI/ln; vorbis_fpu_control fpu; vorbis_fpu_setround(&fpu); for(i=0;i>1; do{ q*=ftmp[0]-w; p*=ftmp[1]-w; ftmp+=2; }while(--c); if(m&1){ /* odd order filter; slightly assymetric */ /* the last coefficient */ q*=ftmp[0]-w; q*=q; p*=p*(1.f-w*w); }else{ /* even order filter; still symmetric */ q*=q*(1.f+w); p*=p*(1.f-w); } q=frexp(p+q,&qexp); q=vorbis_fromdBlook(amp* vorbis_invsqlook(q)* vorbis_invsq2explook(qexp+m)- ampoffset); do{ curve[i++]*=q; }while(map[i]==k); } vorbis_fpu_restore(fpu); } #else #ifdef INT_LOOKUP #include "lookup.c" /* catch this in the build system; we #include for compilers (like gcc) that can't inline across modules */ static int MLOOP_1[64]={ 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13, 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, }; static int MLOOP_2[64]={ 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7, 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8, 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, }; static int MLOOP_3[8]={0,1,2,2,3,3,3,3}; /* side effect: changes *lsp to cosines of lsp */ void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, float amp,float ampoffset){ /* 0 <= m < 256 */ /* set up for using all int later */ int i; int ampoffseti=rint(ampoffset*4096.f); int ampi=rint(amp*16.f); long *ilsp=alloca(m*sizeof(*ilsp)); for(i=0;i>25])) if(!(shift=MLOOP_2[(pi|qi)>>19])) shift=MLOOP_3[(pi|qi)>>16]; qi=(qi>>shift)*labs(ilsp[j-1]-wi); pi=(pi>>shift)*labs(ilsp[j]-wi); qexp+=shift; } if(!(shift=MLOOP_1[(pi|qi)>>25])) if(!(shift=MLOOP_2[(pi|qi)>>19])) shift=MLOOP_3[(pi|qi)>>16]; /* pi,qi normalized collectively, both tracked using qexp */ if(m&1){ /* odd order filter; slightly assymetric */ /* the last coefficient */ qi=(qi>>shift)*labs(ilsp[j-1]-wi); pi=(pi>>shift)<<14; qexp+=shift; if(!(shift=MLOOP_1[(pi|qi)>>25])) if(!(shift=MLOOP_2[(pi|qi)>>19])) shift=MLOOP_3[(pi|qi)>>16]; pi>>=shift; qi>>=shift; qexp+=shift-14*((m+1)>>1); pi=((pi*pi)>>16); qi=((qi*qi)>>16); qexp=qexp*2+m; pi*=(1<<14)-((wi*wi)>>14); qi+=pi>>14; }else{ /* even order filter; still symmetric */ /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't worth tracking step by step */ pi>>=shift; qi>>=shift; qexp+=shift-7*m; pi=((pi*pi)>>16); qi=((qi*qi)>>16); qexp=qexp*2+m; pi*=(1<<14)-wi; qi*=(1<<14)+wi; qi=(qi+pi)>>14; } /* we've let the normalization drift because it wasn't important; however, for the lookup, things must be normalized again. We need at most one right shift or a number of left shifts */ if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ qi>>=1; qexp++; }else while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/ qi<<=1; qexp--; } amp=vorbis_fromdBlook_i(ampi* /* n.4 */ vorbis_invsqlook_i(qi,qexp)- /* m.8, m+n<=8 */ ampoffseti); /* 8.12[0] */ curve[i]*=amp; while(map[++i]==k)curve[i]*=amp; } } #else /* old, nonoptimized but simple version for any poor sap who needs to figure out what the hell this code does, or wants the other fraction of a dB precision */ /* side effect: changes *lsp to cosines of lsp */ void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, float amp,float ampoffset){ int i; float wdel=M_PI/ln; for(i=0;i= i; j--) { g[j-2] -= g[j]; g[j] += g[j]; } } } static int comp(const void *a,const void *b){ return (*(float *)a<*(float *)b)-(*(float *)a>*(float *)b); } /* Newton-Raphson-Maehly actually functioned as a decent root finder, but there are root sets for which it gets into limit cycles (exacerbated by zero suppression) and fails. We can't afford to fail, even if the failure is 1 in 100,000,000, so we now use Laguerre and later polish with Newton-Raphson (which can then afford to fail) */ #define EPSILON 10e-7 static int Laguerre_With_Deflation(float *a,int ord,float *r){ int i,m; double lastdelta=0.f; double *defl=alloca(sizeof(*defl)*(ord+1)); for(i=0;i<=ord;i++)defl[i]=a[i]; for(m=ord;m>0;m--){ double new=0.f,delta; /* iterate a root */ while(1){ double p=defl[m],pp=0.f,ppp=0.f,denom; /* eval the polynomial and its first two derivatives */ for(i=m;i>0;i--){ ppp = new*ppp + pp; pp = new*pp + p; p = new*p + defl[i-1]; } /* Laguerre's method */ denom=(m-1) * ((m-1)*pp*pp - m*p*ppp); if(denom<0) return(-1); /* complex root! The LPC generator handed us a bad filter */ if(pp>0){ denom = pp + sqrt(denom); if(denom-(EPSILON))denom=-(EPSILON); } delta = m*p/denom; new -= delta; if(delta<0.f)delta*=-1; if(fabs(delta/new)<10e-12)break; lastdelta=delta; } r[m-1]=new; /* forward deflation */ for(i=m;i>0;i--) defl[i-1]+=new*defl[i]; defl++; } return(0); } /* for spit-and-polish only */ static int Newton_Raphson(float *a,int ord,float *r){ int i, k, count=0; double error=1.f; double *root=alloca(ord*sizeof(*root)); for(i=0; i1e-20){ error=0; for(i=0; i= 0; k--) { pp= pp* rooti + p; p = p * rooti + a[k]; } delta = p/pp; root[i] -= delta; error+= delta*delta; } if(count>40)return(-1); count++; } /* Replaced the original bubble sort with a real sort. With your help, we can eliminate the bubble sort in our lifetime. --Monty */ for(i=0; i>1; int g1_order,g2_order; float *g1=alloca(sizeof(*g1)*(order2+1)); float *g2=alloca(sizeof(*g2)*(order2+1)); float *g1r=alloca(sizeof(*g1r)*(order2+1)); float *g2r=alloca(sizeof(*g2r)*(order2+1)); int i; /* even and odd are slightly different base cases */ g1_order=(m+1)>>1; g2_order=(m) >>1; /* Compute the lengths of the x polynomials. */ /* Compute the first half of K & R F1 & F2 polynomials. */ /* Compute half of the symmetric and antisymmetric polynomials. */ /* Remove the roots at +1 and -1. */ g1[g1_order] = 1.f; for(i=1;i<=g1_order;i++) g1[g1_order-i] = lpc[i-1]+lpc[m-i]; g2[g2_order] = 1.f; for(i=1;i<=g2_order;i++) g2[g2_order-i] = lpc[i-1]-lpc[m-i]; if(g1_order>g2_order){ for(i=2; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+2]; }else{ for(i=1; i<=g1_order;i++) g1[g1_order-i] -= g1[g1_order-i+1]; for(i=1; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+1]; } /* Convert into polynomials in cos(alpha) */ cheby(g1,g1_order); cheby(g2,g2_order); /* Find the roots of the 2 even polynomials.*/ if(Laguerre_With_Deflation(g1,g1_order,g1r) || Laguerre_With_Deflation(g2,g2_order,g2r)) return(-1); Newton_Raphson(g1,g1_order,g1r); /* if it fails, it leaves g1r alone */ Newton_Raphson(g2,g2_order,g2r); /* if it fails, it leaves g2r alone */ qsort(g1r,g1_order,sizeof(*g1r),comp); qsort(g2r,g2_order,sizeof(*g2r),comp); for(i=0;i #include #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "codebook.h" #include "window.h" #include "registry.h" #include "psy.h" #include "misc.h" /* simplistic, wasteful way of doing this (unique lookup for each mode/submapping); there should be a central repository for identical lookups. That will require minor work, so I'm putting it off as low priority. Why a lookup for each backend in a given mode? Because the blocksize is set by the mode, and low backend lookups may require parameters from other areas of the mode/mapping */ static void mapping0_free_info(vorbis_info_mapping *i){ vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)i; if(info){ memset(info,0,sizeof(*info)); _ogg_free(info); } } static int ilog(unsigned int v){ int ret=0; if(v)--v; while(v){ ret++; v>>=1; } return(ret); } static void mapping0_pack(vorbis_info *vi,vorbis_info_mapping *vm, oggpack_buffer *opb){ int i; vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)vm; /* another 'we meant to do it this way' hack... up to beta 4, we packed 4 binary zeros here to signify one submapping in use. We now redefine that to mean four bitflags that indicate use of deeper features; bit0:submappings, bit1:coupling, bit2,3:reserved. This is backward compatable with all actual uses of the beta code. */ if(info->submaps>1){ oggpack_write(opb,1,1); oggpack_write(opb,info->submaps-1,4); }else oggpack_write(opb,0,1); if(info->coupling_steps>0){ oggpack_write(opb,1,1); oggpack_write(opb,info->coupling_steps-1,8); for(i=0;icoupling_steps;i++){ oggpack_write(opb,info->coupling_mag[i],ilog(vi->channels)); oggpack_write(opb,info->coupling_ang[i],ilog(vi->channels)); } }else oggpack_write(opb,0,1); oggpack_write(opb,0,2); /* 2,3:reserved */ /* we don't write the channel submappings if we only have one... */ if(info->submaps>1){ for(i=0;ichannels;i++) oggpack_write(opb,info->chmuxlist[i],4); } for(i=0;isubmaps;i++){ oggpack_write(opb,0,8); /* time submap unused */ oggpack_write(opb,info->floorsubmap[i],8); oggpack_write(opb,info->residuesubmap[i],8); } } /* also responsible for range checking */ static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb){ int i; vorbis_info_mapping0 *info=_ogg_calloc(1,sizeof(*info)); codec_setup_info *ci=vi->codec_setup; memset(info,0,sizeof(*info)); if(oggpack_read(opb,1)) info->submaps=oggpack_read(opb,4)+1; else info->submaps=1; if(oggpack_read(opb,1)){ info->coupling_steps=oggpack_read(opb,8)+1; for(i=0;icoupling_steps;i++){ int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels)); int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels)); if(testM<0 || testA<0 || testM==testA || testM>=vi->channels || testA>=vi->channels) goto err_out; } } if(oggpack_read(opb,2)>0)goto err_out; /* 2,3:reserved */ if(info->submaps>1){ for(i=0;ichannels;i++){ info->chmuxlist[i]=oggpack_read(opb,4); if(info->chmuxlist[i]>=info->submaps)goto err_out; } } for(i=0;isubmaps;i++){ oggpack_read(opb,8); /* time submap unused */ info->floorsubmap[i]=oggpack_read(opb,8); if(info->floorsubmap[i]>=ci->floors)goto err_out; info->residuesubmap[i]=oggpack_read(opb,8); if(info->residuesubmap[i]>=ci->residues)goto err_out; } return info; err_out: mapping0_free_info(info); return(NULL); } #include "os.h" #include "lpc.h" #include "lsp.h" #include "envelope.h" #include "mdct.h" #include "psy.h" #include "scales.h" #if 0 static long seq=0; static ogg_int64_t total=0; static float FLOOR1_fromdB_LOOKUP[256]={ 1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, 1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, 1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, 2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, 2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, 3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, 4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, 6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, 7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, 1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, 1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, 1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, 2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, 2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, 3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, 4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, 5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, 7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, 9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, 1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, 1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, 2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, 2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, 3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, 4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, 5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, 7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, 9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, 0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, 0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, 0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, 0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, 0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, 0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, 0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, 0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, 0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, 0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, 0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, 0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, 0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, 0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, 0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, 0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, 0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, 0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, 0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, 0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, 0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, 0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, 0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, 0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, 0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, 0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, 0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, 0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, 0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, 0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, 0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, 0.82788260F, 0.88168307F, 0.9389798F, 1.F, }; #endif extern int *floor1_fit(vorbis_block *vb,vorbis_look_floor *look, const float *logmdct, /* in */ const float *logmask); extern int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor *look, int *A,int *B, int del); extern int floor1_encode(oggpack_buffer *opb,vorbis_block *vb, vorbis_look_floor *look, int *post,int *ilogmask); static int mapping0_forward(vorbis_block *vb){ vorbis_dsp_state *vd=vb->vd; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; private_state *b=vb->vd->backend_state; vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; int n=vb->pcmend; int i,j,k; int *nonzero = alloca(sizeof(*nonzero)*vi->channels); float **gmdct = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct)); int **ilogmaskch= _vorbis_block_alloc(vb,vi->channels*sizeof(*ilogmaskch)); int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts)); float global_ampmax=vbi->ampmax; float *local_ampmax=alloca(sizeof(*local_ampmax)*vi->channels); int blocktype=vbi->blocktype; int modenumber=vb->W; vorbis_info_mapping0 *info=ci->map_param[modenumber]; vorbis_look_psy *psy_look= b->psy+blocktype+(vb->W?2:0); vb->mode=modenumber; for(i=0;ichannels;i++){ float scale=4.f/n; float scale_dB; float *pcm =vb->pcm[i]; float *logfft =pcm; gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original todB estimation used on IEEE 754 compliant machines had a bug that returned dB values about a third of a decibel too high. The bug was harmless because tunings implicitly took that into account. However, fixing the bug in the estimator requires changing all the tunings as well. For now, it's easier to sync things back up here, and recalibrate the tunings in the next major model upgrade. */ #if 0 if(vi->channels==2) if(i==0) _analysis_output("pcmL",seq,pcm,n,0,0,total-n/2); else _analysis_output("pcmR",seq,pcm,n,0,0,total-n/2); #endif /* window the PCM data */ _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW); #if 0 if(vi->channels==2) if(i==0) _analysis_output("windowedL",seq,pcm,n,0,0,total-n/2); else _analysis_output("windowedR",seq,pcm,n,0,0,total-n/2); #endif /* transform the PCM data */ /* only MDCT right now.... */ mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]); /* FFT yields more accurate tonal estimation (not phase sensitive) */ drft_forward(&b->fft_look[vb->W],pcm); logfft[0]=scale_dB+todB(pcm) + .345; /* + .345 is a hack; the original todB estimation used on IEEE 754 compliant machines had a bug that returned dB values about a third of a decibel too high. The bug was harmless because tunings implicitly took that into account. However, fixing the bug in the estimator requires changing all the tunings as well. For now, it's easier to sync things back up here, and recalibrate the tunings in the next major model upgrade. */ local_ampmax[i]=logfft[0]; for(j=1;j>1]=scale_dB+.5f*todB(&temp) + .345; /* + .345 is a hack; the original todB estimation used on IEEE 754 compliant machines had a bug that returned dB values about a third of a decibel too high. The bug was harmless because tunings implicitly took that into account. However, fixing the bug in the estimator requires changing all the tunings as well. For now, it's easier to sync things back up here, and recalibrate the tunings in the next major model upgrade. */ if(temp>local_ampmax[i])local_ampmax[i]=temp; } if(local_ampmax[i]>0.f)local_ampmax[i]=0.f; if(local_ampmax[i]>global_ampmax)global_ampmax=local_ampmax[i]; #if 0 if(vi->channels==2){ if(i==0){ _analysis_output("fftL",seq,logfft,n/2,1,0,0); }else{ _analysis_output("fftR",seq,logfft,n/2,1,0,0); } } #endif } { float *noise = _vorbis_block_alloc(vb,n/2*sizeof(*noise)); float *tone = _vorbis_block_alloc(vb,n/2*sizeof(*tone)); for(i=0;ichannels;i++){ /* the encoder setup assumes that all the modes used by any specific bitrate tweaking use the same floor */ int submap=info->chmuxlist[i]; /* the following makes things clearer to *me* anyway */ float *mdct =gmdct[i]; float *logfft =vb->pcm[i]; float *logmdct =logfft+n/2; float *logmask =logfft; vb->mode=modenumber; floor_posts[i]=_vorbis_block_alloc(vb,PACKETBLOBS*sizeof(**floor_posts)); memset(floor_posts[i],0,sizeof(**floor_posts)*PACKETBLOBS); for(j=0;jchannels==2){ if(i==0) _analysis_output("mdctL",seq,logmdct,n/2,1,0,0); else _analysis_output("mdctR",seq,logmdct,n/2,1,0,0); }else{ _analysis_output("mdct",seq,logmdct,n/2,1,0,0); } #endif /* first step; noise masking. Not only does 'noise masking' give us curves from which we can decide how much resolution to give noise parts of the spectrum, it also implicitly hands us a tonality estimate (the larger the value in the 'noise_depth' vector, the more tonal that area is) */ _vp_noisemask(psy_look, logmdct, noise); /* noise does not have by-frequency offset bias applied yet */ #if 0 if(vi->channels==2){ if(i==0) _analysis_output("noiseL",seq,noise,n/2,1,0,0); else _analysis_output("noiseR",seq,noise,n/2,1,0,0); } #endif /* second step: 'all the other crap'; all the stuff that isn't computed/fit for bitrate management goes in the second psy vector. This includes tone masking, peak limiting and ATH */ _vp_tonemask(psy_look, logfft, tone, global_ampmax, local_ampmax[i]); #if 0 if(vi->channels==2){ if(i==0) _analysis_output("toneL",seq,tone,n/2,1,0,0); else _analysis_output("toneR",seq,tone,n/2,1,0,0); } #endif /* third step; we offset the noise vectors, overlay tone masking. We then do a floor1-specific line fit. If we're performing bitrate management, the line fit is performed multiple times for up/down tweakage on demand. */ #if 0 { float aotuv[psy_look->n]; #endif _vp_offset_and_mix(psy_look, noise, tone, 1, logmask, mdct, logmdct); #if 0 if(vi->channels==2){ if(i==0) _analysis_output("aotuvM1_L",seq,aotuv,psy_look->n,1,1,0); else _analysis_output("aotuvM1_R",seq,aotuv,psy_look->n,1,1,0); } } #endif #if 0 if(vi->channels==2){ if(i==0) _analysis_output("mask1L",seq,logmask,n/2,1,0,0); else _analysis_output("mask1R",seq,logmask,n/2,1,0,0); } #endif /* this algorithm is hardwired to floor 1 for now; abort out if we're *not* floor1. This won't happen unless someone has broken the encode setup lib. Guard it anyway. */ if(ci->floor_type[info->floorsubmap[submap]]!=1)return(-1); floor_posts[i][PACKETBLOBS/2]= floor1_fit(vb,b->flr[info->floorsubmap[submap]], logmdct, logmask); /* are we managing bitrate? If so, perform two more fits for later rate tweaking (fits represent hi/lo) */ if(vorbis_bitrate_managed(vb) && floor_posts[i][PACKETBLOBS/2]){ /* higher rate by way of lower noise curve */ _vp_offset_and_mix(psy_look, noise, tone, 2, logmask, mdct, logmdct); #if 0 if(vi->channels==2){ if(i==0) _analysis_output("mask2L",seq,logmask,n/2,1,0,0); else _analysis_output("mask2R",seq,logmask,n/2,1,0,0); } #endif floor_posts[i][PACKETBLOBS-1]= floor1_fit(vb,b->flr[info->floorsubmap[submap]], logmdct, logmask); /* lower rate by way of higher noise curve */ _vp_offset_and_mix(psy_look, noise, tone, 0, logmask, mdct, logmdct); #if 0 if(vi->channels==2) if(i==0) _analysis_output("mask0L",seq,logmask,n/2,1,0,0); else _analysis_output("mask0R",seq,logmask,n/2,1,0,0); #endif floor_posts[i][0]= floor1_fit(vb,b->flr[info->floorsubmap[submap]], logmdct, logmask); /* we also interpolate a range of intermediate curves for intermediate rates */ for(k=1;kflr[info->floorsubmap[submap]], floor_posts[i][0], floor_posts[i][PACKETBLOBS/2], k*65536/(PACKETBLOBS/2)); for(k=PACKETBLOBS/2+1;kflr[info->floorsubmap[submap]], floor_posts[i][PACKETBLOBS/2], floor_posts[i][PACKETBLOBS-1], (k-PACKETBLOBS/2)*65536/(PACKETBLOBS/2)); } } } vbi->ampmax=global_ampmax; /* the next phases are performed once for vbr-only and PACKETBLOB times for bitrate managed modes. 1) encode actual mode being used 2) encode the floor for each channel, compute coded mask curve/res 3) normalize and couple. 4) encode residue 5) save packet bytes to the packetblob vector */ /* iterate over the many masking curve fits we've created */ { float **res_bundle=alloca(sizeof(*res_bundle)*vi->channels); float **couple_bundle=alloca(sizeof(*couple_bundle)*vi->channels); int *zerobundle=alloca(sizeof(*zerobundle)*vi->channels); int **sortindex=alloca(sizeof(*sortindex)*vi->channels); float **mag_memo; int **mag_sort; if(info->coupling_steps){ mag_memo=_vp_quantize_couple_memo(vb, &ci->psy_g_param, psy_look, info, gmdct); mag_sort=_vp_quantize_couple_sort(vb, psy_look, info, mag_memo); hf_reduction(&ci->psy_g_param, psy_look, info, mag_memo); } memset(sortindex,0,sizeof(*sortindex)*vi->channels); if(psy_look->vi->normal_channel_p){ for(i=0;ichannels;i++){ float *mdct =gmdct[i]; sortindex[i]=alloca(sizeof(**sortindex)*n/2); _vp_noise_normalize_sort(psy_look,mdct,sortindex[i]); } } for(k=(vorbis_bitrate_managed(vb)?0:PACKETBLOBS/2); k<=(vorbis_bitrate_managed(vb)?PACKETBLOBS-1:PACKETBLOBS/2); k++){ oggpack_buffer *opb=vbi->packetblob[k]; /* start out our new packet blob with packet type and mode */ /* Encode the packet type */ oggpack_write(opb,0,1); /* Encode the modenumber */ /* Encode frame mode, pre,post windowsize, then dispatch */ oggpack_write(opb,modenumber,b->modebits); if(vb->W){ oggpack_write(opb,vb->lW,1); oggpack_write(opb,vb->nW,1); } /* encode floor, compute masking curve, sep out residue */ for(i=0;ichannels;i++){ int submap=info->chmuxlist[i]; float *mdct =gmdct[i]; float *res =vb->pcm[i]; int *ilogmask=ilogmaskch[i]= _vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); nonzero[i]=floor1_encode(opb,vb,b->flr[info->floorsubmap[submap]], floor_posts[i][k], ilogmask); #if 0 { char buf[80]; sprintf(buf,"maskI%c%d",i?'R':'L',k); float work[n/2]; for(j=0;jpsy_g_param.sliding_lowpass[vb->W][k]); _vp_noise_normalize(psy_look,res,res+n/2,sortindex[i]); #if 0 { char buf[80]; float work[n/2]; for(j=0;jcoupling_steps){ _vp_couple(k, &ci->psy_g_param, psy_look, info, vb->pcm, mag_memo, mag_sort, ilogmaskch, nonzero, ci->psy_g_param.sliding_lowpass[vb->W][k]); } /* classify and encode by submap */ for(i=0;isubmaps;i++){ int ch_in_bundle=0; long **classifications; int resnum=info->residuesubmap[i]; for(j=0;jchannels;j++){ if(info->chmuxlist[j]==i){ zerobundle[ch_in_bundle]=0; if(nonzero[j])zerobundle[ch_in_bundle]=1; res_bundle[ch_in_bundle]=vb->pcm[j]; couple_bundle[ch_in_bundle++]=vb->pcm[j]+n/2; } } classifications=_residue_P[ci->residue_type[resnum]]-> class(vb,b->residue[resnum],couple_bundle,zerobundle,ch_in_bundle); _residue_P[ci->residue_type[resnum]]-> forward(opb,vb,b->residue[resnum], couple_bundle,NULL,zerobundle,ch_in_bundle,classifications); } /* ok, done encoding. Next protopacket. */ } } #if 0 seq++; total+=ci->blocksizes[vb->W]/4+ci->blocksizes[vb->nW]/4; #endif return(0); } static int mapping0_inverse(vorbis_block *vb,vorbis_info_mapping *l){ vorbis_dsp_state *vd=vb->vd; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; private_state *b=vd->backend_state; vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)l; int hs=ci->halfrate_flag; int i,j; long n=vb->pcmend=ci->blocksizes[vb->W]; float **pcmbundle=alloca(sizeof(*pcmbundle)*vi->channels); int *zerobundle=alloca(sizeof(*zerobundle)*vi->channels); int *nonzero =alloca(sizeof(*nonzero)*vi->channels); void **floormemo=alloca(sizeof(*floormemo)*vi->channels); /* recover the spectral envelope; store it in the PCM vector for now */ for(i=0;ichannels;i++){ int submap=info->chmuxlist[i]; floormemo[i]=_floor_P[ci->floor_type[info->floorsubmap[submap]]]-> inverse1(vb,b->flr[info->floorsubmap[submap]]); if(floormemo[i]) nonzero[i]=1; else nonzero[i]=0; memset(vb->pcm[i],0,sizeof(*vb->pcm[i])*n/2); } /* channel coupling can 'dirty' the nonzero listing */ for(i=0;icoupling_steps;i++){ if(nonzero[info->coupling_mag[i]] || nonzero[info->coupling_ang[i]]){ nonzero[info->coupling_mag[i]]=1; nonzero[info->coupling_ang[i]]=1; } } /* recover the residue into our working vectors */ for(i=0;isubmaps;i++){ int ch_in_bundle=0; for(j=0;jchannels;j++){ if(info->chmuxlist[j]==i){ if(nonzero[j]) zerobundle[ch_in_bundle]=1; else zerobundle[ch_in_bundle]=0; pcmbundle[ch_in_bundle++]=vb->pcm[j]; } } _residue_P[ci->residue_type[info->residuesubmap[i]]]-> inverse(vb,b->residue[info->residuesubmap[i]], pcmbundle,zerobundle,ch_in_bundle); } /* channel coupling */ for(i=info->coupling_steps-1;i>=0;i--){ float *pcmM=vb->pcm[info->coupling_mag[i]]; float *pcmA=vb->pcm[info->coupling_ang[i]]; for(j=0;j0) if(ang>0){ pcmM[j]=mag; pcmA[j]=mag-ang; }else{ pcmA[j]=mag; pcmM[j]=mag+ang; } else if(ang>0){ pcmM[j]=mag; pcmA[j]=mag+ang; }else{ pcmA[j]=mag; pcmM[j]=mag-ang; } } } /* compute and apply spectral envelope */ for(i=0;ichannels;i++){ float *pcm=vb->pcm[i]; int submap=info->chmuxlist[i]; _floor_P[ci->floor_type[info->floorsubmap[submap]]]-> inverse2(vb,b->flr[info->floorsubmap[submap]], floormemo[i],pcm); } /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ /* only MDCT right now.... */ for(i=0;ichannels;i++){ float *pcm=vb->pcm[i]; mdct_backward(b->transform[vb->W][0],pcm,pcm); } /* all done! */ return(0); } /* export hooks */ vorbis_func_mapping mapping0_exportbundle={ &mapping0_pack, &mapping0_unpack, &mapping0_free_info, &mapping0_forward, &mapping0_inverse }; ================================================ FILE: 3rdParty/libvorbis/include/masking.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: masking curve data for psychoacoustics last mod: $Id: masking.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_MASKING_H_ #define _V_MASKING_H_ /* more detailed ATH; the bass if flat to save stressing the floor overly for only a bin or two of savings. */ #define MAX_ATH 88 static float ATH[]={ /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, /*31*/ -59, -60, -61, -62, -63, -64, -65, -66, /*63*/ -67, -68, -69, -70, -71, -72, -73, -74, /*125*/ -75, -76, -77, -78, -80, -81, -82, -83, /*250*/ -84, -85, -86, -87, -88, -88, -89, -89, /*500*/ -90, -91, -91, -92, -93, -94, -95, -96, /*1k*/ -96, -97, -98, -98, -99, -99,-100,-100, /*2k*/ -101,-102,-103,-104,-106,-107,-107,-107, /*4k*/ -107,-105,-103,-102,-101, -99, -98, -96, /*8k*/ -95, -95, -96, -97, -96, -95, -93, -90, /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 }; /* The tone masking curves from Ehmer's and Fielder's papers have been replaced by an empirically collected data set. The previously published values were, far too often, simply on crack. */ #define EHMER_OFFSET 16 #define EHMER_MAX 56 /* masking tones from -50 to 0dB, 62.5 through 16kHz at half octaves test tones from -2 octaves to +5 octaves sampled at eighth octaves */ /* (Vorbis 0dB, the loudest possible tone, is assumed to be ~100dB SPL for collection of these curves) */ static float tonemasks[P_BANDS][6][EHMER_MAX]={ /* 62.5 Hz */ {{ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -62, -62, -65, -73, -69, -68, -68, -67, -70, -70, -72, -74, -75, -79, -79, -80, -83, -88, -93, -100, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -53, -61, -66, -66, -68, -67, -70, -76, -76, -72, -73, -75, -76, -78, -79, -83, -88, -93, -100, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -37, -37, -37, -37, -37, -37, -37, -37, -38, -40, -42, -46, -48, -53, -55, -62, -65, -58, -56, -56, -61, -60, -65, -67, -69, -71, -77, -77, -78, -80, -82, -84, -88, -93, -98, -106, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -25, -25, -25, -25, -25, -25, -25, -25, -25, -26, -27, -29, -32, -38, -48, -52, -52, -50, -48, -48, -51, -52, -54, -60, -67, -67, -66, -68, -69, -73, -73, -76, -80, -81, -81, -85, -85, -86, -88, -93, -100, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -16, -16, -16, -16, -16, -16, -16, -16, -17, -19, -20, -22, -26, -28, -31, -40, -47, -39, -39, -40, -42, -43, -47, -51, -57, -52, -55, -55, -60, -58, -62, -63, -70, -67, -69, -72, -73, -77, -80, -82, -83, -87, -90, -94, -98, -104, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -10, -11, -15, -19, -25, -30, -34, -31, -30, -31, -29, -32, -35, -42, -48, -42, -44, -46, -50, -50, -51, -52, -59, -54, -55, -55, -58, -62, -63, -66, -72, -73, -76, -75, -78, -80, -80, -81, -84, -88, -90, -94, -98, -101, -106, -110}}, /* 88Hz */ {{ -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -67, -67, -67, -76, -72, -71, -74, -76, -76, -75, -78, -79, -79, -81, -83, -86, -89, -93, -97, -100, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -48, -51, -55, -59, -66, -66, -66, -67, -66, -68, -69, -70, -74, -79, -77, -77, -78, -80, -81, -82, -84, -86, -88, -91, -95, -100, -108, -116, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -36, -36, -36, -36, -36, -36, -36, -36, -36, -37, -37, -41, -44, -48, -51, -58, -62, -60, -57, -59, -59, -60, -63, -65, -72, -71, -70, -72, -74, -77, -76, -78, -81, -81, -80, -83, -86, -91, -96, -100, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -28, -28, -28, -28, -28, -28, -28, -28, -28, -30, -32, -32, -33, -35, -41, -49, -50, -49, -47, -48, -48, -52, -51, -57, -65, -61, -59, -61, -64, -69, -70, -74, -77, -77, -78, -81, -84, -85, -87, -90, -92, -96, -100, -107, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -19, -19, -19, -19, -19, -19, -19, -19, -20, -21, -23, -27, -30, -35, -36, -41, -46, -44, -42, -40, -41, -41, -43, -48, -55, -53, -52, -53, -56, -59, -58, -60, -67, -66, -69, -71, -72, -75, -79, -81, -84, -87, -90, -93, -97, -101, -107, -114, -999, -999, -999, -999, -999, -999, -999, -999}, { -9, -9, -9, -9, -9, -9, -9, -9, -11, -12, -12, -15, -16, -20, -23, -30, -37, -34, -33, -34, -31, -32, -32, -38, -47, -44, -41, -40, -47, -49, -46, -46, -58, -50, -50, -54, -58, -62, -64, -67, -67, -70, -72, -76, -79, -83, -87, -91, -96, -100, -104, -110, -999, -999, -999, -999}}, /* 125 Hz */ {{ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -63, -64, -66, -67, -66, -68, -75, -72, -76, -75, -76, -78, -79, -82, -84, -85, -90, -94, -101, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -60, -60, -61, -63, -66, -71, -68, -70, -70, -71, -72, -72, -75, -81, -78, -79, -82, -83, -86, -90, -97, -103, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -53, -53, -53, -53, -53, -53, -53, -53, -53, -54, -55, -57, -56, -57, -55, -61, -65, -60, -60, -62, -63, -63, -66, -68, -74, -73, -75, -75, -78, -80, -80, -82, -85, -90, -96, -101, -108, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, -47, -47, -47, -47, -48, -51, -57, -51, -49, -50, -51, -53, -54, -59, -66, -60, -62, -67, -67, -70, -72, -75, -76, -78, -81, -85, -88, -94, -97, -104, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -36, -36, -36, -36, -36, -36, -36, -36, -39, -41, -42, -42, -39, -38, -41, -43, -52, -44, -40, -39, -37, -37, -40, -47, -54, -50, -48, -50, -55, -61, -59, -62, -66, -66, -66, -69, -69, -73, -74, -74, -75, -77, -79, -82, -87, -91, -95, -100, -108, -115, -999, -999, -999, -999, -999, -999}, { -28, -26, -24, -22, -20, -20, -23, -29, -30, -31, -28, -27, -28, -28, -28, -35, -40, -33, -32, -29, -30, -30, -30, -37, -45, -41, -37, -38, -45, -47, -47, -48, -53, -49, -48, -50, -49, -49, -51, -52, -58, -56, -57, -56, -60, -61, -62, -70, -72, -74, -78, -83, -88, -93, -100, -106}}, /* 177 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -105, -100, -95, -91, -87, -83, -80, -78, -76, -78, -78, -81, -83, -85, -86, -85, -86, -87, -90, -97, -107, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -110, -105, -100, -95, -90, -85, -81, -77, -73, -70, -67, -67, -68, -75, -73, -70, -69, -70, -72, -75, -79, -84, -83, -84, -86, -88, -89, -89, -93, -98, -105, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-105, -100, -95, -90, -85, -80, -76, -71, -68, -68, -65, -63, -63, -62, -62, -64, -65, -64, -61, -62, -63, -64, -66, -68, -73, -73, -74, -75, -76, -81, -83, -85, -88, -89, -92, -95, -100, -108, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -80, -75, -71, -68, -65, -63, -62, -61, -61, -61, -61, -59, -56, -57, -53, -50, -58, -52, -50, -50, -52, -53, -54, -58, -67, -63, -67, -68, -72, -75, -78, -80, -81, -81, -82, -85, -89, -90, -93, -97, -101, -107, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, { -65, -61, -59, -57, -56, -55, -55, -56, -56, -57, -55, -53, -52, -47, -44, -44, -50, -44, -41, -39, -39, -42, -40, -46, -51, -49, -50, -53, -54, -63, -60, -61, -62, -66, -66, -66, -70, -73, -74, -75, -76, -75, -79, -85, -89, -91, -96, -102, -110, -999, -999, -999, -999, -999, -999, -999}, { -52, -50, -49, -49, -48, -48, -48, -49, -50, -50, -49, -46, -43, -39, -35, -33, -38, -36, -32, -29, -32, -32, -32, -35, -44, -39, -38, -38, -46, -50, -45, -46, -53, -50, -50, -50, -54, -54, -53, -53, -56, -57, -59, -66, -70, -72, -74, -79, -83, -85, -90, -97, -114, -999, -999, -999}}, /* 250 Hz */ {{-999, -999, -999, -999, -999, -999, -110, -105, -100, -95, -90, -86, -80, -75, -75, -79, -80, -79, -80, -81, -82, -88, -95, -103, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -108, -103, -98, -93, -88, -83, -79, -78, -75, -71, -67, -68, -73, -73, -72, -73, -75, -77, -80, -82, -88, -93, -100, -107, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -110, -105, -101, -96, -90, -86, -81, -77, -73, -69, -66, -61, -62, -66, -64, -62, -65, -66, -70, -72, -76, -81, -80, -84, -90, -95, -102, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -107, -103, -97, -92, -88, -83, -79, -74, -70, -66, -59, -53, -58, -62, -55, -54, -54, -54, -58, -61, -62, -72, -70, -72, -75, -78, -80, -81, -80, -83, -83, -88, -93, -100, -107, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -105, -100, -95, -90, -85, -80, -75, -70, -66, -62, -56, -48, -44, -48, -46, -46, -43, -46, -48, -48, -51, -58, -58, -59, -60, -62, -62, -61, -61, -65, -64, -65, -68, -70, -74, -75, -78, -81, -86, -95, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -105, -100, -95, -90, -85, -80, -75, -70, -65, -61, -55, -49, -39, -33, -40, -35, -32, -38, -40, -33, -35, -37, -46, -41, -45, -44, -46, -42, -45, -46, -52, -50, -50, -50, -54, -54, -55, -57, -62, -64, -66, -68, -70, -76, -81, -90, -100, -110, -999, -999, -999, -999, -999, -999}}, /* 354 hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -105, -98, -90, -85, -82, -83, -80, -78, -84, -79, -80, -83, -87, -89, -91, -93, -99, -106, -117, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -105, -98, -90, -85, -80, -75, -70, -68, -74, -72, -74, -77, -80, -82, -85, -87, -92, -89, -91, -95, -100, -106, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -105, -98, -90, -83, -75, -71, -63, -64, -67, -62, -64, -67, -70, -73, -77, -81, -84, -83, -85, -89, -90, -93, -98, -104, -109, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -103, -96, -88, -81, -75, -68, -58, -54, -56, -54, -56, -56, -58, -60, -63, -66, -74, -69, -72, -72, -75, -74, -77, -81, -81, -82, -84, -87, -93, -96, -99, -104, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -108, -102, -96, -91, -85, -80, -74, -68, -60, -51, -46, -48, -46, -43, -45, -47, -47, -49, -48, -56, -53, -55, -58, -57, -63, -58, -60, -66, -64, -67, -70, -70, -74, -77, -84, -86, -89, -91, -93, -94, -101, -109, -118, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -108, -103, -98, -93, -88, -83, -78, -73, -68, -60, -53, -44, -35, -38, -38, -34, -34, -36, -40, -41, -44, -51, -45, -46, -47, -46, -54, -50, -49, -50, -50, -50, -51, -54, -57, -58, -60, -66, -66, -66, -64, -65, -68, -77, -82, -87, -95, -110, -999, -999, -999, -999, -999}}, /* 500 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -107, -102, -97, -92, -87, -83, -78, -75, -82, -79, -83, -85, -89, -92, -95, -98, -101, -105, -109, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -106, -100, -95, -90, -86, -81, -78, -74, -69, -74, -74, -76, -79, -83, -84, -86, -89, -92, -97, -93, -100, -103, -107, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -106, -100, -95, -90, -87, -83, -80, -75, -69, -60, -66, -66, -68, -70, -74, -78, -79, -81, -81, -83, -84, -87, -93, -96, -99, -103, -107, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -108, -103, -98, -93, -89, -85, -82, -78, -71, -62, -55, -58, -58, -54, -54, -55, -59, -61, -62, -70, -66, -66, -67, -70, -72, -75, -78, -84, -84, -84, -88, -91, -90, -95, -98, -102, -103, -106, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -108, -103, -98, -94, -90, -87, -82, -79, -73, -67, -58, -47, -50, -45, -41, -45, -48, -44, -44, -49, -54, -51, -48, -47, -49, -50, -51, -57, -58, -60, -63, -69, -70, -69, -71, -74, -78, -82, -90, -95, -101, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -105, -101, -97, -93, -90, -85, -80, -77, -72, -65, -56, -48, -37, -40, -36, -34, -40, -50, -47, -38, -41, -47, -38, -35, -39, -38, -43, -40, -45, -50, -45, -44, -47, -50, -55, -48, -48, -52, -66, -70, -76, -82, -90, -97, -105, -110, -999, -999, -999, -999, -999, -999, -999}}, /* 707 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -108, -103, -98, -93, -86, -79, -76, -83, -81, -85, -87, -89, -93, -98, -102, -107, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -108, -103, -98, -93, -86, -79, -71, -77, -74, -77, -79, -81, -84, -85, -90, -92, -93, -92, -98, -101, -108, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -108, -103, -98, -93, -87, -78, -68, -65, -66, -62, -65, -67, -70, -73, -75, -78, -82, -82, -83, -84, -91, -93, -98, -102, -106, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -105, -100, -95, -90, -82, -74, -62, -57, -58, -56, -51, -52, -52, -54, -54, -58, -66, -59, -60, -63, -66, -69, -73, -79, -83, -84, -80, -81, -81, -82, -88, -92, -98, -105, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -107, -102, -97, -92, -84, -79, -69, -57, -47, -52, -47, -44, -45, -50, -52, -42, -42, -53, -43, -43, -48, -51, -56, -55, -52, -57, -59, -61, -62, -67, -71, -78, -83, -86, -94, -98, -103, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -105, -100, -95, -90, -84, -78, -70, -61, -51, -41, -40, -38, -40, -46, -52, -51, -41, -40, -46, -40, -38, -38, -41, -46, -41, -46, -47, -43, -43, -45, -41, -45, -56, -67, -68, -83, -87, -90, -95, -102, -107, -113, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 1000 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -109, -105, -101, -96, -91, -84, -77, -82, -82, -85, -89, -94, -100, -106, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -106, -103, -98, -92, -85, -80, -71, -75, -72, -76, -80, -84, -86, -89, -93, -100, -107, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -107, -104, -101, -97, -92, -88, -84, -80, -64, -66, -63, -64, -66, -69, -73, -77, -83, -83, -86, -91, -98, -104, -111, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -107, -104, -101, -97, -92, -90, -84, -74, -57, -58, -52, -55, -54, -50, -52, -50, -52, -63, -62, -69, -76, -77, -78, -78, -79, -82, -88, -94, -100, -106, -111, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -106, -102, -98, -95, -90, -85, -83, -78, -70, -50, -50, -41, -44, -49, -47, -50, -50, -44, -55, -46, -47, -48, -48, -54, -49, -49, -58, -62, -71, -81, -87, -92, -97, -102, -108, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -106, -102, -98, -95, -90, -85, -83, -78, -70, -45, -43, -41, -47, -50, -51, -50, -49, -45, -47, -41, -44, -41, -39, -43, -38, -37, -40, -41, -44, -50, -58, -65, -73, -79, -85, -92, -97, -101, -105, -109, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 1414 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -107, -100, -95, -87, -81, -85, -83, -88, -93, -100, -107, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -107, -101, -95, -88, -83, -76, -73, -72, -79, -84, -90, -95, -100, -105, -110, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -104, -98, -92, -87, -81, -70, -65, -62, -67, -71, -74, -80, -85, -91, -95, -99, -103, -108, -111, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -103, -97, -90, -85, -76, -60, -56, -54, -60, -62, -61, -56, -63, -65, -73, -74, -77, -75, -78, -81, -86, -87, -88, -91, -94, -98, -103, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -105, -100, -97, -92, -86, -81, -79, -70, -57, -51, -47, -51, -58, -60, -56, -53, -50, -58, -52, -50, -50, -53, -55, -64, -69, -71, -85, -82, -78, -81, -85, -95, -102, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -105, -100, -97, -92, -85, -83, -79, -72, -49, -40, -43, -43, -54, -56, -51, -50, -40, -43, -38, -36, -35, -37, -38, -37, -44, -54, -60, -57, -60, -70, -75, -84, -92, -103, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 2000 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -102, -95, -89, -82, -83, -84, -90, -92, -99, -107, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -107, -101, -95, -89, -83, -72, -74, -78, -85, -88, -88, -90, -92, -98, -105, -111, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -109, -103, -97, -93, -87, -81, -70, -70, -67, -75, -73, -76, -79, -81, -83, -88, -89, -97, -103, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -107, -100, -94, -88, -83, -75, -63, -59, -59, -63, -66, -60, -62, -67, -67, -77, -76, -81, -88, -86, -92, -96, -102, -109, -116, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -105, -98, -92, -86, -81, -73, -56, -52, -47, -55, -60, -58, -52, -51, -45, -49, -50, -53, -54, -61, -71, -70, -69, -78, -79, -87, -90, -96, -104, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -103, -96, -90, -86, -78, -70, -51, -42, -47, -48, -55, -54, -54, -53, -42, -35, -28, -33, -38, -37, -44, -47, -49, -54, -63, -68, -78, -82, -89, -94, -99, -104, -109, -114, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 2828 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -90, -79, -85, -81, -82, -82, -89, -94, -99, -103, -109, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -105, -97, -85, -72, -74, -70, -70, -70, -76, -85, -91, -93, -97, -103, -109, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -112, -93, -81, -68, -62, -60, -60, -57, -63, -70, -77, -82, -90, -93, -98, -104, -109, -113, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -113, -100, -93, -84, -63, -58, -48, -53, -54, -52, -52, -57, -64, -66, -76, -83, -81, -85, -85, -90, -95, -98, -101, -103, -106, -108, -111, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -105, -95, -86, -74, -53, -50, -38, -43, -49, -43, -42, -39, -39, -46, -52, -57, -56, -72, -69, -74, -81, -87, -92, -94, -97, -99, -102, -105, -108, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -108, -99, -90, -76, -66, -45, -43, -41, -44, -47, -43, -47, -40, -30, -31, -31, -39, -33, -40, -41, -43, -53, -59, -70, -73, -77, -79, -82, -84, -87, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 4000 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -91, -76, -75, -85, -93, -98, -104, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -91, -70, -70, -75, -86, -89, -94, -98, -101, -106, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -95, -80, -60, -65, -64, -74, -83, -88, -91, -95, -99, -103, -107, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -95, -80, -58, -55, -49, -66, -68, -71, -78, -78, -80, -88, -85, -89, -97, -100, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -95, -80, -53, -52, -41, -59, -59, -49, -58, -56, -63, -86, -79, -90, -93, -98, -103, -107, -112, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -97, -91, -73, -45, -40, -33, -53, -61, -49, -54, -50, -50, -60, -52, -67, -74, -81, -92, -96, -100, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 5657 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -113, -106, -99, -92, -77, -80, -88, -97, -106, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -116, -109, -102, -95, -89, -74, -72, -88, -87, -95, -102, -109, -116, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -116, -109, -102, -95, -89, -75, -66, -74, -77, -78, -86, -87, -90, -96, -105, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -115, -108, -101, -94, -88, -66, -56, -61, -70, -65, -78, -72, -83, -84, -93, -98, -105, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -105, -95, -89, -82, -57, -52, -52, -59, -56, -59, -58, -69, -67, -88, -82, -82, -89, -94, -100, -108, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -101, -96, -90, -83, -77, -54, -43, -38, -50, -48, -52, -48, -42, -42, -51, -52, -53, -59, -65, -71, -78, -85, -95, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 8000 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -120, -105, -86, -68, -78, -79, -90, -100, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -120, -105, -86, -66, -73, -77, -88, -96, -105, -115, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -120, -105, -92, -80, -61, -64, -68, -80, -87, -92, -100, -110, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -120, -104, -91, -79, -52, -60, -54, -64, -69, -77, -80, -82, -84, -85, -87, -88, -90, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -118, -100, -87, -77, -49, -50, -44, -58, -61, -61, -67, -65, -62, -62, -62, -65, -68, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -115, -98, -84, -62, -49, -44, -38, -46, -49, -49, -46, -39, -37, -39, -40, -42, -43, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 11314 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -88, -74, -77, -82, -82, -85, -90, -94, -99, -104, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -88, -66, -70, -81, -80, -81, -84, -88, -91, -93, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -88, -61, -63, -70, -71, -74, -77, -80, -83, -85, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -86, -62, -63, -62, -62, -58, -52, -50, -50, -52, -54, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -118, -108, -84, -53, -50, -50, -50, -55, -47, -45, -40, -40, -40, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -118, -100, -73, -43, -37, -42, -43, -53, -38, -37, -35, -35, -38, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}}, /* 16000 Hz */ {{-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -91, -84, -74, -80, -80, -80, -80, -80, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -91, -84, -74, -68, -68, -68, -68, -68, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -86, -78, -70, -60, -45, -30, -21, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -87, -78, -67, -48, -38, -29, -21, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -86, -69, -56, -45, -35, -33, -29, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}, {-999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -110, -100, -83, -71, -48, -27, -38, -37, -34, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999, -999}} }; #endif ================================================ FILE: 3rdParty/libvorbis/include/mdct.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: normalized modified discrete cosine transform power of two length transform only [64 <= n ] last mod: $Id: mdct.c 13293 2007-07-24 00:09:47Z xiphmont $ Original algorithm adapted long ago from _The use of multirate filter banks for coding of high quality digital audio_, by T. Sporer, K. Brandenburg and B. Edler, collection of the European Signal Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp 211-214 The below code implements an algorithm that no longer looks much like that presented in the paper, but the basic structure remains if you dig deep enough to see it. This module DOES NOT INCLUDE code to generate/apply the window function. Everybody has their own weird favorite including me... I happen to like the properties of y=sin(.5PI*sin^2(x)), but others may vehemently disagree. ********************************************************************/ /* this can also be run as an integer transform by uncommenting a define in mdct.h; the integerization is a first pass and although it's likely stable for Vorbis, the dynamic range is constrained and roundoff isn't done (so it's noisy). Consider it functional, but only a starting point. There's no point on a machine with an FPU */ #include #include #include #include #include "vorbis/codec.h" #include "mdct.h" #include "os.h" #include "misc.h" /* build lookups for trig functions; also pre-figure scaling and some window function algebra. */ void mdct_init(mdct_lookup *lookup,int n){ int *bitrev=_ogg_malloc(sizeof(*bitrev)*(n/4)); DATA_TYPE *T=_ogg_malloc(sizeof(*T)*(n+n/4)); int i; int n2=n>>1; int log2n=lookup->log2n=rint(log((float)n)/log(2.f)); lookup->n=n; lookup->trig=T; lookup->bitrev=bitrev; /* trig lookups... */ for(i=0;i>j;j++) if((msb>>j)&i)acc|=1<scale=FLOAT_CONV(4.f/n); } /* 8 point butterfly (in place, 4 register) */ STIN void mdct_butterfly_8(DATA_TYPE *x){ REG_TYPE r0 = x[6] + x[2]; REG_TYPE r1 = x[6] - x[2]; REG_TYPE r2 = x[4] + x[0]; REG_TYPE r3 = x[4] - x[0]; x[6] = r0 + r2; x[4] = r0 - r2; r0 = x[5] - x[1]; r2 = x[7] - x[3]; x[0] = r1 + r0; x[2] = r1 - r0; r0 = x[5] + x[1]; r1 = x[7] + x[3]; x[3] = r2 + r3; x[1] = r2 - r3; x[7] = r1 + r0; x[5] = r1 - r0; } /* 16 point butterfly (in place, 4 register) */ STIN void mdct_butterfly_16(DATA_TYPE *x){ REG_TYPE r0 = x[1] - x[9]; REG_TYPE r1 = x[0] - x[8]; x[8] += x[0]; x[9] += x[1]; x[0] = MULT_NORM((r0 + r1) * cPI2_8); x[1] = MULT_NORM((r0 - r1) * cPI2_8); r0 = x[3] - x[11]; r1 = x[10] - x[2]; x[10] += x[2]; x[11] += x[3]; x[2] = r0; x[3] = r1; r0 = x[12] - x[4]; r1 = x[13] - x[5]; x[12] += x[4]; x[13] += x[5]; x[4] = MULT_NORM((r0 - r1) * cPI2_8); x[5] = MULT_NORM((r0 + r1) * cPI2_8); r0 = x[14] - x[6]; r1 = x[15] - x[7]; x[14] += x[6]; x[15] += x[7]; x[6] = r0; x[7] = r1; mdct_butterfly_8(x); mdct_butterfly_8(x+8); } /* 32 point butterfly (in place, 4 register) */ STIN void mdct_butterfly_32(DATA_TYPE *x){ REG_TYPE r0 = x[30] - x[14]; REG_TYPE r1 = x[31] - x[15]; x[30] += x[14]; x[31] += x[15]; x[14] = r0; x[15] = r1; r0 = x[28] - x[12]; r1 = x[29] - x[13]; x[28] += x[12]; x[29] += x[13]; x[12] = MULT_NORM( r0 * cPI1_8 - r1 * cPI3_8 ); x[13] = MULT_NORM( r0 * cPI3_8 + r1 * cPI1_8 ); r0 = x[26] - x[10]; r1 = x[27] - x[11]; x[26] += x[10]; x[27] += x[11]; x[10] = MULT_NORM(( r0 - r1 ) * cPI2_8); x[11] = MULT_NORM(( r0 + r1 ) * cPI2_8); r0 = x[24] - x[8]; r1 = x[25] - x[9]; x[24] += x[8]; x[25] += x[9]; x[8] = MULT_NORM( r0 * cPI3_8 - r1 * cPI1_8 ); x[9] = MULT_NORM( r1 * cPI3_8 + r0 * cPI1_8 ); r0 = x[22] - x[6]; r1 = x[7] - x[23]; x[22] += x[6]; x[23] += x[7]; x[6] = r1; x[7] = r0; r0 = x[4] - x[20]; r1 = x[5] - x[21]; x[20] += x[4]; x[21] += x[5]; x[4] = MULT_NORM( r1 * cPI1_8 + r0 * cPI3_8 ); x[5] = MULT_NORM( r1 * cPI3_8 - r0 * cPI1_8 ); r0 = x[2] - x[18]; r1 = x[3] - x[19]; x[18] += x[2]; x[19] += x[3]; x[2] = MULT_NORM(( r1 + r0 ) * cPI2_8); x[3] = MULT_NORM(( r1 - r0 ) * cPI2_8); r0 = x[0] - x[16]; r1 = x[1] - x[17]; x[16] += x[0]; x[17] += x[1]; x[0] = MULT_NORM( r1 * cPI3_8 + r0 * cPI1_8 ); x[1] = MULT_NORM( r1 * cPI1_8 - r0 * cPI3_8 ); mdct_butterfly_16(x); mdct_butterfly_16(x+16); } /* N point first stage butterfly (in place, 2 register) */ STIN void mdct_butterfly_first(DATA_TYPE *T, DATA_TYPE *x, int points){ DATA_TYPE *x1 = x + points - 8; DATA_TYPE *x2 = x + (points>>1) - 8; REG_TYPE r0; REG_TYPE r1; do{ r0 = x1[6] - x2[6]; r1 = x1[7] - x2[7]; x1[6] += x2[6]; x1[7] += x2[7]; x2[6] = MULT_NORM(r1 * T[1] + r0 * T[0]); x2[7] = MULT_NORM(r1 * T[0] - r0 * T[1]); r0 = x1[4] - x2[4]; r1 = x1[5] - x2[5]; x1[4] += x2[4]; x1[5] += x2[5]; x2[4] = MULT_NORM(r1 * T[5] + r0 * T[4]); x2[5] = MULT_NORM(r1 * T[4] - r0 * T[5]); r0 = x1[2] - x2[2]; r1 = x1[3] - x2[3]; x1[2] += x2[2]; x1[3] += x2[3]; x2[2] = MULT_NORM(r1 * T[9] + r0 * T[8]); x2[3] = MULT_NORM(r1 * T[8] - r0 * T[9]); r0 = x1[0] - x2[0]; r1 = x1[1] - x2[1]; x1[0] += x2[0]; x1[1] += x2[1]; x2[0] = MULT_NORM(r1 * T[13] + r0 * T[12]); x2[1] = MULT_NORM(r1 * T[12] - r0 * T[13]); x1-=8; x2-=8; T+=16; }while(x2>=x); } /* N/stage point generic N stage butterfly (in place, 2 register) */ STIN void mdct_butterfly_generic(DATA_TYPE *T, DATA_TYPE *x, int points, int trigint){ DATA_TYPE *x1 = x + points - 8; DATA_TYPE *x2 = x + (points>>1) - 8; REG_TYPE r0; REG_TYPE r1; do{ r0 = x1[6] - x2[6]; r1 = x1[7] - x2[7]; x1[6] += x2[6]; x1[7] += x2[7]; x2[6] = MULT_NORM(r1 * T[1] + r0 * T[0]); x2[7] = MULT_NORM(r1 * T[0] - r0 * T[1]); T+=trigint; r0 = x1[4] - x2[4]; r1 = x1[5] - x2[5]; x1[4] += x2[4]; x1[5] += x2[5]; x2[4] = MULT_NORM(r1 * T[1] + r0 * T[0]); x2[5] = MULT_NORM(r1 * T[0] - r0 * T[1]); T+=trigint; r0 = x1[2] - x2[2]; r1 = x1[3] - x2[3]; x1[2] += x2[2]; x1[3] += x2[3]; x2[2] = MULT_NORM(r1 * T[1] + r0 * T[0]); x2[3] = MULT_NORM(r1 * T[0] - r0 * T[1]); T+=trigint; r0 = x1[0] - x2[0]; r1 = x1[1] - x2[1]; x1[0] += x2[0]; x1[1] += x2[1]; x2[0] = MULT_NORM(r1 * T[1] + r0 * T[0]); x2[1] = MULT_NORM(r1 * T[0] - r0 * T[1]); T+=trigint; x1-=8; x2-=8; }while(x2>=x); } STIN void mdct_butterflies(mdct_lookup *init, DATA_TYPE *x, int points){ DATA_TYPE *T=init->trig; int stages=init->log2n-5; int i,j; if(--stages>0){ mdct_butterfly_first(T,x,points); } for(i=1;--stages>0;i++){ for(j=0;j<(1<>i)*j,points>>i,4<trig)_ogg_free(l->trig); if(l->bitrev)_ogg_free(l->bitrev); memset(l,0,sizeof(*l)); } } STIN void mdct_bitreverse(mdct_lookup *init, DATA_TYPE *x){ int n = init->n; int *bit = init->bitrev; DATA_TYPE *w0 = x; DATA_TYPE *w1 = x = w0+(n>>1); DATA_TYPE *T = init->trig+n; do{ DATA_TYPE *x0 = x+bit[0]; DATA_TYPE *x1 = x+bit[1]; REG_TYPE r0 = x0[1] - x1[1]; REG_TYPE r1 = x0[0] + x1[0]; REG_TYPE r2 = MULT_NORM(r1 * T[0] + r0 * T[1]); REG_TYPE r3 = MULT_NORM(r1 * T[1] - r0 * T[0]); w1 -= 4; r0 = HALVE(x0[1] + x1[1]); r1 = HALVE(x0[0] - x1[0]); w0[0] = r0 + r2; w1[2] = r0 - r2; w0[1] = r1 + r3; w1[3] = r3 - r1; x0 = x+bit[2]; x1 = x+bit[3]; r0 = x0[1] - x1[1]; r1 = x0[0] + x1[0]; r2 = MULT_NORM(r1 * T[2] + r0 * T[3]); r3 = MULT_NORM(r1 * T[3] - r0 * T[2]); r0 = HALVE(x0[1] + x1[1]); r1 = HALVE(x0[0] - x1[0]); w0[2] = r0 + r2; w1[0] = r0 - r2; w0[3] = r1 + r3; w1[1] = r3 - r1; T += 4; bit += 4; w0 += 4; }while(w0n; int n2=n>>1; int n4=n>>2; /* rotate */ DATA_TYPE *iX = in+n2-7; DATA_TYPE *oX = out+n2+n4; DATA_TYPE *T = init->trig+n4; do{ oX -= 4; oX[0] = MULT_NORM(-iX[2] * T[3] - iX[0] * T[2]); oX[1] = MULT_NORM (iX[0] * T[3] - iX[2] * T[2]); oX[2] = MULT_NORM(-iX[6] * T[1] - iX[4] * T[0]); oX[3] = MULT_NORM (iX[4] * T[1] - iX[6] * T[0]); iX -= 8; T += 4; }while(iX>=in); iX = in+n2-8; oX = out+n2+n4; T = init->trig+n4; do{ T -= 4; oX[0] = MULT_NORM (iX[4] * T[3] + iX[6] * T[2]); oX[1] = MULT_NORM (iX[4] * T[2] - iX[6] * T[3]); oX[2] = MULT_NORM (iX[0] * T[1] + iX[2] * T[0]); oX[3] = MULT_NORM (iX[0] * T[0] - iX[2] * T[1]); iX -= 8; oX += 4; }while(iX>=in); mdct_butterflies(init,out+n2,n2); mdct_bitreverse(init,out); /* roatate + window */ { DATA_TYPE *oX1=out+n2+n4; DATA_TYPE *oX2=out+n2+n4; DATA_TYPE *iX =out; T =init->trig+n2; do{ oX1-=4; oX1[3] = MULT_NORM (iX[0] * T[1] - iX[1] * T[0]); oX2[0] = -MULT_NORM (iX[0] * T[0] + iX[1] * T[1]); oX1[2] = MULT_NORM (iX[2] * T[3] - iX[3] * T[2]); oX2[1] = -MULT_NORM (iX[2] * T[2] + iX[3] * T[3]); oX1[1] = MULT_NORM (iX[4] * T[5] - iX[5] * T[4]); oX2[2] = -MULT_NORM (iX[4] * T[4] + iX[5] * T[5]); oX1[0] = MULT_NORM (iX[6] * T[7] - iX[7] * T[6]); oX2[3] = -MULT_NORM (iX[6] * T[6] + iX[7] * T[7]); oX2+=4; iX += 8; T += 8; }while(iXoX2); } } void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){ int n=init->n; int n2=n>>1; int n4=n>>2; int n8=n>>3; DATA_TYPE *w=alloca(n*sizeof(*w)); /* forward needs working space */ DATA_TYPE *w2=w+n2; /* rotate */ /* window + rotate + step 1 */ REG_TYPE r0; REG_TYPE r1; DATA_TYPE *x0=in+n2+n4; DATA_TYPE *x1=x0+1; DATA_TYPE *T=init->trig+n2; int i=0; for(i=0;itrig+n2; x0=out+n2; for(i=0;iscale); x0[0] =MULT_NORM((w[0]*T[1]-w[1]*T[0])*init->scale); w+=2; T+=2; } } ================================================ FILE: 3rdParty/libvorbis/include/mdct.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: modified discrete cosine transform prototypes last mod: $Id: mdct.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _OGG_mdct_H_ #define _OGG_mdct_H_ #include "vorbis/codec.h" /*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/ #ifdef MDCT_INTEGERIZED #define DATA_TYPE int #define REG_TYPE register int #define TRIGBITS 14 #define cPI3_8 6270 #define cPI2_8 11585 #define cPI1_8 15137 #define FLOAT_CONV(x) ((int)((x)*(1<>TRIGBITS) #define HALVE(x) ((x)>>1) #else #define DATA_TYPE float #define REG_TYPE float #define cPI3_8 .38268343236508977175F #define cPI2_8 .70710678118654752441F #define cPI1_8 .92387953251128675613F #define FLOAT_CONV(x) (x) #define MULT_NORM(x) (x) #define HALVE(x) ((x)*.5f) #endif typedef struct { int n; int log2n; DATA_TYPE *trig; int *bitrev; DATA_TYPE scale; } mdct_lookup; extern void mdct_init(mdct_lookup *lookup,int n); extern void mdct_clear(mdct_lookup *l); extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); #endif ================================================ FILE: 3rdParty/libvorbis/include/misc.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: miscellaneous prototypes last mod: $Id: misc.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_RANDOM_H_ #define _V_RANDOM_H_ #include "vorbis/codec.h" extern int analysis_noisy; extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); extern void _vorbis_block_ripcord(vorbis_block *vb); extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB, ogg_int64_t off); #ifdef DEBUG_MALLOC #define _VDBG_GRAPHFILE "malloc.m" extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); extern void _VDBG_free(void *ptr,char *file,long line); #ifndef MISC_C #undef _ogg_malloc #undef _ogg_calloc #undef _ogg_realloc #undef _ogg_free #define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__) #define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__) #define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__) #define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__) #endif #endif #endif ================================================ FILE: 3rdParty/libvorbis/include/os.h ================================================ #ifndef _OS_H #define _OS_H /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. last mod: $Id: os.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "misc.h" #ifndef _V_IFDEFJAIL_H_ # define _V_IFDEFJAIL_H_ # ifdef __GNUC__ # define STIN static __inline__ # elif _WIN32 # define STIN static __inline # else # define STIN static # endif #ifdef DJGPP # define rint(x) (floor((x)+0.5f)) #endif #ifndef M_PI # define M_PI (3.1415926536f) #endif #if defined(_WIN32) && !defined(__SYMBIAN32__) # include # define rint(x) (floor((x)+0.5f)) # define NO_FLOAT_MATH_LIB # define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) #endif #if defined(__SYMBIAN32__) && defined(__WINS__) void *_alloca(size_t size); # define alloca _alloca #endif #ifndef FAST_HYPOT # define FAST_HYPOT hypot #endif #endif #ifdef HAVE_ALLOCA_H # include #endif #ifdef USE_MEMORY_H # include #endif #ifndef min # define min(x,y) ((x)>(y)?(y):(x)) #endif #ifndef max # define max(x,y) ((x)<(y)?(y):(x)) #endif #if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__) # define VORBIS_FPU_CONTROL /* both GCC and MSVC are kinda stupid about rounding/casting to int. Because of encapsulation constraints (GCC can't see inside the asm block and so we end up doing stupid things like a store/load that is collectively a noop), we do it this way */ /* we must set up the fpu before this works!! */ typedef ogg_int16_t vorbis_fpu_control; static inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){ ogg_int16_t ret; ogg_int16_t temp; __asm__ __volatile__("fnstcw %0\n\t" "movw %0,%%dx\n\t" "orw $62463,%%dx\n\t" "movw %%dx,%1\n\t" "fldcw %1\n\t":"=m"(ret):"m"(temp): "dx"); *fpu=ret; } static inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ __asm__ __volatile__("fldcw %0":: "m"(fpu)); } /* assumes the FPU is in round mode! */ static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise, we get extra fst/fld to truncate precision */ int i; __asm__("fistl %0": "=m"(i) : "t"(f)); return(i); } #endif #if defined(_WIN32) && !defined(__GNUC__) && !defined(__BORLANDC__) # define VORBIS_FPU_CONTROL typedef ogg_int16_t vorbis_fpu_control; static __inline int vorbis_ftoi(double f){ int i; __asm{ fld f fistp i } return i; } static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){ } static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ } #endif #ifndef VORBIS_FPU_CONTROL typedef int vorbis_fpu_control; static int vorbis_ftoi(double f){ return (int)(f+.5); } /* We don't have special code for this compiler/arch, so do it the slow way */ # define vorbis_fpu_setround(vorbis_fpu_control) {} # define vorbis_fpu_restore(vorbis_fpu_control) {} #endif #endif /* _OS_H */ ================================================ FILE: 3rdParty/libvorbis/include/psy.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: psychoacoustics not including preecho last mod: $Id: psy.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "masking.h" #include "psy.h" #include "os.h" #include "lpc.h" #include "smallft.h" #include "scales.h" #include "misc.h" #define NEGINF -9999.f static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; static double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; vorbis_look_psy_global *look=_ogg_calloc(1,sizeof(*look)); look->channels=vi->channels; look->ampmax=-9999.; look->gi=gi; return(look); } void _vp_global_free(vorbis_look_psy_global *look){ if(look){ memset(look,0,sizeof(*look)); _ogg_free(look); } } void _vi_gpsy_free(vorbis_info_psy_global *i){ if(i){ memset(i,0,sizeof(*i)); _ogg_free(i); } } void _vi_psy_free(vorbis_info_psy *i){ if(i){ memset(i,0,sizeof(*i)); _ogg_free(i); } } static void min_curve(float *c, float *c2){ int i; for(i=0;ic[i])c[i]=c2[i]; } static void attenuate_curve(float *c,float att){ int i; for(i=0;iATH[j+k+ath_offset])min=ATH[j+k+ath_offset]; }else{ if(min>ATH[MAX_ATH-1])min=ATH[MAX_ATH-1]; } ath[j]=min; } /* copy curves into working space, replicate the 50dB curve to 30 and 40, replicate the 100dB curve to 110 */ for(j=0;j<6;j++) memcpy(workc[i][j+2],tonemasks[i][j],EHMER_MAX*sizeof(*tonemasks[i][j])); memcpy(workc[i][0],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0])); memcpy(workc[i][1],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0])); /* apply centered curve boost/decay */ for(j=0;j0)adj=0.; if(adj>0. && center_boost<0)adj=0.; workc[i][j][k]+=adj; } } /* normalize curves so the driving amplitude is 0dB */ /* make temp curves with the ATH overlayed */ for(j=0;j an eighth of an octave and that the eighth octave values may also be composited. */ /* which octave curves will we be compositing? */ bin=floor(fromOC(i*.5)/binHz); lo_curve= ceil(toOC(bin*binHz+1)*2); hi_curve= floor(toOC((bin+1)*binHz)*2); if(lo_curve>i)lo_curve=i; if(lo_curve<0)lo_curve=0; if(hi_curve>=P_BANDS)hi_curve=P_BANDS-1; for(m=0;mn)lo_bin=n; if(lo_binn)hi_bin=n; for(;lworkc[k][m][j]) brute_buffer[l]=workc[k][m][j]; } for(;lworkc[k][m][EHMER_MAX-1]) brute_buffer[l]=workc[k][m][EHMER_MAX-1]; } /* be equally paranoid about being valid up to next half ocatve */ if(i+1n)lo_bin=n; if(lo_binn)hi_bin=n; for(;lworkc[k][m][j]) brute_buffer[l]=workc[k][m][j]; } for(;lworkc[k][m][EHMER_MAX-1]) brute_buffer[l]=workc[k][m][EHMER_MAX-1]; } for(j=0;j=n){ ret[i][m][j+2]=-999.; }else{ ret[i][m][j+2]=brute_buffer[bin]; } } } /* add fenceposts */ for(j=0;j-200.f)break; ret[i][m][0]=j; for(j=EHMER_MAX-1;j>EHMER_OFFSET+1;j--) if(ret[i][m][j+2]>-200.f) break; ret[i][m][1]=j; } } return(ret); } void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi, vorbis_info_psy_global *gi,int n,long rate){ long i,j,lo=-99,hi=1; long maxoc; memset(p,0,sizeof(*p)); p->eighth_octave_lines=gi->eighth_octave_lines; p->shiftoc=rint(log(gi->eighth_octave_lines*8.f)/log(2.f))-1; p->firstoc=toOC(.25f*rate*.5/n)*(1<<(p->shiftoc+1))-gi->eighth_octave_lines; maxoc=toOC((n+.25f)*rate*.5/n)*(1<<(p->shiftoc+1))+.5f; p->total_octave_lines=maxoc-p->firstoc+1; p->ath=_ogg_malloc(n*sizeof(*p->ath)); p->octave=_ogg_malloc(n*sizeof(*p->octave)); p->bark=_ogg_malloc(n*sizeof(*p->bark)); p->vi=vi; p->n=n; p->rate=rate; /* AoTuV HF weighting */ p->m_val = 1.; if(rate < 26000) p->m_val = 0; else if(rate < 38000) p->m_val = .94; /* 32kHz */ else if(rate > 46000) p->m_val = 1.275; /* 48kHz */ /* set up the lookups for a given blocksize and sample rate */ for(i=0,j=0;iath[j]=base+100.; base+=delta; } } } for(i=0;inoisewindowlominnoisewindowlo);lo++); for(;hi<=n && (hinoisewindowhimin || toBARK(rate/(2*n)*hi)<(bark+vi->noisewindowhi));hi++); p->bark[i]=((lo-1)<<16)+(hi-1); } for(i=0;ioctave[i]=toOC((i+.25f)*.5*rate/n)*(1<<(p->shiftoc+1))+.5f; p->tonecurves=setup_tone_curves(vi->toneatt,rate*.5/n,n, vi->tone_centerboost,vi->tone_decay); /* set up rolling noise median */ p->noiseoffset=_ogg_malloc(P_NOISECURVES*sizeof(*p->noiseoffset)); for(i=0;inoiseoffset[i]=_ogg_malloc(n*sizeof(**p->noiseoffset)); for(i=0;i=P_BANDS-1)halfoc=P_BANDS-1; inthalfoc=(int)halfoc; del=halfoc-inthalfoc; for(j=0;jnoiseoffset[j][i]= p->vi->noiseoff[j][inthalfoc]*(1.-del) + p->vi->noiseoff[j][inthalfoc+1]*del; } #if 0 { static int ls=0; _analysis_output_always("noiseoff0",ls,p->noiseoffset[0],n,1,0,0); _analysis_output_always("noiseoff1",ls,p->noiseoffset[1],n,1,0,0); _analysis_output_always("noiseoff2",ls++,p->noiseoffset[2],n,1,0,0); } #endif } void _vp_psy_clear(vorbis_look_psy *p){ int i,j; if(p){ if(p->ath)_ogg_free(p->ath); if(p->octave)_ogg_free(p->octave); if(p->bark)_ogg_free(p->bark); if(p->tonecurves){ for(i=0;itonecurves[i][j]); } _ogg_free(p->tonecurves[i]); } _ogg_free(p->tonecurves); } if(p->noiseoffset){ for(i=0;inoiseoffset[i]); } _ogg_free(p->noiseoffset); } memset(p,0,sizeof(*p)); } } /* octave/(8*eighth_octave_lines) x scale and dB y scale */ static void seed_curve(float *seed, const float **curves, float amp, int oc, int n, int linesper,float dBoffset){ int i,post1; int seedptr; const float *posts,*curve; int choice=(int)((amp+dBoffset-P_LEVEL_0)*.1f); choice=max(choice,0); choice=min(choice,P_LEVELS-1); posts=curves[choice]; curve=posts+2; post1=(int)posts[1]; seedptr=oc+(posts[0]-EHMER_OFFSET)*linesper-(linesper>>1); for(i=posts[0];i0){ float lin=amp+curve[i]; if(seed[seedptr]=n)break; } } static void seed_loop(vorbis_look_psy *p, const float ***curves, const float *f, const float *flr, float *seed, float specmax){ vorbis_info_psy *vi=p->vi; long n=p->n,i; float dBoffset=vi->max_curve_dB-specmax; /* prime the working vector with peak values */ for(i=0;ioctave[i]; while(i+1octave[i+1]==oc){ i++; if(f[i]>max)max=f[i]; } if(max+6.f>flr[i]){ oc=oc>>p->shiftoc; if(oc>=P_BANDS)oc=P_BANDS-1; if(oc<0)oc=0; seed_curve(seed, curves[oc], max, p->octave[i]-p->firstoc, p->total_octave_lines, p->eighth_octave_lines, dBoffset); } } } static void seed_chase(float *seeds, int linesper, long n){ long *posstack=alloca(n*sizeof(*posstack)); float *ampstack=alloca(n*sizeof(*ampstack)); long stack=0; long pos=0; long i; for(i=0;i1 && ampstack[stack-1]<=ampstack[stack-2] && iampstack[i]){ endpos=posstack[i+1]; }else{ endpos=posstack[i]+linesper+1; /* +1 is important, else bin 0 is discarded in short frames */ } if(endpos>n)endpos=n; for(;pos static void max_seeds(vorbis_look_psy *p, float *seed, float *flr){ long n=p->total_octave_lines; int linesper=p->eighth_octave_lines; long linpos=0; long pos; seed_chase(seed,linesper,n); /* for masking */ pos=p->octave[0]-p->firstoc-(linesper>>1); while(linpos+1n){ float minV=seed[pos]; long end=((p->octave[linpos]+p->octave[linpos+1])>>1)-p->firstoc; if(minV>p->vi->tone_abs_limit)minV=p->vi->tone_abs_limit; while(pos+1<=end){ pos++; if((seed[pos]>NEGINF && seed[pos]firstoc; for(;linposn && p->octave[linpos]<=end;linpos++) if(flr[linpos]total_octave_lines-1]; for(;linposn;linpos++) if(flr[linpos]> 16; if( lo>=0 ) break; hi = b[i] & 0xffff; tN = N[hi] + N[-lo]; tX = X[hi] - X[-lo]; tXX = XX[hi] + XX[-lo]; tY = Y[hi] + Y[-lo]; tXY = XY[hi] - XY[-lo]; A = tY * tXX - tX * tXY; B = tN * tXY - tX * tY; D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R < 0.f) R = 0.f; noise[i] = R - offset; } for ( ;; i++, x += 1.f) { lo = b[i] >> 16; hi = b[i] & 0xffff; if(hi>=n)break; tN = N[hi] - N[lo]; tX = X[hi] - X[lo]; tXX = XX[hi] - XX[lo]; tY = Y[hi] - Y[lo]; tXY = XY[hi] - XY[lo]; A = tY * tXX - tX * tXY; B = tN * tXY - tX * tY; D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R < 0.f) R = 0.f; noise[i] = R - offset; } for ( ; i < n; i++, x += 1.f) { R = (A + x * B) / D; if (R < 0.f) R = 0.f; noise[i] = R - offset; } if (fixed <= 0) return; for (i = 0, x = 0.f;; i++, x += 1.f) { hi = i + fixed / 2; lo = hi - fixed; if(lo>=0)break; tN = N[hi] + N[-lo]; tX = X[hi] - X[-lo]; tXX = XX[hi] + XX[-lo]; tY = Y[hi] + Y[-lo]; tXY = XY[hi] - XY[-lo]; A = tY * tXX - tX * tXY; B = tN * tXY - tX * tY; D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R - offset < noise[i]) noise[i] = R - offset; } for ( ;; i++, x += 1.f) { hi = i + fixed / 2; lo = hi - fixed; if(hi>=n)break; tN = N[hi] - N[lo]; tX = X[hi] - X[lo]; tXX = XX[hi] - XX[lo]; tY = Y[hi] - Y[lo]; tXY = XY[hi] - XY[lo]; A = tY * tXX - tX * tXY; B = tN * tXY - tX * tY; D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R - offset < noise[i]) noise[i] = R - offset; } for ( ; i < n; i++, x += 1.f) { R = (A + x * B) / D; if (R - offset < noise[i]) noise[i] = R - offset; } } static float FLOOR1_fromdB_INV_LOOKUP[256]={ 0.F, 8.81683e+06F, 8.27882e+06F, 7.77365e+06F, 7.29930e+06F, 6.85389e+06F, 6.43567e+06F, 6.04296e+06F, 5.67422e+06F, 5.32798e+06F, 5.00286e+06F, 4.69759e+06F, 4.41094e+06F, 4.14178e+06F, 3.88905e+06F, 3.65174e+06F, 3.42891e+06F, 3.21968e+06F, 3.02321e+06F, 2.83873e+06F, 2.66551e+06F, 2.50286e+06F, 2.35014e+06F, 2.20673e+06F, 2.07208e+06F, 1.94564e+06F, 1.82692e+06F, 1.71544e+06F, 1.61076e+06F, 1.51247e+06F, 1.42018e+06F, 1.33352e+06F, 1.25215e+06F, 1.17574e+06F, 1.10400e+06F, 1.03663e+06F, 973377.F, 913981.F, 858210.F, 805842.F, 756669.F, 710497.F, 667142.F, 626433.F, 588208.F, 552316.F, 518613.F, 486967.F, 457252.F, 429351.F, 403152.F, 378551.F, 355452.F, 333762.F, 313396.F, 294273.F, 276316.F, 259455.F, 243623.F, 228757.F, 214798.F, 201691.F, 189384.F, 177828.F, 166977.F, 156788.F, 147221.F, 138237.F, 129802.F, 121881.F, 114444.F, 107461.F, 100903.F, 94746.3F, 88964.9F, 83536.2F, 78438.8F, 73652.5F, 69158.2F, 64938.1F, 60975.6F, 57254.9F, 53761.2F, 50480.6F, 47400.3F, 44507.9F, 41792.0F, 39241.9F, 36847.3F, 34598.9F, 32487.7F, 30505.3F, 28643.8F, 26896.0F, 25254.8F, 23713.7F, 22266.7F, 20908.0F, 19632.2F, 18434.2F, 17309.4F, 16253.1F, 15261.4F, 14330.1F, 13455.7F, 12634.6F, 11863.7F, 11139.7F, 10460.0F, 9821.72F, 9222.39F, 8659.64F, 8131.23F, 7635.06F, 7169.17F, 6731.70F, 6320.93F, 5935.23F, 5573.06F, 5232.99F, 4913.67F, 4613.84F, 4332.30F, 4067.94F, 3819.72F, 3586.64F, 3367.78F, 3162.28F, 2969.31F, 2788.13F, 2617.99F, 2458.24F, 2308.24F, 2167.39F, 2035.14F, 1910.95F, 1794.35F, 1684.85F, 1582.04F, 1485.51F, 1394.86F, 1309.75F, 1229.83F, 1154.78F, 1084.32F, 1018.15F, 956.024F, 897.687F, 842.910F, 791.475F, 743.179F, 697.830F, 655.249F, 615.265F, 577.722F, 542.469F, 509.367F, 478.286F, 449.101F, 421.696F, 395.964F, 371.803F, 349.115F, 327.812F, 307.809F, 289.026F, 271.390F, 254.830F, 239.280F, 224.679F, 210.969F, 198.096F, 186.008F, 174.658F, 164.000F, 153.993F, 144.596F, 135.773F, 127.488F, 119.708F, 112.404F, 105.545F, 99.1046F, 93.0572F, 87.3788F, 82.0469F, 77.0404F, 72.3394F, 67.9252F, 63.7804F, 59.8885F, 56.2341F, 52.8027F, 49.5807F, 46.5553F, 43.7144F, 41.0470F, 38.5423F, 36.1904F, 33.9821F, 31.9085F, 29.9614F, 28.1332F, 26.4165F, 24.8045F, 23.2910F, 21.8697F, 20.5352F, 19.2822F, 18.1056F, 17.0008F, 15.9634F, 14.9893F, 14.0746F, 13.2158F, 12.4094F, 11.6522F, 10.9411F, 10.2735F, 9.64662F, 9.05798F, 8.50526F, 7.98626F, 7.49894F, 7.04135F, 6.61169F, 6.20824F, 5.82941F, 5.47370F, 5.13970F, 4.82607F, 4.53158F, 4.25507F, 3.99542F, 3.75162F, 3.52269F, 3.30774F, 3.10590F, 2.91638F, 2.73842F, 2.57132F, 2.41442F, 2.26709F, 2.12875F, 1.99885F, 1.87688F, 1.76236F, 1.65482F, 1.55384F, 1.45902F, 1.36999F, 1.28640F, 1.20790F, 1.13419F, 1.06499F, 1.F }; void _vp_remove_floor(vorbis_look_psy *p, float *mdct, int *codedflr, float *residue, int sliding_lowpass){ int i,n=p->n; if(sliding_lowpass>n)sliding_lowpass=n; for(i=0;in; float *work=alloca(n*sizeof(*work)); bark_noise_hybridmp(n,p->bark,logmdct,logmask, 140.,-1); for(i=0;ibark,work,logmask,0., p->vi->noisewindowfixed); for(i=0;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; if(dB<0)dB=0; logmask[i]= work[i]+p->vi->noisecompand[dB]; } } void _vp_tonemask(vorbis_look_psy *p, float *logfft, float *logmask, float global_specmax, float local_specmax){ int i,n=p->n; float *seed=alloca(sizeof(*seed)*p->total_octave_lines); float att=local_specmax+p->vi->ath_adjatt; for(i=0;itotal_octave_lines;i++)seed[i]=NEGINF; /* set the ATH (floating below localmax, not global max by a specified att) */ if(attvi->ath_maxatt)att=p->vi->ath_maxatt; for(i=0;iath[i]+att; /* tone masking */ seed_loop(p,(const float ***)p->tonecurves,logfft,logmask,seed,global_specmax); max_seeds(p,seed,logmask); } void _vp_offset_and_mix(vorbis_look_psy *p, float *noise, float *tone, int offset_select, float *logmask, float *mdct, float *logmdct){ int i,n=p->n; float de, coeffi, cx;/* AoTuV */ float toneatt=p->vi->tone_masteratt[offset_select]; cx = p->m_val; for(i=0;inoiseoffset[offset_select][i]; if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; logmask[i]=max(val,tone[i]+toneatt); /* AoTuV */ /** @ M1 ** The following codes improve a noise problem. A fundamental idea uses the value of masking and carries out the relative compensation of the MDCT. However, this code is not perfect and all noise problems cannot be solved. by Aoyumi @ 2004/04/18 */ if(offset_select == 1) { coeffi = -17.2; /* coeffi is a -17.2dB threshold */ val = val - logmdct[i]; /* val == mdct line value relative to floor in dB */ if(val > coeffi){ /* mdct value is > -17.2 dB below floor */ de = 1.0-((val-coeffi)*0.005*cx); /* pro-rated attenuation: -0.00 dB boost if mdct value is -17.2dB (relative to floor) -0.77 dB boost if mdct value is 0dB (relative to floor) -1.64 dB boost if mdct value is +17.2dB (relative to floor) etc... */ if(de < 0) de = 0.0001; }else /* mdct value is <= -17.2 dB below floor */ de = 1.0-((val-coeffi)*0.0003*cx); /* pro-rated attenuation: +0.00 dB atten if mdct value is -17.2dB (relative to floor) +0.45 dB atten if mdct value is -34.4dB (relative to floor) etc... */ mdct[i] *= de; } } } float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){ vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *gi=&ci->psy_g_param; int n=ci->blocksizes[vd->W]/2; float secs=(float)n/vi->rate; amp+=secs*gi->ampmax_att_per_sec; if(amp<-9999)amp=-9999; return(amp); } static void couple_lossless(float A, float B, float *qA, float *qB){ int test1=fabs(*qA)>fabs(*qB); test1-= fabs(*qA)fabs(B))<<1)-1; if(test1==1){ *qB=(*qA>0.f?*qA-*qB:*qB-*qA); }else{ float temp=*qB; *qB=(*qB>0.f?*qA-*qB:*qB-*qA); *qA=temp; } if(*qB>fabs(*qA)*1.9999f){ *qB= -fabs(*qA)*2.f; *qA= -*qA; } } static float hypot_lookup[32]={ -0.009935, -0.011245, -0.012726, -0.014397, -0.016282, -0.018407, -0.020800, -0.023494, -0.026522, -0.029923, -0.033737, -0.038010, -0.042787, -0.048121, -0.054064, -0.060671, -0.068000, -0.076109, -0.085054, -0.094892, -0.105675, -0.117451, -0.130260, -0.144134, -0.159093, -0.175146, -0.192286, -0.210490, -0.229718, -0.249913, -0.271001, -0.292893}; static void precomputed_couple_point(float premag, int floorA,int floorB, float *mag, float *ang){ int test=(floorA>floorB)-1; int offset=31-abs(floorA-floorB); float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))]; *mag=premag*floormag; *ang=0.f; } /* just like below, this is currently set up to only do single-step-depth coupling. Otherwise, we'd have to do more copying (which will be inevitable later) */ /* doing the real circular magnitude calculation is audibly superior to (A+B)/sqrt(2) */ static float dipole_hypot(float a, float b){ if(a>0.){ if(b>0.)return sqrt(a*a+b*b); if(a>-b)return sqrt(a*a-b*b); return -sqrt(b*b-a*a); } if(b<0.)return -sqrt(a*a+b*b); if(-a>b)return -sqrt(a*a-b*b); return sqrt(b*b-a*a); } static float round_hypot(float a, float b){ if(a>0.){ if(b>0.)return sqrt(a*a+b*b); if(a>-b)return sqrt(a*a+b*b); return -sqrt(b*b+a*a); } if(b<0.)return -sqrt(a*a+b*b); if(-a>b)return -sqrt(a*a+b*b); return sqrt(b*b+a*a); } /* revert to round hypot for now */ float **_vp_quantize_couple_memo(vorbis_block *vb, vorbis_info_psy_global *g, vorbis_look_psy *p, vorbis_info_mapping0 *vi, float **mdct){ int i,j,n=p->n; float **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; for(i=0;icoupling_steps;i++){ float *mdctM=mdct[vi->coupling_mag[i]]; float *mdctA=mdct[vi->coupling_ang[i]]; ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); for(j=0;jf2); } int **_vp_quantize_couple_sort(vorbis_block *vb, vorbis_look_psy *p, vorbis_info_mapping0 *vi, float **mags){ if(p->vi->normal_point_p){ int i,j,k,n=p->n; int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); int partition=p->vi->normal_partition; float **work=alloca(sizeof(*work)*partition); for(i=0;icoupling_steps;i++){ ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); for(j=0;jn; vorbis_info_psy *vi=p->vi; int partition=vi->normal_partition; float **work=alloca(sizeof(*work)*partition); int start=vi->normal_start; for(j=start;jn)partition=n-j; for(i=0;in; vorbis_info_psy *vi=p->vi; int partition=vi->normal_partition; int start=vi->normal_start; if(start>n)start=n; if(vi->normal_channel_p){ for(;j=.25f){ out[k]=rint(in[k]); acc-=in[k]*in[k]; flag=1; }else{ if(accnormal_thresh)break; out[k]=unitnorm(in[k]); acc-=1.; } } for(;in; /* perform any requested channel coupling */ /* point stereo can only be used in a first stage (in this encoder) because of the dependency on floor lookups */ for(i=0;icoupling_steps;i++){ /* once we're doing multistage coupling in which a channel goes through more than one coupling step, the floor vector magnitudes will also have to be recalculated an propogated along with PCM. Right now, we're not (that will wait until 5.1 most likely), so the code isn't here yet. The memory management here is all assuming single depth couplings anyway. */ /* make sure coupling a zero and a nonzero channel results in two nonzero channels. */ if(nonzero[vi->coupling_mag[i]] || nonzero[vi->coupling_ang[i]]){ float *rM=res[vi->coupling_mag[i]]; float *rA=res[vi->coupling_ang[i]]; float *qM=rM+n; float *qA=rA+n; int *floorM=ifloor[vi->coupling_mag[i]]; int *floorA=ifloor[vi->coupling_ang[i]]; float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; int partition=(p->vi->normal_point_p?p->vi->normal_partition:p->n); int limit=g->coupling_pointlimit[p->vi->blockflag][blobno]; int pointlimit=limit; nonzero[vi->coupling_mag[i]]=1; nonzero[vi->coupling_ang[i]]=1; /* The threshold of a stereo is changed with the size of n */ if(n > 1000) postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; for(j=0;jn;j+=partition){ float acc=0.f; for(k=0;k=limit && fabs(rM[l])vi->normal_point_p){ for(k=0;k=p->vi->normal_thresh;k++){ int l=mag_sort[i][j+k]; if(l=pointlimit && rint(qM[l])==0.f){ qM[l]=unitnorm(qM[l]); acc-=1.f; } } } } } } } /* AoTuV */ /** @ M2 ** The boost problem by the combination of noise normalization and point stereo is eased. However, this is a temporary patch. by Aoyumi @ 2004/04/18 */ void hf_reduction(vorbis_info_psy_global *g, vorbis_look_psy *p, vorbis_info_mapping0 *vi, float **mdct){ int i,j,n=p->n, de=0.3*p->m_val; int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; int start=p->vi->normal_start; for(i=0; icoupling_steps; i++){ /* for(j=start; j #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "os.h" #include "misc.h" #include "psy.h" #include "mdct.h" #include "smallft.h" #include "window.h" #include "scales.h" #include "lpc.h" #include "lsp.h" #include "masking.h" #include "registry.h" static vorbis_info_psy_global _psy_set0G={ 0, /* decaydBpms */ 8, /* lines per eighth octave */ /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */ 256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f, -6.f, 0, 0., 0., }; static vp_part _vp_part0[]={ { 1,9e10f, 9e10f, 1.f,9999.f}, { 9999, .75f, 9e10f, .5f,9999.f}, /*{ 9999, 1.5f, 9e10f, .5f,9999.f},*/ { 18,9e10f, 9e10f, .5f, 30.f}, { 9999,9e10f, 9e10f, .5f, 30.f} }; static vp_couple _vp_couple0[]={ { 1, {9e10f,9e10f,0}, { 0.f, 0.f,0}, { 0.f, 0.f,0}, {0.f,0.f,0}}, { 18, {9e10f,9e10f,0}, { 0.f, 0.f,0}, { 0.f, 0.f,0}, {0.f,0.f,0}}, { 9999, {9e10f,9e10f,0}, { 0.f, 9e10f,0}, { 0.f,22.f,1}, {0.f,0.f,0}} }; static vorbis_info_psy _psy_set0={ ATH_Bark_dB_lineaggressive, -100.f, -140.f, 6.f, /* floor master att */ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */ /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */ 1, /* tonemaskp */ 0.f, /* tone master att */ /* 0 10 20 30 40 50 60 70 80 90 100 */ { {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*63*/ {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*88*/ {-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f,-999.f}, /*125*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/ {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/ {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/ {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/ {-30.f,-30.f,-33.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/ {-30.f,-30.f,-33.f,-35.f,-40.f,-45.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*11500*/ {-24.f,-24.f,-26.f,-32.f,-32.f,-42.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*16000*/ }, 1,/* peakattp */ {{-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*63*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*88*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*125*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*175*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*250*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*350*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*500*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*700*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*1000*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*1400*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*2000*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*2800*/ {-14.f,-20.f,-20.f,-20.f,-26.f,-32.f,-40.f,-40.f,-40.f,-40.f,-40.f},/*4000*/ {-10.f,-12.f,-14.f,-16.f,-16.f,-20.f,-24.f,-30.f,-32.f,-40.f,-40.f},/*5600*/ {-10.f,-12.f,-14.f,-16.f,-16.f,-20.f,-24.f,-30.f,-32.f,-40.f,-40.f},/*8000*/ {-10.f,-10.f,-10.f,-12.f,-14.f,-18.f,-22.f,-28.f,-32.f,-40.f,-40.f},/*11500*/ {-10.f,-10.f,-10.f,-12.f,-14.f,-18.f,-22.f,-28.f,-32.f,-40.f,-40.f},/*16000*/ }, 1,/*noisemaskp */ -10.f, /* suppress any noise curve over maxspec+n */ .5f, /* low window */ .5f, /* high window */ 10, 10, 25, {.000f, 0.f, /*63*/ .000f, 0.f, /*88*/ .000f, 0.f, /*125*/ .000f, 0.f, /*175*/ .000f, 0.f, /*250*/ .000f, 0.f, /*350*/ .000f, 0.f, /*500*/ .000f, 0.f, /*700*/ .000f, 0.f, /*1000*/ .300f, 0.f, /*1400*/ .300f, 0.f, /*2000*/ .300f, 0.f, /*2800*/ .500f, 0.f, /*4000*/ .700f, 0.f, /*5600*/ .850f, 0.f, /*8000*/ .900f, 0.f, /*11500*/ .900f, 1.f, /*16000*/ }, 95.f, /* even decade + 5 is important; saves an rint() later in a tight loop) */ -44., 32, _vp_part0,_vp_couple0 }; static vorbis_info_floor1 _floor_set0={1, {0}, {32}, {0}, {0}, {{-1}}, 2, {0,1024, 88,31,243, 14,54,143,460, 6,3,10, 22,18,26, 41,36,47, 69,61,78, 112,99,126, 185,162,211, 329,282,387, 672,553,825 }, 60,30,400, 20,8,1,18., 20,600, 960}; static vorbis_info_mapping0 mapping_info={1,{0,1},{0},{0},{0},0, 1, {0},{1}}; static codec_setup_info codec_setup0={ {0,0}, 1,1,1,1,1,0,1, {NULL}, {0},{&mapping_info}, {0},{NULL}, {1},{&_floor_set0}, {2},{NULL}, {NULL}, {&_psy_set0}, &_psy_set0G}; static int noisy=0; void analysis(char *base,int i,float *v,int n,int bark,int dB){ if(noisy){ int j; FILE *of; char buffer[80]; sprintf(buffer,"%s_%d.m",base,i); of=fopen(buffer,"w"); for(j=0;jlook(NULL,NULL,&_floor_set0); /* we cheat on the WAV header; we just bypass 44 bytes and never verify that it matches 16bit/stereo/44.1kHz. */ fread(buffer,1,44,stdin); fwrite(buffer,1,44,stdout); memset(buffer,0,framesize*2); analysis("window",0,window,framesize,0,0); fprintf(stderr,"Processing for frame size %d...\n",framesize); while(!eos){ long bytes=fread(buffer2,1,framesize*2,stdin); if(bytes>1]=todB(&temp); if(temp>local_ampmax[i])local_ampmax[i]=temp; } if(local_ampmax[i]>ampmax)ampmax=local_ampmax[i]; mdct_forward(&m_look,pcm[i],mdct); for(j=0;jforward(&vb,floor_look, mdct, logmdct, mask, logmax, flr[i]); } _vp_remove_floor(&p_look, pg_look, logmdct, mdct, flr[i], pcm[i], local_ampmax[i]); for(j=0;j1500) fprintf(stderr,"%ld ",frameno+i); analysis("res",frameno+i,pcm[i],framesize/2,1,0); analysis("codedflr",frameno+i,flr[i],framesize/2,1,1); } /* residue prequantization */ _vp_partition_prequant(&p_look, &vi, pcm, nonzero); for(i=0;i<2;i++) analysis("quant",frameno+i,pcm[i],framesize/2,1,0); /* channel coupling / stereo quantization */ _vp_couple(&p_look, &mapping_info, pcm, nonzero); for(i=0;i<2;i++) analysis("coupled",frameno+i,pcm[i],framesize/2,1,0); /* decoupling */ for(i=mapping_info.coupling_steps-1;i>=0;i--){ float *pcmM=pcm[mapping_info.coupling_mag[i]]; float *pcmA=pcm[mapping_info.coupling_ang[i]]; for(j=0;j0) if(ang>0){ pcmM[j]=mag; pcmA[j]=mag-ang; }else{ pcmA[j]=mag; pcmM[j]=mag+ang; } else if(ang>0){ pcmM[j]=mag; pcmA[j]=mag+ang; }else{ pcmA[j]=mag; pcmM[j]=mag-ang; } } } for(i=0;i<2;i++) analysis("decoupled",frameno+i,pcm[i],framesize/2,1,0); for(i=0;i<2;i++){ float amp; for(j=0;j32767){ if(!flag)fprintf(stderr,"clipping in frame %ld ",frameno+i); flag=1; val=32767; } if(val<-32768){ if(!flag)fprintf(stderr,"clipping in frame %ld ",frameno+i); flag=1; val=-32768; } ptr[0]=val&0xff; ptr[1]=(val>>8)&0xff; ptr+=4; } } fprintf(stderr,"*"); fwrite(buffer,1,framesize*2,stdout); memmove(buffer,buffer2,framesize*2); for(i=0;i<2;i++){ for(j=0,k=framesize/2;j #include #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "registry.h" #include "codebook.h" #include "misc.h" #include "os.h" #if defined(TRAIN_RES) || defined (TRAIN_RESAUX) #include #endif typedef struct { vorbis_info_residue0 *info; int parts; int stages; codebook *fullbooks; codebook *phrasebook; codebook ***partbooks; int partvals; int **decodemap; long postbits; long phrasebits; long frames; #if defined(TRAIN_RES) || defined(TRAIN_RESAUX) int train_seq; long *training_data[8][64]; float training_max[8][64]; float training_min[8][64]; float tmin; float tmax; #endif } vorbis_look_residue0; void res0_free_info(vorbis_info_residue *i){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)i; if(info){ memset(info,0,sizeof(*info)); _ogg_free(info); } } void res0_free_look(vorbis_look_residue *i){ int j; if(i){ vorbis_look_residue0 *look=(vorbis_look_residue0 *)i; #ifdef TRAIN_RES { int j,k,l; for(j=0;jparts;j++){ /*fprintf(stderr,"partition %d: ",j);*/ for(k=0;k<8;k++) if(look->training_data[k][j]){ char buffer[80]; FILE *of; codebook *statebook=look->partbooks[j][k]; /* long and short into the same bucket by current convention */ sprintf(buffer,"res_part%d_pass%d.vqd",j,k); of=fopen(buffer,"a"); for(l=0;lentries;l++) fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]); fclose(of); /*fprintf(stderr,"%d(%.2f|%.2f) ",k, look->training_min[k][j],look->training_max[k][j]);*/ _ogg_free(look->training_data[k][j]); look->training_data[k][j]=NULL; } /*fprintf(stderr,"\n");*/ } } fprintf(stderr,"min/max residue: %g::%g\n",look->tmin,look->tmax); /*fprintf(stderr,"residue bit usage %f:%f (%f total)\n", (float)look->phrasebits/look->frames, (float)look->postbits/look->frames, (float)(look->postbits+look->phrasebits)/look->frames);*/ #endif /*vorbis_info_residue0 *info=look->info; fprintf(stderr, "%ld frames encoded in %ld phrasebits and %ld residue bits " "(%g/frame) \n",look->frames,look->phrasebits, look->resbitsflat, (look->phrasebits+look->resbitsflat)/(float)look->frames); for(j=0;jparts;j++){ long acc=0; fprintf(stderr,"\t[%d] == ",j); for(k=0;kstages;k++) if((info->secondstages[j]>>k)&1){ fprintf(stderr,"%ld,",look->resbits[j][k]); acc+=look->resbits[j][k]; } fprintf(stderr,":: (%ld vals) %1.2fbits/sample\n",look->resvals[j], acc?(float)acc/(look->resvals[j]*info->grouping):0); } fprintf(stderr,"\n");*/ for(j=0;jparts;j++) if(look->partbooks[j])_ogg_free(look->partbooks[j]); _ogg_free(look->partbooks); for(j=0;jpartvals;j++) _ogg_free(look->decodemap[j]); _ogg_free(look->decodemap); memset(look,0,sizeof(*look)); _ogg_free(look); } } static int ilog(unsigned int v){ int ret=0; while(v){ ret++; v>>=1; } return(ret); } static int icount(unsigned int v){ int ret=0; while(v){ ret+=v&1; v>>=1; } return(ret); } void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; int j,acc=0; oggpack_write(opb,info->begin,24); oggpack_write(opb,info->end,24); oggpack_write(opb,info->grouping-1,24); /* residue vectors to group and code with a partitioned book */ oggpack_write(opb,info->partitions-1,6); /* possible partition choices */ oggpack_write(opb,info->groupbook,8); /* group huffman book */ /* secondstages is a bitmask; as encoding progresses pass by pass, a bitmask of one indicates this partition class has bits to write this pass */ for(j=0;jpartitions;j++){ if(ilog(info->secondstages[j])>3){ /* yes, this is a minor hack due to not thinking ahead */ oggpack_write(opb,info->secondstages[j],3); oggpack_write(opb,1,1); oggpack_write(opb,info->secondstages[j]>>3,5); }else oggpack_write(opb,info->secondstages[j],4); /* trailing zero */ acc+=icount(info->secondstages[j]); } for(j=0;jbooklist[j],8); } /* vorbis_info is for range checking */ vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ int j,acc=0; vorbis_info_residue0 *info=_ogg_calloc(1,sizeof(*info)); codec_setup_info *ci=vi->codec_setup; info->begin=oggpack_read(opb,24); info->end=oggpack_read(opb,24); info->grouping=oggpack_read(opb,24)+1; info->partitions=oggpack_read(opb,6)+1; info->groupbook=oggpack_read(opb,8); for(j=0;jpartitions;j++){ int cascade=oggpack_read(opb,3); if(oggpack_read(opb,1)) cascade|=(oggpack_read(opb,5)<<3); info->secondstages[j]=cascade; acc+=icount(cascade); } for(j=0;jbooklist[j]=oggpack_read(opb,8); if(info->groupbook>=ci->books)goto errout; for(j=0;jbooklist[j]>=ci->books)goto errout; return(info); errout: res0_free_info(info); return(NULL); } vorbis_look_residue *res0_look(vorbis_dsp_state *vd, vorbis_info_residue *vr){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; vorbis_look_residue0 *look=_ogg_calloc(1,sizeof(*look)); codec_setup_info *ci=vd->vi->codec_setup; int j,k,acc=0; int dim; int maxstage=0; look->info=info; look->parts=info->partitions; look->fullbooks=ci->fullbooks; look->phrasebook=ci->fullbooks+info->groupbook; dim=look->phrasebook->dim; look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks)); for(j=0;jparts;j++){ int stages=ilog(info->secondstages[j]); if(stages){ if(stages>maxstage)maxstage=stages; look->partbooks[j]=_ogg_calloc(stages,sizeof(*look->partbooks[j])); for(k=0;ksecondstages[j]&(1<partbooks[j][k]=ci->fullbooks+info->booklist[acc++]; #ifdef TRAIN_RES look->training_data[k][j]=_ogg_calloc(look->partbooks[j][k]->entries, sizeof(***look->training_data)); #endif } } } look->partvals=rint(pow((float)look->parts,(float)dim)); look->stages=maxstage; look->decodemap=_ogg_malloc(look->partvals*sizeof(*look->decodemap)); for(j=0;jpartvals;j++){ long val=j; long mult=look->partvals/look->parts; look->decodemap[j]=_ogg_malloc(dim*sizeof(*look->decodemap[j])); for(k=0;kparts; look->decodemap[j][k]=deco; } } #if defined(TRAIN_RES) || defined (TRAIN_RESAUX) { static int train_seq=0; look->train_seq=train_seq++; } #endif return(look); } /* break an abstraction and copy some code for performance purposes */ static int local_book_besterror(codebook *book,float *a){ int dim=book->dim,i,k,o; int best=0; encode_aux_threshmatch *tt=book->c->thresh_tree; /* find the quant val of each scalar */ for(k=0,o=dim;kthreshvals>>1; if(valquantthresh[i]){ if(valquantthresh[i-1]){ for(--i;i>0;--i) if(val>=tt->quantthresh[i-1]) break; } }else{ for(++i;ithreshvals-1;++i) if(valquantthresh[i])break; } best=(best*tt->quantvals)+tt->quantmap[i]; } /* regular lattices are easy :-) */ if(book->c->lengthlist[best]<=0){ const static_codebook *c=book->c; int i,j; float bestf=0.f; float *e=book->valuelist; best=-1; for(i=0;ientries;i++){ if(c->lengthlist[i]>0){ float this=0.f; for(j=0;j-1){ float *ptr=book->valuelist+best*dim; for(i=0;idim; int step=n/dim; for(i=0;i0) acc[entry]++; #endif bits+=vorbis_book_encode(book,entry,opb); } return(bits); } static long **_01class(vorbis_block *vb,vorbis_look_residue *vl, float **in,int ch){ long i,j,k; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; vorbis_info *vi=vb->vd->vi; codec_setup_info *ci=vi->codec_setup; /* move all this setup out later */ int samples_per_partition=info->grouping; int possible_partitions=info->partitions; int n=info->end-info->begin; int partvals=n/samples_per_partition; long **partword=_vorbis_block_alloc(vb,ch*sizeof(*partword)); float scale=100./samples_per_partition; /* we find the partition type for each partition of each channel. We'll go back and do the interleaved encoding in a bit. For now, clarity */ for(i=0;ibegin; for(j=0;jmax)max=fabs(in[j][offset+k]); ent+=fabs(rint(in[j][offset+k])); } ent*=scale; for(k=0;kclassmetric1[k] && (info->classmetric2[k]<0 || (int)entclassmetric2[k])) break; partword[j][i]=k; } } #ifdef TRAIN_RESAUX { FILE *of; char buffer[80]; for(i=0;itrain_seq); of=fopen(buffer,"a"); for(j=0;jframes++; return(partword); } /* designed for stereo or other modes where the partition size is an integer multiple of the number of channels encoded in the current submap */ static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,float **in, int ch){ long i,j,k,l; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; /* move all this setup out later */ int samples_per_partition=info->grouping; int possible_partitions=info->partitions; int n=info->end-info->begin; int partvals=n/samples_per_partition; long **partword=_vorbis_block_alloc(vb,sizeof(*partword)); #if defined(TRAIN_RES) || defined (TRAIN_RESAUX) FILE *of; char buffer[80]; #endif partword[0]=_vorbis_block_alloc(vb,n*ch/samples_per_partition*sizeof(*partword[0])); memset(partword[0],0,n*ch/samples_per_partition*sizeof(*partword[0])); for(i=0,l=info->begin/ch;imagmax)magmax=fabs(in[0][l]); for(k=1;kangmax)angmax=fabs(in[k][l]); l++; } for(j=0;jclassmetric1[j] && angmax<=info->classmetric2[j]) break; partword[0][i]=j; } #ifdef TRAIN_RESAUX sprintf(buffer,"resaux_%d.vqd",look->train_seq); of=fopen(buffer,"a"); for(i=0;iframes++; return(partword); } static int _01forward(oggpack_buffer *opb, vorbis_block *vb,vorbis_look_residue *vl, float **in,int ch, long **partword, int (*encode)(oggpack_buffer *,float *,int, codebook *,long *)){ long i,j,k,s; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; vorbis_dsp_state *vd=vb->vd; /* move all this setup out later */ int samples_per_partition=info->grouping; int possible_partitions=info->partitions; int partitions_per_word=look->phrasebook->dim; int n=info->end-info->begin; int partvals=n/samples_per_partition; long resbits[128]; long resvals[128]; #ifdef TRAIN_RES for(i=0;ibegin;jlook->tmax)look->tmax=in[i][j]; if(in[i][j]tmin)look->tmin=in[i][j]; } #endif memset(resbits,0,sizeof(resbits)); memset(resvals,0,sizeof(resvals)); /* we code the partition words for each channel, then the residual words for a partition per channel until we've written all the residual words for that partition word. Then write the next partition channel words... */ for(s=0;sstages;s++){ for(i=0;iphrasebook->entries) look->phrasebits+=vorbis_book_encode(look->phrasebook,val,opb); #if 0 /*def TRAIN_RES*/ else fprintf(stderr,"!"); #endif } } /* now we encode interleaved residual values for the partitions */ for(k=0;kbegin; for(j=0;jsecondstages[partword[j][i]]&(1<partbooks[partword[j][i]][s]; if(statebook){ int ret; long *accumulator=NULL; #ifdef TRAIN_RES accumulator=look->training_data[s][partword[j][i]]; { int l; float *samples=in[j]+offset; for(l=0;ltraining_min[s][partword[j][i]]) look->training_min[s][partword[j][i]]=samples[l]; if(samples[l]>look->training_max[s][partword[j][i]]) look->training_max[s][partword[j][i]]=samples[l]; } } #endif ret=encode(opb,in[j]+offset,samples_per_partition, statebook,accumulator); look->postbits+=ret; resbits[partword[j][i]]+=ret; } } } } } } /*{ long total=0; long totalbits=0; fprintf(stderr,"%d :: ",vb->mode); for(k=0;kinfo; /* move all this setup out later */ int samples_per_partition=info->grouping; int partitions_per_word=look->phrasebook->dim; int max=vb->pcmend>>1; int end=(info->endend:max); int n=end-info->begin; if(n>0){ int partvals=n/samples_per_partition; int partwords=(partvals+partitions_per_word-1)/partitions_per_word; int ***partword=alloca(ch*sizeof(*partword)); for(j=0;jstages;s++){ /* each loop decodes on partition codeword containing partitions_per_word partitions */ for(i=0,l=0;iphrasebook,&vb->opb); if(temp==-1)goto eopbreak; partword[j][l]=look->decodemap[temp]; if(partword[j][l]==NULL)goto errout; } } /* now we decode residual values for the partitions */ for(k=0;kbegin+i*samples_per_partition; if(info->secondstages[partword[j][l][k]]&(1<partbooks[partword[j][l][k]][s]; if(stagebook){ if(decodepart(stagebook,in[j]+offset,&vb->opb, samples_per_partition)==-1)goto eopbreak; } } } } } } errout: eopbreak: return(0); } #if 0 /* residue 0 and 1 are just slight variants of one another. 0 is interleaved, 1 is not */ long **res0_class(vorbis_block *vb,vorbis_look_residue *vl, float **in,int *nonzero,int ch){ /* we encode only the nonzero parts of a bundle */ int i,used=0; for(i=0;ipcmend/2; for(i=0;ipcmend/2; for(i=0;ipcmend/2,used=0; /* don't duplicate the code; use a working vector hack for now and reshape ourselves into a single channel res1 */ /* ugly; reallocs for each coupling pass :-( */ float *work=_vorbis_block_alloc(vb,ch*n*sizeof(*work)); for(i=0;iinfo; /* move all this setup out later */ int samples_per_partition=info->grouping; int partitions_per_word=look->phrasebook->dim; int max=(vb->pcmend*ch)>>1; int end=(info->endend:max); int n=end-info->begin; if(n>0){ int partvals=n/samples_per_partition; int partwords=(partvals+partitions_per_word-1)/partitions_per_word; int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword)); for(i=0;istages;s++){ for(i=0,l=0;iphrasebook,&vb->opb); if(temp==-1)goto eopbreak; partword[l]=look->decodemap[temp]; if(partword[l]==NULL)goto errout; } /* now we decode residual values for the partitions */ for(k=0;ksecondstages[partword[l][k]]&(1<partbooks[partword[l][k]][s]; if(stagebook){ if(vorbis_book_decodevv_add(stagebook,in, i*samples_per_partition+info->begin,ch, &vb->opb,samples_per_partition)==-1) goto eopbreak; } } } } } errout: eopbreak: return(0); } vorbis_func_residue residue0_exportbundle={ NULL, &res0_unpack, &res0_look, &res0_free_info, &res0_free_look, NULL, NULL, &res0_inverse }; vorbis_func_residue residue1_exportbundle={ &res0_pack, &res0_unpack, &res0_look, &res0_free_info, &res0_free_look, &res1_class, &res1_forward, &res1_inverse }; vorbis_func_residue residue2_exportbundle={ &res0_pack, &res0_unpack, &res0_look, &res0_free_info, &res0_free_look, &res2_class, &res2_forward, &res2_inverse }; ================================================ FILE: 3rdParty/libvorbis/include/residue_16.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel residue templates 16/22kHz last mod: $Id: residue_16.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ /***** residue backends *********************************************/ static static_bookblock _resbook_16s_0={ { {0}, {0,0,&_16c0_s_p1_0}, {0}, {0,0,&_16c0_s_p3_0}, {0,0,&_16c0_s_p4_0}, {0,0,&_16c0_s_p5_0}, {0,0,&_16c0_s_p6_0}, {&_16c0_s_p7_0,&_16c0_s_p7_1}, {&_16c0_s_p8_0,&_16c0_s_p8_1}, {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2} } }; static static_bookblock _resbook_16s_1={ { {0}, {0,0,&_16c1_s_p1_0}, {0}, {0,0,&_16c1_s_p3_0}, {0,0,&_16c1_s_p4_0}, {0,0,&_16c1_s_p5_0}, {0,0,&_16c1_s_p6_0}, {&_16c1_s_p7_0,&_16c1_s_p7_1}, {&_16c1_s_p8_0,&_16c1_s_p8_1}, {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2} } }; static static_bookblock _resbook_16s_2={ { {0}, {0,0,&_16c2_s_p1_0}, {0,0,&_16c2_s_p2_0}, {0,0,&_16c2_s_p3_0}, {0,0,&_16c2_s_p4_0}, {&_16c2_s_p5_0,&_16c2_s_p5_1}, {&_16c2_s_p6_0,&_16c2_s_p6_1}, {&_16c2_s_p7_0,&_16c2_s_p7_1}, {&_16c2_s_p8_0,&_16c2_s_p8_1}, {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2} } }; static vorbis_residue_template _res_16s_0[]={ {2,0, &_residue_44_mid, &_huff_book__16c0_s_single,&_huff_book__16c0_s_single, &_resbook_16s_0,&_resbook_16s_0}, }; static vorbis_residue_template _res_16s_1[]={ {2,0, &_residue_44_mid, &_huff_book__16c1_s_short,&_huff_book__16c1_s_short, &_resbook_16s_1,&_resbook_16s_1}, {2,0, &_residue_44_mid, &_huff_book__16c1_s_long,&_huff_book__16c1_s_long, &_resbook_16s_1,&_resbook_16s_1} }; static vorbis_residue_template _res_16s_2[]={ {2,0, &_residue_44_high, &_huff_book__16c2_s_short,&_huff_book__16c2_s_short, &_resbook_16s_2,&_resbook_16s_2}, {2,0, &_residue_44_high, &_huff_book__16c2_s_long,&_huff_book__16c2_s_long, &_resbook_16s_2,&_resbook_16s_2} }; static vorbis_mapping_template _mapres_template_16_stereo[3]={ { _map_nominal, _res_16s_0 }, /* 0 */ { _map_nominal, _res_16s_1 }, /* 1 */ { _map_nominal, _res_16s_2 }, /* 2 */ }; static static_bookblock _resbook_16u_0={ { {0}, {0,0,&_16u0__p1_0}, {0,0,&_16u0__p2_0}, {0,0,&_16u0__p3_0}, {0,0,&_16u0__p4_0}, {0,0,&_16u0__p5_0}, {&_16u0__p6_0,&_16u0__p6_1}, {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2} } }; static static_bookblock _resbook_16u_1={ { {0}, {0,0,&_16u1__p1_0}, {0,0,&_16u1__p2_0}, {0,0,&_16u1__p3_0}, {0,0,&_16u1__p4_0}, {0,0,&_16u1__p5_0}, {0,0,&_16u1__p6_0}, {&_16u1__p7_0,&_16u1__p7_1}, {&_16u1__p8_0,&_16u1__p8_1}, {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2} } }; static static_bookblock _resbook_16u_2={ { {0}, {0,0,&_16u2_p1_0}, {0,0,&_16u2_p2_0}, {0,0,&_16u2_p3_0}, {0,0,&_16u2_p4_0}, {&_16u2_p5_0,&_16u2_p5_1}, {&_16u2_p6_0,&_16u2_p6_1}, {&_16u2_p7_0,&_16u2_p7_1}, {&_16u2_p8_0,&_16u2_p8_1}, {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2} } }; static vorbis_residue_template _res_16u_0[]={ {1,0, &_residue_44_low_un, &_huff_book__16u0__single,&_huff_book__16u0__single, &_resbook_16u_0,&_resbook_16u_0}, }; static vorbis_residue_template _res_16u_1[]={ {1,0, &_residue_44_mid_un, &_huff_book__16u1__short,&_huff_book__16u1__short, &_resbook_16u_1,&_resbook_16u_1}, {1,0, &_residue_44_mid_un, &_huff_book__16u1__long,&_huff_book__16u1__long, &_resbook_16u_1,&_resbook_16u_1} }; static vorbis_residue_template _res_16u_2[]={ {1,0, &_residue_44_hi_un, &_huff_book__16u2__short,&_huff_book__16u2__short, &_resbook_16u_2,&_resbook_16u_2}, {1,0, &_residue_44_hi_un, &_huff_book__16u2__long,&_huff_book__16u2__long, &_resbook_16u_2,&_resbook_16u_2} }; static vorbis_mapping_template _mapres_template_16_uncoupled[3]={ { _map_nominal_u, _res_16u_0 }, /* 0 */ { _map_nominal_u, _res_16u_1 }, /* 1 */ { _map_nominal_u, _res_16u_2 }, /* 2 */ }; ================================================ FILE: 3rdParty/libvorbis/include/residue_44.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel residue templates for 32/44.1/48kHz last mod: $Id: residue_44.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "vorbis/codec.h" #include "backends.h" #include "books/coupled/res_books_stereo.h" /***** residue backends *********************************************/ static vorbis_info_residue0 _residue_44_low={ 0,-1, -1, 9,-1, /* 0 1 2 3 4 5 6 7 */ {0}, {-1}, { .5, 1.5, 2.5, 2.5, 4.5, 8.5, 16.5, 32.5}, { .5, .5, .5, 999., 4.5, 8.5, 16.5, 32.5}, }; static vorbis_info_residue0 _residue_44_mid={ 0,-1, -1, 10,-1, /* 0 1 2 3 4 5 6 7 8 */ {0}, {-1}, { .5, 1.5, 1.5, 2.5, 2.5, 4.5, 8.5, 16.5, 32.5}, { .5, .5, 999., .5, 999., 4.5, 8.5, 16.5, 32.5}, }; static vorbis_info_residue0 _residue_44_high={ 0,-1, -1, 10,-1, /* 0 1 2 3 4 5 6 7 8 */ {0}, {-1}, { .5, 1.5, 2.5, 4.5, 8.5, 16.5, 32.5, 71.5,157.5}, { .5, 1.5, 2.5, 3.5, 4.5, 8.5, 16.5, 71.5,157.5}, }; static static_bookblock _resbook_44s_n1={ { {0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0}, {0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0}, {&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1}, {&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2} } }; static static_bookblock _resbook_44sm_n1={ { {0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0}, {0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0}, {&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1}, {&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2} } }; static static_bookblock _resbook_44s_0={ { {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0}, {0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0}, {&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1}, {&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2} } }; static static_bookblock _resbook_44sm_0={ { {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0}, {0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0}, {&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1}, {&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2} } }; static static_bookblock _resbook_44s_1={ { {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0}, {0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0}, {&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1}, {&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2} } }; static static_bookblock _resbook_44sm_1={ { {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0}, {0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0}, {&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1}, {&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2} } }; static static_bookblock _resbook_44s_2={ { {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0}, {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0}, {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1}, {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2} } }; static static_bookblock _resbook_44s_3={ { {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0}, {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0}, {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1}, {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2} } }; static static_bookblock _resbook_44s_4={ { {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0}, {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0}, {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1}, {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2} } }; static static_bookblock _resbook_44s_5={ { {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0}, {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0}, {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1}, {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2} } }; static static_bookblock _resbook_44s_6={ { {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0}, {0,0,&_44c6_s_p4_0}, {&_44c6_s_p5_0,&_44c6_s_p5_1}, {&_44c6_s_p6_0,&_44c6_s_p6_1}, {&_44c6_s_p7_0,&_44c6_s_p7_1}, {&_44c6_s_p8_0,&_44c6_s_p8_1}, {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2} } }; static static_bookblock _resbook_44s_7={ { {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0}, {0,0,&_44c7_s_p4_0}, {&_44c7_s_p5_0,&_44c7_s_p5_1}, {&_44c7_s_p6_0,&_44c7_s_p6_1}, {&_44c7_s_p7_0,&_44c7_s_p7_1}, {&_44c7_s_p8_0,&_44c7_s_p8_1}, {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2} } }; static static_bookblock _resbook_44s_8={ { {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0}, {0,0,&_44c8_s_p4_0}, {&_44c8_s_p5_0,&_44c8_s_p5_1}, {&_44c8_s_p6_0,&_44c8_s_p6_1}, {&_44c8_s_p7_0,&_44c8_s_p7_1}, {&_44c8_s_p8_0,&_44c8_s_p8_1}, {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2} } }; static static_bookblock _resbook_44s_9={ { {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0}, {0,0,&_44c9_s_p4_0}, {&_44c9_s_p5_0,&_44c9_s_p5_1}, {&_44c9_s_p6_0,&_44c9_s_p6_1}, {&_44c9_s_p7_0,&_44c9_s_p7_1}, {&_44c9_s_p8_0,&_44c9_s_p8_1}, {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2} } }; static vorbis_residue_template _res_44s_n1[]={ {2,0, &_residue_44_low, &_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short, &_resbook_44s_n1,&_resbook_44sm_n1}, {2,0, &_residue_44_low, &_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long, &_resbook_44s_n1,&_resbook_44sm_n1} }; static vorbis_residue_template _res_44s_0[]={ {2,0, &_residue_44_low, &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short, &_resbook_44s_0,&_resbook_44sm_0}, {2,0, &_residue_44_low, &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long, &_resbook_44s_0,&_resbook_44sm_0} }; static vorbis_residue_template _res_44s_1[]={ {2,0, &_residue_44_low, &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short, &_resbook_44s_1,&_resbook_44sm_1}, {2,0, &_residue_44_low, &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long, &_resbook_44s_1,&_resbook_44sm_1} }; static vorbis_residue_template _res_44s_2[]={ {2,0, &_residue_44_mid, &_huff_book__44c2_s_short,&_huff_book__44c2_s_short, &_resbook_44s_2,&_resbook_44s_2}, {2,0, &_residue_44_mid, &_huff_book__44c2_s_long,&_huff_book__44c2_s_long, &_resbook_44s_2,&_resbook_44s_2} }; static vorbis_residue_template _res_44s_3[]={ {2,0, &_residue_44_mid, &_huff_book__44c3_s_short,&_huff_book__44c3_s_short, &_resbook_44s_3,&_resbook_44s_3}, {2,0, &_residue_44_mid, &_huff_book__44c3_s_long,&_huff_book__44c3_s_long, &_resbook_44s_3,&_resbook_44s_3} }; static vorbis_residue_template _res_44s_4[]={ {2,0, &_residue_44_mid, &_huff_book__44c4_s_short,&_huff_book__44c4_s_short, &_resbook_44s_4,&_resbook_44s_4}, {2,0, &_residue_44_mid, &_huff_book__44c4_s_long,&_huff_book__44c4_s_long, &_resbook_44s_4,&_resbook_44s_4} }; static vorbis_residue_template _res_44s_5[]={ {2,0, &_residue_44_mid, &_huff_book__44c5_s_short,&_huff_book__44c5_s_short, &_resbook_44s_5,&_resbook_44s_5}, {2,0, &_residue_44_mid, &_huff_book__44c5_s_long,&_huff_book__44c5_s_long, &_resbook_44s_5,&_resbook_44s_5} }; static vorbis_residue_template _res_44s_6[]={ {2,0, &_residue_44_high, &_huff_book__44c6_s_short,&_huff_book__44c6_s_short, &_resbook_44s_6,&_resbook_44s_6}, {2,0, &_residue_44_high, &_huff_book__44c6_s_long,&_huff_book__44c6_s_long, &_resbook_44s_6,&_resbook_44s_6} }; static vorbis_residue_template _res_44s_7[]={ {2,0, &_residue_44_high, &_huff_book__44c7_s_short,&_huff_book__44c7_s_short, &_resbook_44s_7,&_resbook_44s_7}, {2,0, &_residue_44_high, &_huff_book__44c7_s_long,&_huff_book__44c7_s_long, &_resbook_44s_7,&_resbook_44s_7} }; static vorbis_residue_template _res_44s_8[]={ {2,0, &_residue_44_high, &_huff_book__44c8_s_short,&_huff_book__44c8_s_short, &_resbook_44s_8,&_resbook_44s_8}, {2,0, &_residue_44_high, &_huff_book__44c8_s_long,&_huff_book__44c8_s_long, &_resbook_44s_8,&_resbook_44s_8} }; static vorbis_residue_template _res_44s_9[]={ {2,0, &_residue_44_high, &_huff_book__44c9_s_short,&_huff_book__44c9_s_short, &_resbook_44s_9,&_resbook_44s_9}, {2,0, &_residue_44_high, &_huff_book__44c9_s_long,&_huff_book__44c9_s_long, &_resbook_44s_9,&_resbook_44s_9} }; static vorbis_mapping_template _mapres_template_44_stereo[]={ { _map_nominal, _res_44s_n1 }, /* -1 */ { _map_nominal, _res_44s_0 }, /* 0 */ { _map_nominal, _res_44s_1 }, /* 1 */ { _map_nominal, _res_44s_2 }, /* 2 */ { _map_nominal, _res_44s_3 }, /* 3 */ { _map_nominal, _res_44s_4 }, /* 4 */ { _map_nominal, _res_44s_5 }, /* 5 */ { _map_nominal, _res_44s_6 }, /* 6 */ { _map_nominal, _res_44s_7 }, /* 7 */ { _map_nominal, _res_44s_8 }, /* 8 */ { _map_nominal, _res_44s_9 }, /* 9 */ }; ================================================ FILE: 3rdParty/libvorbis/include/residue_44u.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel residue templates for 32/44.1/48kHz uncoupled last mod: $Id: residue_44u.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "vorbis/codec.h" #include "backends.h" #include "books/uncoupled/res_books_uncoupled.h" /***** residue backends *********************************************/ static vorbis_info_residue0 _residue_44_low_un={ 0,-1, -1, 8,-1, {0}, {-1}, { .5, 1.5, 1.5, 2.5, 2.5, 4.5, 28.5}, { -1, 25, -1, 45, -1, -1, -1} }; static vorbis_info_residue0 _residue_44_mid_un={ 0,-1, -1, 10,-1, /* 0 1 2 3 4 5 6 7 8 9 */ {0}, {-1}, { .5, 1.5, 1.5, 2.5, 2.5, 4.5, 4.5, 16.5, 60.5}, { -1, 30, -1, 50, -1, 80, -1, -1, -1} }; static vorbis_info_residue0 _residue_44_hi_un={ 0,-1, -1, 10,-1, /* 0 1 2 3 4 5 6 7 8 9 */ {0}, {-1}, { .5, 1.5, 2.5, 4.5, 8.5, 16.5, 32.5, 71.5,157.5}, { -1, -1, -1, -1, -1, -1, -1, -1, -1} }; /* mapping conventions: only one submap (this would change for efficient 5.1 support for example)*/ /* Four psychoacoustic profiles are used, one for each blocktype */ static vorbis_info_mapping0 _map_nominal_u[2]={ {1, {0,0}, {0}, {0}, 0,{0},{0}}, {1, {0,0}, {1}, {1}, 0,{0},{0}} }; static static_bookblock _resbook_44u_n1={ { {0}, {0,0,&_44un1__p1_0}, {0,0,&_44un1__p2_0}, {0,0,&_44un1__p3_0}, {0,0,&_44un1__p4_0}, {0,0,&_44un1__p5_0}, {&_44un1__p6_0,&_44un1__p6_1}, {&_44un1__p7_0,&_44un1__p7_1,&_44un1__p7_2} } }; static static_bookblock _resbook_44u_0={ { {0}, {0,0,&_44u0__p1_0}, {0,0,&_44u0__p2_0}, {0,0,&_44u0__p3_0}, {0,0,&_44u0__p4_0}, {0,0,&_44u0__p5_0}, {&_44u0__p6_0,&_44u0__p6_1}, {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2} } }; static static_bookblock _resbook_44u_1={ { {0}, {0,0,&_44u1__p1_0}, {0,0,&_44u1__p2_0}, {0,0,&_44u1__p3_0}, {0,0,&_44u1__p4_0}, {0,0,&_44u1__p5_0}, {&_44u1__p6_0,&_44u1__p6_1}, {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2} } }; static static_bookblock _resbook_44u_2={ { {0}, {0,0,&_44u2__p1_0}, {0,0,&_44u2__p2_0}, {0,0,&_44u2__p3_0}, {0,0,&_44u2__p4_0}, {0,0,&_44u2__p5_0}, {&_44u2__p6_0,&_44u2__p6_1}, {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2} } }; static static_bookblock _resbook_44u_3={ { {0}, {0,0,&_44u3__p1_0}, {0,0,&_44u3__p2_0}, {0,0,&_44u3__p3_0}, {0,0,&_44u3__p4_0}, {0,0,&_44u3__p5_0}, {&_44u3__p6_0,&_44u3__p6_1}, {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2} } }; static static_bookblock _resbook_44u_4={ { {0}, {0,0,&_44u4__p1_0}, {0,0,&_44u4__p2_0}, {0,0,&_44u4__p3_0}, {0,0,&_44u4__p4_0}, {0,0,&_44u4__p5_0}, {&_44u4__p6_0,&_44u4__p6_1}, {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2} } }; static static_bookblock _resbook_44u_5={ { {0}, {0,0,&_44u5__p1_0}, {0,0,&_44u5__p2_0}, {0,0,&_44u5__p3_0}, {0,0,&_44u5__p4_0}, {0,0,&_44u5__p5_0}, {0,0,&_44u5__p6_0}, {&_44u5__p7_0,&_44u5__p7_1}, {&_44u5__p8_0,&_44u5__p8_1}, {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2} } }; static static_bookblock _resbook_44u_6={ { {0}, {0,0,&_44u6__p1_0}, {0,0,&_44u6__p2_0}, {0,0,&_44u6__p3_0}, {0,0,&_44u6__p4_0}, {0,0,&_44u6__p5_0}, {0,0,&_44u6__p6_0}, {&_44u6__p7_0,&_44u6__p7_1}, {&_44u6__p8_0,&_44u6__p8_1}, {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2} } }; static static_bookblock _resbook_44u_7={ { {0}, {0,0,&_44u7__p1_0}, {0,0,&_44u7__p2_0}, {0,0,&_44u7__p3_0}, {0,0,&_44u7__p4_0}, {0,0,&_44u7__p5_0}, {0,0,&_44u7__p6_0}, {&_44u7__p7_0,&_44u7__p7_1}, {&_44u7__p8_0,&_44u7__p8_1}, {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2} } }; static static_bookblock _resbook_44u_8={ { {0}, {0,0,&_44u8_p1_0}, {0,0,&_44u8_p2_0}, {0,0,&_44u8_p3_0}, {0,0,&_44u8_p4_0}, {&_44u8_p5_0,&_44u8_p5_1}, {&_44u8_p6_0,&_44u8_p6_1}, {&_44u8_p7_0,&_44u8_p7_1}, {&_44u8_p8_0,&_44u8_p8_1}, {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2} } }; static static_bookblock _resbook_44u_9={ { {0}, {0,0,&_44u9_p1_0}, {0,0,&_44u9_p2_0}, {0,0,&_44u9_p3_0}, {0,0,&_44u9_p4_0}, {&_44u9_p5_0,&_44u9_p5_1}, {&_44u9_p6_0,&_44u9_p6_1}, {&_44u9_p7_0,&_44u9_p7_1}, {&_44u9_p8_0,&_44u9_p8_1}, {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2} } }; static vorbis_residue_template _res_44u_n1[]={ {1,0, &_residue_44_low_un, &_huff_book__44un1__short,&_huff_book__44un1__short, &_resbook_44u_n1,&_resbook_44u_n1}, {1,0, &_residue_44_low_un, &_huff_book__44un1__long,&_huff_book__44un1__long, &_resbook_44u_n1,&_resbook_44u_n1} }; static vorbis_residue_template _res_44u_0[]={ {1,0, &_residue_44_low_un, &_huff_book__44u0__short,&_huff_book__44u0__short, &_resbook_44u_0,&_resbook_44u_0}, {1,0, &_residue_44_low_un, &_huff_book__44u0__long,&_huff_book__44u0__long, &_resbook_44u_0,&_resbook_44u_0} }; static vorbis_residue_template _res_44u_1[]={ {1,0, &_residue_44_low_un, &_huff_book__44u1__short,&_huff_book__44u1__short, &_resbook_44u_1,&_resbook_44u_1}, {1,0, &_residue_44_low_un, &_huff_book__44u1__long,&_huff_book__44u1__long, &_resbook_44u_1,&_resbook_44u_1} }; static vorbis_residue_template _res_44u_2[]={ {1,0, &_residue_44_low_un, &_huff_book__44u2__short,&_huff_book__44u2__short, &_resbook_44u_2,&_resbook_44u_2}, {1,0, &_residue_44_low_un, &_huff_book__44u2__long,&_huff_book__44u2__long, &_resbook_44u_2,&_resbook_44u_2} }; static vorbis_residue_template _res_44u_3[]={ {1,0, &_residue_44_low_un, &_huff_book__44u3__short,&_huff_book__44u3__short, &_resbook_44u_3,&_resbook_44u_3}, {1,0, &_residue_44_low_un, &_huff_book__44u3__long,&_huff_book__44u3__long, &_resbook_44u_3,&_resbook_44u_3} }; static vorbis_residue_template _res_44u_4[]={ {1,0, &_residue_44_low_un, &_huff_book__44u4__short,&_huff_book__44u4__short, &_resbook_44u_4,&_resbook_44u_4}, {1,0, &_residue_44_low_un, &_huff_book__44u4__long,&_huff_book__44u4__long, &_resbook_44u_4,&_resbook_44u_4} }; static vorbis_residue_template _res_44u_5[]={ {1,0, &_residue_44_mid_un, &_huff_book__44u5__short,&_huff_book__44u5__short, &_resbook_44u_5,&_resbook_44u_5}, {1,0, &_residue_44_mid_un, &_huff_book__44u5__long,&_huff_book__44u5__long, &_resbook_44u_5,&_resbook_44u_5} }; static vorbis_residue_template _res_44u_6[]={ {1,0, &_residue_44_mid_un, &_huff_book__44u6__short,&_huff_book__44u6__short, &_resbook_44u_6,&_resbook_44u_6}, {1,0, &_residue_44_mid_un, &_huff_book__44u6__long,&_huff_book__44u6__long, &_resbook_44u_6,&_resbook_44u_6} }; static vorbis_residue_template _res_44u_7[]={ {1,0, &_residue_44_mid_un, &_huff_book__44u7__short,&_huff_book__44u7__short, &_resbook_44u_7,&_resbook_44u_7}, {1,0, &_residue_44_mid_un, &_huff_book__44u7__long,&_huff_book__44u7__long, &_resbook_44u_7,&_resbook_44u_7} }; static vorbis_residue_template _res_44u_8[]={ {1,0, &_residue_44_hi_un, &_huff_book__44u8__short,&_huff_book__44u8__short, &_resbook_44u_8,&_resbook_44u_8}, {1,0, &_residue_44_hi_un, &_huff_book__44u8__long,&_huff_book__44u8__long, &_resbook_44u_8,&_resbook_44u_8} }; static vorbis_residue_template _res_44u_9[]={ {1,0, &_residue_44_hi_un, &_huff_book__44u9__short,&_huff_book__44u9__short, &_resbook_44u_9,&_resbook_44u_9}, {1,0, &_residue_44_hi_un, &_huff_book__44u9__long,&_huff_book__44u9__long, &_resbook_44u_9,&_resbook_44u_9} }; static vorbis_mapping_template _mapres_template_44_uncoupled[]={ { _map_nominal_u, _res_44u_n1 }, /* -1 */ { _map_nominal_u, _res_44u_0 }, /* 0 */ { _map_nominal_u, _res_44u_1 }, /* 1 */ { _map_nominal_u, _res_44u_2 }, /* 2 */ { _map_nominal_u, _res_44u_3 }, /* 3 */ { _map_nominal_u, _res_44u_4 }, /* 4 */ { _map_nominal_u, _res_44u_5 }, /* 5 */ { _map_nominal_u, _res_44u_6 }, /* 6 */ { _map_nominal_u, _res_44u_7 }, /* 7 */ { _map_nominal_u, _res_44u_8 }, /* 8 */ { _map_nominal_u, _res_44u_9 }, /* 9 */ }; ================================================ FILE: 3rdParty/libvorbis/include/residue_8.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel residue templates 8/11kHz last mod: $Id: residue_8.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "vorbis/codec.h" #include "backends.h" /***** residue backends *********************************************/ static static_bookblock _resbook_8s_0={ { {0}, {0,0,&_8c0_s_p1_0}, {0}, {0,0,&_8c0_s_p3_0}, {0,0,&_8c0_s_p4_0}, {0,0,&_8c0_s_p5_0}, {0,0,&_8c0_s_p6_0}, {&_8c0_s_p7_0,&_8c0_s_p7_1}, {&_8c0_s_p8_0,&_8c0_s_p8_1}, {&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2} } }; static static_bookblock _resbook_8s_1={ { {0}, {0,0,&_8c1_s_p1_0}, {0}, {0,0,&_8c1_s_p3_0}, {0,0,&_8c1_s_p4_0}, {0,0,&_8c1_s_p5_0}, {0,0,&_8c1_s_p6_0}, {&_8c1_s_p7_0,&_8c1_s_p7_1}, {&_8c1_s_p8_0,&_8c1_s_p8_1}, {&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2} } }; static vorbis_residue_template _res_8s_0[]={ {2,0, &_residue_44_mid, &_huff_book__8c0_s_single,&_huff_book__8c0_s_single, &_resbook_8s_0,&_resbook_8s_0}, }; static vorbis_residue_template _res_8s_1[]={ {2,0, &_residue_44_mid, &_huff_book__8c1_s_single,&_huff_book__8c1_s_single, &_resbook_8s_1,&_resbook_8s_1}, }; static vorbis_mapping_template _mapres_template_8_stereo[2]={ { _map_nominal, _res_8s_0 }, /* 0 */ { _map_nominal, _res_8s_1 }, /* 1 */ }; static static_bookblock _resbook_8u_0={ { {0}, {0,0,&_8u0__p1_0}, {0,0,&_8u0__p2_0}, {0,0,&_8u0__p3_0}, {0,0,&_8u0__p4_0}, {0,0,&_8u0__p5_0}, {&_8u0__p6_0,&_8u0__p6_1}, {&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2} } }; static static_bookblock _resbook_8u_1={ { {0}, {0,0,&_8u1__p1_0}, {0,0,&_8u1__p2_0}, {0,0,&_8u1__p3_0}, {0,0,&_8u1__p4_0}, {0,0,&_8u1__p5_0}, {0,0,&_8u1__p6_0}, {&_8u1__p7_0,&_8u1__p7_1}, {&_8u1__p8_0,&_8u1__p8_1}, {&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2} } }; static vorbis_residue_template _res_8u_0[]={ {1,0, &_residue_44_low_un, &_huff_book__8u0__single,&_huff_book__8u0__single, &_resbook_8u_0,&_resbook_8u_0}, }; static vorbis_residue_template _res_8u_1[]={ {1,0, &_residue_44_mid_un, &_huff_book__8u1__single,&_huff_book__8u1__single, &_resbook_8u_1,&_resbook_8u_1}, }; static vorbis_mapping_template _mapres_template_8_uncoupled[2]={ { _map_nominal_u, _res_8u_0 }, /* 0 */ { _map_nominal_u, _res_8u_1 }, /* 1 */ }; ================================================ FILE: 3rdParty/libvorbis/include/scales.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: linear scale -> dB, Bark and Mel scales last mod: $Id: scales.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_SCALES_H_ #define _V_SCALES_H_ #include #include "os.h" /* 20log10(x) */ #define VORBIS_IEEE_FLOAT32 1 #ifdef VORBIS_IEEE_FLOAT32 static float unitnorm(float x){ union { ogg_uint32_t i; float f; } ix; ix.f = x; ix.i = (ix.i & 0x80000000U) | (0x3f800000U); return ix.f; } /* Segher was off (too high) by ~ .3 decibel. Center the conversion correctly. */ static float todB(const float *x){ union { ogg_uint32_t i; float f; } ix; ix.f = *x; ix.i = ix.i&0x7fffffff; return (float)(ix.i * 7.17711438e-7f -764.6161886f); } #define todB_nn(x) todB(x) #else static float unitnorm(float x){ if(x<0)return(-1.f); return(1.f); } #define todB(x) (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f) #define todB_nn(x) (*(x)==0.f?-400.f:log(*(x))*8.6858896f) #endif #define fromdB(x) (exp((x)*.11512925f)) /* The bark scale equations are approximations, since the original table was somewhat hand rolled. The below are chosen to have the best possible fit to the rolled tables, thus their somewhat odd appearance (these are more accurate and over a longer range than the oft-quoted bark equations found in the texts I have). The approximations are valid from 0 - 30kHz (nyquist) or so. all f in Hz, z in Bark */ #define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n)) #define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f) #define toMEL(n) (log(1.f+(n)*.001f)*1442.695f) #define fromMEL(m) (1000.f*exp((m)/1442.695f)-1000.f) /* Frequency to octave. We arbitrarily declare 63.5 Hz to be octave 0.0 */ #define toOC(n) (log(n)*1.442695f-5.965784f) #define fromOC(o) (exp(((o)+5.965784f)*.693147f)) #endif ================================================ FILE: 3rdParty/libvorbis/include/setup_11.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: 11kHz settings last mod: $Id: setup_11.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "psych_11.h" static int blocksize_11[2]={ 512,512 }; static int _floor_mapping_11[2]={ 6,6, }; static double rate_mapping_11[3]={ 8000.,13000.,44000., }; static double rate_mapping_11_uncoupled[3]={ 12000.,20000.,50000., }; static double quality_mapping_11[3]={ -.1,.0,1. }; ve_setup_data_template ve_setup_11_stereo={ 2, rate_mapping_11, quality_mapping_11, 2, 9000, 15000, blocksize_11, blocksize_11, _psy_tone_masteratt_11, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_11, NULL, _vp_tonemask_adj_11, _psy_noiseguards_8, _psy_noisebias_11, _psy_noisebias_11, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_11, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_11, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_11, NULL, _mapres_template_8_stereo }; ve_setup_data_template ve_setup_11_uncoupled={ 2, rate_mapping_11_uncoupled, quality_mapping_11, -1, 9000, 15000, blocksize_11, blocksize_11, _psy_tone_masteratt_11, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_11, NULL, _vp_tonemask_adj_11, _psy_noiseguards_8, _psy_noisebias_11, _psy_noisebias_11, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_11, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_11, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_11, NULL, _mapres_template_8_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_16.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: 16kHz settings last mod: $Id: setup_16.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "psych_16.h" #include "residue_16.h" static int blocksize_16_short[3]={ 1024,512,512 }; static int blocksize_16_long[3]={ 1024,1024,1024 }; static int _floor_mapping_16_short[3]={ 9,3,3 }; static int _floor_mapping_16[3]={ 9,9,9 }; static double rate_mapping_16[4]={ 12000.,20000.,44000.,86000. }; static double rate_mapping_16_uncoupled[4]={ 16000.,28000.,64000.,100000. }; static double _global_mapping_16[4]={ 1., 2., 3., 4. }; static double quality_mapping_16[4]={ -.1,.05,.5,1. }; static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.}; ve_setup_data_template ve_setup_16_stereo={ 3, rate_mapping_16, quality_mapping_16, 2, 15000, 19000, blocksize_16_short, blocksize_16_long, _psy_tone_masteratt_16, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _psy_noiseguards_16, _psy_noisebias_16_impulse, _psy_noisebias_16_short, _psy_noisebias_16_short, _psy_noisebias_16, _psy_noise_suppress, _psy_compand_8, _psy_compand_16_mapping, _psy_compand_16_mapping, {_noise_start_16,_noise_start_16}, { _noise_part_16, _noise_part_16}, _noise_thresh_16, _psy_ath_floater_16, _psy_ath_abs_16, _psy_lowpass_16, _psy_global_44, _global_mapping_16, _psy_stereo_modes_16, _floor_books, _floor, _floor_mapping_16_short, _floor_mapping_16, _mapres_template_16_stereo }; ve_setup_data_template ve_setup_16_uncoupled={ 3, rate_mapping_16_uncoupled, quality_mapping_16, -1, 15000, 19000, blocksize_16_short, blocksize_16_long, _psy_tone_masteratt_16, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _psy_noiseguards_8, _psy_noisebias_16_impulse, _psy_noisebias_16_short, _psy_noisebias_16_short, _psy_noisebias_16, _psy_noise_suppress, _psy_compand_8, _psy_compand_16_mapping, _psy_compand_16_mapping, {_noise_start_16,_noise_start_16}, { _noise_part_16, _noise_part_16}, _noise_thresh_16, _psy_ath_floater_16, _psy_ath_abs_16, _psy_lowpass_16, _psy_global_44, _global_mapping_16, _psy_stereo_modes_16, _floor_books, _floor, _floor_mapping_16_short, _floor_mapping_16, _mapres_template_16_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_22.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: 22kHz settings last mod: $Id: setup_22.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ static double rate_mapping_22[4]={ 15000.,20000.,44000.,86000. }; static double rate_mapping_22_uncoupled[4]={ 16000.,28000.,50000.,90000. }; static double _psy_lowpass_22[4]={9.5,11.,30.,99.}; ve_setup_data_template ve_setup_22_stereo={ 3, rate_mapping_22, quality_mapping_16, 2, 19000, 26000, blocksize_16_short, blocksize_16_long, _psy_tone_masteratt_16, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _psy_noiseguards_16, _psy_noisebias_16_impulse, _psy_noisebias_16_short, _psy_noisebias_16_short, _psy_noisebias_16, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, _psy_compand_8_mapping, {_noise_start_16,_noise_start_16}, { _noise_part_16, _noise_part_16}, _noise_thresh_16, _psy_ath_floater_16, _psy_ath_abs_16, _psy_lowpass_22, _psy_global_44, _global_mapping_16, _psy_stereo_modes_16, _floor_books, _floor, _floor_mapping_16_short, _floor_mapping_16, _mapres_template_16_stereo }; ve_setup_data_template ve_setup_22_uncoupled={ 3, rate_mapping_22_uncoupled, quality_mapping_16, -1, 19000, 26000, blocksize_16_short, blocksize_16_long, _psy_tone_masteratt_16, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _vp_tonemask_adj_16, _psy_noiseguards_8, _psy_noisebias_16_impulse, _psy_noisebias_16_short, _psy_noisebias_16_short, _psy_noisebias_16, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, _psy_compand_8_mapping, {_noise_start_16,_noise_start_16}, { _noise_part_16, _noise_part_16}, _noise_thresh_16, _psy_ath_floater_16, _psy_ath_abs_16, _psy_lowpass_22, _psy_global_44, _global_mapping_16, _psy_stereo_modes_16, _floor_books, _floor, _floor_mapping_16_short, _floor_mapping_16, _mapres_template_16_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_32.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel settings for 32kHz last mod: $Id: setup_32.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ static double rate_mapping_32[12]={ 18000.,28000.,35000.,45000.,56000.,60000., 75000.,90000.,100000.,115000.,150000.,190000., }; static double rate_mapping_32_un[12]={ 30000.,42000.,52000.,64000.,72000.,78000., 86000.,92000.,110000.,120000.,140000.,190000., }; static double _psy_lowpass_32[12]={ 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. }; ve_setup_data_template ve_setup_32_stereo={ 11, rate_mapping_32, quality_mapping_44, 2, 26000, 40000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_32, _psy_global_44, _global_mapping_44, _psy_stereo_modes_44, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_stereo }; ve_setup_data_template ve_setup_32_uncoupled={ 11, rate_mapping_32_un, quality_mapping_44, -1, 26000, 40000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_32, _psy_global_44, _global_mapping_44, NULL, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_44.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel settings for 44.1/48kHz last mod: $Id: setup_44.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "modes/floor_all.h" #include "modes/residue_44.h" #include "modes/psych_44.h" static double rate_mapping_44_stereo[12]={ 22500.,32000.,40000.,48000.,56000.,64000., 80000.,96000.,112000.,128000.,160000.,250001. }; static double quality_mapping_44[12]={ -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 }; static int blocksize_short_44[11]={ 512,256,256,256,256,256,256,256,256,256,256 }; static int blocksize_long_44[11]={ 4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 }; static double _psy_compand_short_mapping[12]={ 0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. }; static double _psy_compand_long_mapping[12]={ 3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. }; static double _global_mapping_44[12]={ /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. }; static int _floor_short_mapping_44[11]={ 1,0,0,2,2,4,5,5,5,5,5 }; static int _floor_long_mapping_44[11]={ 8,7,7,7,7,7,7,7,7,7,7 }; ve_setup_data_template ve_setup_44_stereo={ 11, rate_mapping_44_stereo, quality_mapping_44, 2, 40000, 50000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_44, _psy_global_44, _global_mapping_44, _psy_stereo_modes_44, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_stereo }; ================================================ FILE: 3rdParty/libvorbis/include/setup_44u.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: toplevel settings for 44.1/48kHz uncoupled modes last mod: $Id: setup_44u.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "modes/residue_44u.h" static double rate_mapping_44_un[12]={ 32000.,48000.,60000.,70000.,80000.,86000., 96000.,110000.,120000.,140000.,160000.,240001. }; ve_setup_data_template ve_setup_44_uncoupled={ 11, rate_mapping_44_un, quality_mapping_44, -1, 40000, 50000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_44, _psy_global_44, _global_mapping_44, NULL, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_8.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: 8kHz settings last mod: $Id: setup_8.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include "psych_8.h" #include "residue_8.h" static int blocksize_8[2]={ 512,512 }; static int _floor_mapping_8[2]={ 6,6, }; static double rate_mapping_8[3]={ 6000.,9000.,32000., }; static double rate_mapping_8_uncoupled[3]={ 8000.,14000.,42000., }; static double quality_mapping_8[3]={ -.1,.0,1. }; static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; static double _global_mapping_8[3]={ 1., 2., 3. }; ve_setup_data_template ve_setup_8_stereo={ 2, rate_mapping_8, quality_mapping_8, 2, 8000, 9000, blocksize_8, blocksize_8, _psy_tone_masteratt_8, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_8, NULL, _vp_tonemask_adj_8, _psy_noiseguards_8, _psy_noisebias_8, _psy_noisebias_8, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_5only, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_8, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_8, NULL, _mapres_template_8_stereo }; ve_setup_data_template ve_setup_8_uncoupled={ 2, rate_mapping_8_uncoupled, quality_mapping_8, -1, 8000, 9000, blocksize_8, blocksize_8, _psy_tone_masteratt_8, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_8, NULL, _vp_tonemask_adj_8, _psy_noiseguards_8, _psy_noisebias_8, _psy_noisebias_8, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_5only, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_8, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_8, NULL, _mapres_template_8_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/setup_X.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: catch-all toplevel settings for q modes only last mod: $Id: setup_X.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ static double rate_mapping_X[12]={ -1.,-1.,-1.,-1.,-1.,-1., -1.,-1.,-1.,-1.,-1.,-1. }; ve_setup_data_template ve_setup_X_stereo={ 11, rate_mapping_X, quality_mapping_44, 2, 50000, 200000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_44, _psy_global_44, _global_mapping_44, _psy_stereo_modes_44, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_stereo }; ve_setup_data_template ve_setup_X_uncoupled={ 11, rate_mapping_X, quality_mapping_44, -1, 50000, 200000, blocksize_short_44, blocksize_long_44, _psy_tone_masteratt_44, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_otherblock, _vp_tonemask_adj_longblock, _vp_tonemask_adj_otherblock, _psy_noiseguards_44, _psy_noisebias_impulse, _psy_noisebias_padding, _psy_noisebias_trans, _psy_noisebias_long, _psy_noise_suppress, _psy_compand_44, _psy_compand_short_mapping, _psy_compand_long_mapping, {_noise_start_short_44,_noise_start_long_44}, {_noise_part_short_44,_noise_part_long_44}, _noise_thresh_44, _psy_ath_floater, _psy_ath_abs, _psy_lowpass_44, _psy_global_44, _global_mapping_44, NULL, _floor_books, _floor, _floor_short_mapping_44, _floor_long_mapping_44, _mapres_template_44_uncoupled }; ve_setup_data_template ve_setup_XX_stereo={ 2, rate_mapping_X, quality_mapping_8, 2, 0, 8000, blocksize_8, blocksize_8, _psy_tone_masteratt_8, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_8, NULL, _vp_tonemask_adj_8, _psy_noiseguards_8, _psy_noisebias_8, _psy_noisebias_8, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_5only, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_8, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_8, NULL, _mapres_template_8_stereo }; ve_setup_data_template ve_setup_XX_uncoupled={ 2, rate_mapping_X, quality_mapping_8, -1, 0, 8000, blocksize_8, blocksize_8, _psy_tone_masteratt_8, _psy_tone_0dB, _psy_tone_suppress, _vp_tonemask_adj_8, NULL, _vp_tonemask_adj_8, _psy_noiseguards_8, _psy_noisebias_8, _psy_noisebias_8, NULL, NULL, _psy_noise_suppress, _psy_compand_8, _psy_compand_8_mapping, NULL, {_noise_start_8,_noise_start_8}, {_noise_part_8,_noise_part_8}, _noise_thresh_5only, _psy_ath_floater_8, _psy_ath_abs_8, _psy_lowpass_8, _psy_global_44, _global_mapping_8, _psy_stereo_modes_8, _floor_books, _floor, _floor_mapping_8, NULL, _mapres_template_8_uncoupled }; ================================================ FILE: 3rdParty/libvorbis/include/sharedbook.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: basic shared codebook operations last mod: $Id: sharedbook.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include #include "os.h" #include "misc.h" #include "vorbis/codec.h" #include "codebook.h" #include "scales.h" /**** pack/unpack helpers ******************************************/ int _ilog(unsigned int v){ int ret=0; while(v){ ret++; v>>=1; } return(ret); } /* 32 bit float (not IEEE; nonnormalized mantissa + biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm Why not IEEE? It's just not that important here. */ #define VQ_FEXP 10 #define VQ_FMAN 21 #define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */ /* doesn't currently guard under/overflow */ long _float32_pack(float val){ int sign=0; long exp; long mant; if(val<0){ sign=0x80000000; val= -val; } exp= floor(log(val)/log(2.f)); mant=rint(ldexp(val,(VQ_FMAN-1)-exp)); exp=(exp+VQ_FEXP_BIAS)<>VQ_FMAN; if(sign)mant= -mant; return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS)); } /* given a list of word lengths, generate a list of codewords. Works for length ordered or unordered, always assigns the lowest valued codewords first. Extended to handle unused entries (length 0) */ ogg_uint32_t *_make_words(long *l,long n,long sparsecount){ long i,j,count=0; ogg_uint32_t marker[33]; ogg_uint32_t *r=_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r)); memset(marker,0,sizeof(marker)); for(i=0;i0){ ogg_uint32_t entry=marker[length]; /* when we claim a node for an entry, we also claim the nodes below it (pruning off the imagined tree that may have dangled from it) as well as blocking the use of any nodes directly above for leaves */ /* update ourself */ if(length<32 && (entry>>length)){ /* error condition; the lengths must specify an overpopulated tree */ _ogg_free(r); return(NULL); } r[count++]=entry; /* Look to see if the next shorter marker points to the node above. if so, update it and repeat. */ { for(j=length;j>0;j--){ if(marker[j]&1){ /* have to jump branches */ if(j==1) marker[1]++; else marker[j]=marker[j-1]<<1; break; /* invariant says next upper marker would already have been moved if it was on the same path */ } marker[j]++; } } /* prune the tree; the implicit invariant says all the longer markers were dangling from our just-taken node. Dangle them from our *new* node. */ for(j=length+1;j<33;j++) if((marker[j]>>1) == entry){ entry=marker[j]; marker[j]=marker[j-1]<<1; }else break; }else if(sparsecount==0)count++; } /* bitreverse the words because our bitwise packer/unpacker is LSb endian */ for(i=0,count=0;i>j)&1; } if(sparsecount){ if(l[i]) r[count++]=temp; }else r[count++]=temp; } return(r); } /* there might be a straightforward one-line way to do the below that's portable and totally safe against roundoff, but I haven't thought of it. Therefore, we opt on the side of caution */ long _book_maptype1_quantvals(const static_codebook *b){ long vals=floor(pow((float)b->entries,1.f/b->dim)); /* the above *should* be reliable, but we'll not assume that FP is ever reliable when bitstream sync is at stake; verify via integer means that vals really is the greatest value of dim for which vals^b->bim <= b->entries */ /* treat the above as an initial guess */ while(1){ long acc=1; long acc1=1; int i; for(i=0;idim;i++){ acc*=vals; acc1*=vals+1; } if(acc<=b->entries && acc1>b->entries){ return(vals); }else{ if(acc>b->entries){ vals--; }else{ vals++; } } } } /* unpack the quantized list of values for encode/decode ***********/ /* we need to deal with two map types: in map type 1, the values are generated algorithmically (each column of the vector counts through the values in the quant vector). in map type 2, all the values came in in an explicit list. Both value lists must be unpacked */ float *_book_unquantize(const static_codebook *b,int n,int *sparsemap){ long j,k,count=0; if(b->maptype==1 || b->maptype==2){ int quantvals; float mindel=_float32_unpack(b->q_min); float delta=_float32_unpack(b->q_delta); float *r=_ogg_calloc(n*b->dim,sizeof(*r)); /* maptype 1 and 2 both use a quantized value vector, but different sizes */ switch(b->maptype){ case 1: /* most of the time, entries%dimensions == 0, but we need to be well defined. We define that the possible vales at each scalar is values == entries/dim. If entries%dim != 0, we'll have 'too few' values (values*dimentries;j++){ if((sparsemap && b->lengthlist[j]) || !sparsemap){ float last=0.f; int indexdiv=1; for(k=0;kdim;k++){ int index= (j/indexdiv)%quantvals; float val=b->quantlist[index]; val=fabs(val)*delta+mindel+last; if(b->q_sequencep)last=val; if(sparsemap) r[sparsemap[count]*b->dim+k]=val; else r[count*b->dim+k]=val; indexdiv*=quantvals; } count++; } } break; case 2: for(j=0;jentries;j++){ if((sparsemap && b->lengthlist[j]) || !sparsemap){ float last=0.f; for(k=0;kdim;k++){ float val=b->quantlist[j*b->dim+k]; val=fabs(val)*delta+mindel+last; if(b->q_sequencep)last=val; if(sparsemap) r[sparsemap[count]*b->dim+k]=val; else r[count*b->dim+k]=val; } count++; } } break; } return(r); } return(NULL); } void vorbis_staticbook_clear(static_codebook *b){ if(b->allocedp){ if(b->quantlist)_ogg_free(b->quantlist); if(b->lengthlist)_ogg_free(b->lengthlist); if(b->nearest_tree){ _ogg_free(b->nearest_tree->ptr0); _ogg_free(b->nearest_tree->ptr1); _ogg_free(b->nearest_tree->p); _ogg_free(b->nearest_tree->q); memset(b->nearest_tree,0,sizeof(*b->nearest_tree)); _ogg_free(b->nearest_tree); } if(b->thresh_tree){ _ogg_free(b->thresh_tree->quantthresh); _ogg_free(b->thresh_tree->quantmap); memset(b->thresh_tree,0,sizeof(*b->thresh_tree)); _ogg_free(b->thresh_tree); } memset(b,0,sizeof(*b)); } } void vorbis_staticbook_destroy(static_codebook *b){ if(b->allocedp){ vorbis_staticbook_clear(b); _ogg_free(b); } } void vorbis_book_clear(codebook *b){ /* static book is not cleared; we're likely called on the lookup and the static codebook belongs to the info struct */ if(b->valuelist)_ogg_free(b->valuelist); if(b->codelist)_ogg_free(b->codelist); if(b->dec_index)_ogg_free(b->dec_index); if(b->dec_codelengths)_ogg_free(b->dec_codelengths); if(b->dec_firsttable)_ogg_free(b->dec_firsttable); memset(b,0,sizeof(*b)); } int vorbis_book_init_encode(codebook *c,const static_codebook *s){ memset(c,0,sizeof(*c)); c->c=s; c->entries=s->entries; c->used_entries=s->entries; c->dim=s->dim; c->codelist=_make_words(s->lengthlist,s->entries,0); c->valuelist=_book_unquantize(s,s->entries,NULL); return(0); } static ogg_uint32_t bitreverse(ogg_uint32_t x){ x= ((x>>16)&0x0000ffffUL) | ((x<<16)&0xffff0000UL); x= ((x>> 8)&0x00ff00ffUL) | ((x<< 8)&0xff00ff00UL); x= ((x>> 4)&0x0f0f0f0fUL) | ((x<< 4)&0xf0f0f0f0UL); x= ((x>> 2)&0x33333333UL) | ((x<< 2)&0xccccccccUL); return((x>> 1)&0x55555555UL) | ((x<< 1)&0xaaaaaaaaUL); } static int sort32a(const void *a,const void *b){ return ( **(ogg_uint32_t **)a>**(ogg_uint32_t **)b)- ( **(ogg_uint32_t **)a<**(ogg_uint32_t **)b); } /* decode codebook arrangement is more heavily optimized than encode */ int vorbis_book_init_decode(codebook *c,const static_codebook *s){ int i,j,n=0,tabn; int *sortindex; memset(c,0,sizeof(*c)); /* count actually used entries */ for(i=0;ientries;i++) if(s->lengthlist[i]>0) n++; c->entries=s->entries; c->used_entries=n; c->dim=s->dim; if(n>0){ /* two different remappings go on here. First, we collapse the likely sparse codebook down only to actually represented values/words. This collapsing needs to be indexed as map-valueless books are used to encode original entry positions as integers. Second, we reorder all vectors, including the entry index above, by sorted bitreversed codeword to allow treeless decode. */ /* perform sort */ ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); ogg_uint32_t **codep=alloca(sizeof(*codep)*n); if(codes==NULL)goto err_out; for(i=0;icodelist=_ogg_malloc(n*sizeof(*c->codelist)); /* the index is a reverse index */ for(i=0;icodelist[sortindex[i]]=codes[i]; _ogg_free(codes); c->valuelist=_book_unquantize(s,n,sortindex); c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index)); for(n=0,i=0;ientries;i++) if(s->lengthlist[i]>0) c->dec_index[sortindex[n++]]=i; c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths)); for(n=0,i=0;ientries;i++) if(s->lengthlist[i]>0) c->dec_codelengths[sortindex[n++]]=s->lengthlist[i]; c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */ if(c->dec_firsttablen<5)c->dec_firsttablen=5; if(c->dec_firsttablen>8)c->dec_firsttablen=8; tabn=1<dec_firsttablen; c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable)); c->dec_maxlength=0; for(i=0;idec_maxlengthdec_codelengths[i]) c->dec_maxlength=c->dec_codelengths[i]; if(c->dec_codelengths[i]<=c->dec_firsttablen){ ogg_uint32_t orig=bitreverse(c->codelist[i]); for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++) c->dec_firsttable[orig|(j<dec_codelengths[i])]=i+1; } } /* now fill in 'unused' entries in the firsttable with hi/lo search hints for the non-direct-hits */ { ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen); long lo=0,hi=0; for(i=0;idec_firsttablen); if(c->dec_firsttable[bitreverse(word)]==0){ while((lo+1)codelist[lo+1]<=word)lo++; while( hi=(c->codelist[hi]&mask))hi++; /* we only actually have 15 bits per hint to play with here. In order to overflow gracefully (nothing breaks, efficiency just drops), encode as the difference from the extremes. */ { unsigned long loval=lo; unsigned long hival=n-hi; if(loval>0x7fff)loval=0x7fff; if(hival>0x7fff)hival=0x7fff; c->dec_firsttable[bitreverse(word)]= 0x80000000UL | (loval<<15) | hival; } } } } } return(0); err_out: vorbis_book_clear(c); return(-1); } static float _dist(int el,float *ref, float *b,int step){ int i; float acc=0.f; for(i=0;ic->thresh_tree; #if 0 encode_aux_nearestmatch *nt=book->c->nearest_tree; encode_aux_pigeonhole *pt=book->c->pigeon_tree; #endif int dim=book->dim; int k,o; /*int savebest=-1; float saverr;*/ /* do we have a threshhold encode hint? */ if(tt){ int index=0,i; /* find the quant val of each scalar */ for(k=0,o=step*(dim-1);kthreshvals>>1; if(a[o]quantthresh[i]){ for(;i>0;i--) if(a[o]>=tt->quantthresh[i-1]) break; }else{ for(i++;ithreshvals-1;i++) if(a[o]quantthresh[i])break; } index=(index*tt->quantvals)+tt->quantmap[i]; } /* regular lattices are easy :-) */ if(book->c->lengthlist[index]>0) /* is this unused? If so, we'll use a decision tree after all and fall through*/ return(index); } #if 0 /* do we have a pigeonhole encode hint? */ if(pt){ const static_codebook *c=book->c; int i,besti=-1; float best=0.f; int entry=0; /* dealing with sequentialness is a pain in the ass */ if(c->q_sequencep){ int pv; long mul=1; float qlast=0; for(k=0,o=0;kmin)/pt->del); if(pv<0 || pv>=pt->mapentries)break; entry+=pt->pigeonmap[pv]*mul; mul*=pt->quantvals; qlast+=pv*pt->del+pt->min; } }else{ for(k=0,o=step*(dim-1);kmin)/pt->del); if(pv<0 || pv>=pt->mapentries)break; entry=entry*pt->quantvals+pt->pigeonmap[pv]; } } /* must be within the pigeonholable range; if we quant outside (or in an entry that we define no list for), brute force it */ if(k==dim && pt->fitlength[entry]){ /* search the abbreviated list */ long *list=pt->fitlist+pt->fitmap[entry]; for(i=0;ifitlength[entry];i++){ float this=_dist(dim,book->valuelist+list[i]*dim,a,step); if(besti==-1 || thisvaluelist+nt->p[ptr]; float *q=book->valuelist+nt->q[ptr]; for(k=0,o=0;k0.f) /* in A */ ptr= -nt->ptr0[ptr]; else /* in B */ ptr= -nt->ptr1[ptr]; if(ptr<=0)break; } return(-ptr); } #endif /* brute force it! */ { const static_codebook *c=book->c; int i,besti=-1; float best=0.f; float *e=book->valuelist; for(i=0;ientries;i++){ if(c->lengthlist[i]>0){ float this=_dist(dim,e,a,step); if(besti==-1 || thisvaluelist+savebest*dim)[i]); fprintf(stderr,"\n" "bruteforce (entry %d, err %g):",besti,best); for(i=0;ivaluelist+besti*dim)[i]); fprintf(stderr,"\n"); }*/ return(besti); } } long vorbis_book_codeword(codebook *book,int entry){ if(book->c) /* only use with encode; decode optimizations are allowed to break this */ return book->codelist[entry]; return -1; } long vorbis_book_codelen(codebook *book,int entry){ if(book->c) /* only use with encode; decode optimizations are allowed to break this */ return book->c->lengthlist[entry]; return -1; } #ifdef _V_SELFTEST /* Unit tests of the dequantizer; this stuff will be OK cross-platform, I simply want to be sure that special mapping cases actually work properly; a bug could go unnoticed for a while */ #include /* cases: no mapping full, explicit mapping algorithmic mapping nonsequential sequential */ static long full_quantlist1[]={0,1,2,3, 4,5,6,7, 8,3,6,1}; static long partial_quantlist1[]={0,7,2}; /* no mapping */ static_codebook test1={ 4,16, NULL, 0, 0,0,0,0, NULL, NULL,NULL }; static float *test1_result=NULL; /* linear, full mapping, nonsequential */ static_codebook test2={ 4,3, NULL, 2, -533200896,1611661312,4,0, full_quantlist1, NULL,NULL }; static float test2_result[]={-3,-2,-1,0, 1,2,3,4, 5,0,3,-2}; /* linear, full mapping, sequential */ static_codebook test3={ 4,3, NULL, 2, -533200896,1611661312,4,1, full_quantlist1, NULL,NULL }; static float test3_result[]={-3,-5,-6,-6, 1,3,6,10, 5,5,8,6}; /* linear, algorithmic mapping, nonsequential */ static_codebook test4={ 3,27, NULL, 1, -533200896,1611661312,4,0, partial_quantlist1, NULL,NULL }; static float test4_result[]={-3,-3,-3, 4,-3,-3, -1,-3,-3, -3, 4,-3, 4, 4,-3, -1, 4,-3, -3,-1,-3, 4,-1,-3, -1,-1,-3, -3,-3, 4, 4,-3, 4, -1,-3, 4, -3, 4, 4, 4, 4, 4, -1, 4, 4, -3,-1, 4, 4,-1, 4, -1,-1, 4, -3,-3,-1, 4,-3,-1, -1,-3,-1, -3, 4,-1, 4, 4,-1, -1, 4,-1, -3,-1,-1, 4,-1,-1, -1,-1,-1}; /* linear, algorithmic mapping, sequential */ static_codebook test5={ 3,27, NULL, 1, -533200896,1611661312,4,1, partial_quantlist1, NULL,NULL }; static float test5_result[]={-3,-6,-9, 4, 1,-2, -1,-4,-7, -3, 1,-2, 4, 8, 5, -1, 3, 0, -3,-4,-7, 4, 3, 0, -1,-2,-5, -3,-6,-2, 4, 1, 5, -1,-4, 0, -3, 1, 5, 4, 8,12, -1, 3, 7, -3,-4, 0, 4, 3, 7, -1,-2, 2, -3,-6,-7, 4, 1, 0, -1,-4,-5, -3, 1, 0, 4, 8, 7, -1, 3, 2, -3,-4,-5, 4, 3, 2, -1,-2,-3}; void run_test(static_codebook *b,float *comp){ float *out=_book_unquantize(b,b->entries,NULL); int i; if(comp){ if(!out){ fprintf(stderr,"_book_unquantize incorrectly returned NULL\n"); exit(1); } for(i=0;ientries*b->dim;i++) if(fabs(out[i]-comp[i])>.0001){ fprintf(stderr,"disagreement in unquantized and reference data:\n" "position %d, %g != %g\n",i,out[i],comp[i]); exit(1); } }else{ if(out){ fprintf(stderr,"_book_unquantize returned a value array: \n" " correct result should have been NULL\n"); exit(1); } } } int main(){ /* run the nine dequant tests, and compare to the hand-rolled results */ fprintf(stderr,"Dequant test 1... "); run_test(&test1,test1_result); fprintf(stderr,"OK\nDequant test 2... "); run_test(&test2,test2_result); fprintf(stderr,"OK\nDequant test 3... "); run_test(&test3,test3_result); fprintf(stderr,"OK\nDequant test 4... "); run_test(&test4,test4_result); fprintf(stderr,"OK\nDequant test 5... "); run_test(&test5,test5_result); fprintf(stderr,"OK\n\n"); return(0); } #endif ================================================ FILE: 3rdParty/libvorbis/include/smallft.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: *unnormalized* fft transform last mod: $Id: smallft.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ /* FFT implementation from OggSquish, minus cosine transforms, * minus all but radix 2/4 case. In Vorbis we only need this * cut-down version. * * To do more than just power-of-two sized vectors, see the full * version I wrote for NetLib. * * Note that the packing is a little strange; rather than the FFT r/i * packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, * it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the * FORTRAN version */ #include #include #include #include "smallft.h" #include "os.h" #include "misc.h" static void drfti1(int n, float *wa, int *ifac){ static int ntryh[4] = { 4,2,3,5 }; static float tpi = 6.28318530717958648f; float arg,argh,argld,fi; int ntry=0,i,j=-1; int k1, l1, l2, ib; int ld, ii, ip, is, nq, nr; int ido, ipm, nfm1; int nl=n; int nf=0; L101: j++; if (j < 4) ntry=ntryh[j]; else ntry+=2; L104: nq=nl/ntry; nr=nl-ntry*nq; if (nr!=0) goto L101; nf++; ifac[nf+1]=ntry; nl=nq; if(ntry!=2)goto L107; if(nf==1)goto L107; for (i=1;i>1; ipp2=ip; idp2=ido; nbd=(ido-1)>>1; t0=l1*ido; t10=ip*ido; if(ido==1)goto L119; for(ik=0;ikl1){ for(j=1;j>1; ipp2=ip; ipph=(ip+1)>>1; if(idol1)goto L139; is= -ido-1; t1=0; for(j=1;jn==1)return; drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); } void drft_backward(drft_lookup *l,float *data){ if (l->n==1)return; drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); } void drft_init(drft_lookup *l,int n){ l->n=n; l->trigcache=_ogg_calloc(3*n,sizeof(*l->trigcache)); l->splitcache=_ogg_calloc(32,sizeof(*l->splitcache)); fdrffti(n, l->trigcache, l->splitcache); } void drft_clear(drft_lookup *l){ if(l){ if(l->trigcache)_ogg_free(l->trigcache); if(l->splitcache)_ogg_free(l->splitcache); memset(l,0,sizeof(*l)); } } ================================================ FILE: 3rdParty/libvorbis/include/smallft.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: fft transform last mod: $Id: smallft.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _V_SMFT_H_ #define _V_SMFT_H_ #include "vorbis/codec.h" typedef struct { int n; float *trigcache; int *splitcache; } drft_lookup; extern void drft_forward(drft_lookup *l,float *data); extern void drft_backward(drft_lookup *l,float *data); extern void drft_init(drft_lookup *l,int n); extern void drft_clear(drft_lookup *l); #endif ================================================ FILE: 3rdParty/libvorbis/include/synthesis.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: single-block PCM synthesis last mod: $Id: synthesis.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include "vorbis/codec.h" #include "codec_internal.h" #include "registry.h" #include "misc.h" #include "os.h" int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ vorbis_dsp_state *vd=vb->vd; private_state *b=vd->backend_state; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; oggpack_buffer *opb=&vb->opb; int type,mode,i; /* first things first. Make sure decode is ready */ _vorbis_block_ripcord(vb); oggpack_readinit(opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(opb,1)!=0){ /* Oops. This is not an audio data packet */ return(OV_ENOTAUDIO); } /* read our mode and pre/post windowsize */ mode=oggpack_read(opb,b->modebits); if(mode==-1)return(OV_EBADPACKET); vb->mode=mode; vb->W=ci->mode_param[mode]->blockflag; if(vb->W){ /* this doesn;t get mapped through mode selection as it's used only for window selection */ vb->lW=oggpack_read(opb,1); vb->nW=oggpack_read(opb,1); if(vb->nW==-1) return(OV_EBADPACKET); }else{ vb->lW=0; vb->nW=0; } /* more setup */ vb->granulepos=op->granulepos; vb->sequence=op->packetno; vb->eofflag=op->e_o_s; /* alloc pcm passback storage */ vb->pcmend=ci->blocksizes[vb->W]; vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); for(i=0;ichannels;i++) vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); /* unpack_header enforces range checking */ type=ci->map_type[ci->mode_param[mode]->mapping]; return(_mapping_P[type]->inverse(vb,ci->map_param[ci->mode_param[mode]-> mapping])); } /* used to track pcm position without actually performing decode. Useful for sequential 'fast forward' */ int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){ vorbis_dsp_state *vd=vb->vd; private_state *b=vd->backend_state; vorbis_info *vi=vd->vi; codec_setup_info *ci=vi->codec_setup; oggpack_buffer *opb=&vb->opb; int mode; /* first things first. Make sure decode is ready */ _vorbis_block_ripcord(vb); oggpack_readinit(opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(opb,1)!=0){ /* Oops. This is not an audio data packet */ return(OV_ENOTAUDIO); } /* read our mode and pre/post windowsize */ mode=oggpack_read(opb,b->modebits); if(mode==-1)return(OV_EBADPACKET); vb->mode=mode; vb->W=ci->mode_param[mode]->blockflag; if(vb->W){ vb->lW=oggpack_read(opb,1); vb->nW=oggpack_read(opb,1); if(vb->nW==-1) return(OV_EBADPACKET); }else{ vb->lW=0; vb->nW=0; } /* more setup */ vb->granulepos=op->granulepos; vb->sequence=op->packetno; vb->eofflag=op->e_o_s; /* no pcm */ vb->pcmend=0; vb->pcm=NULL; return(0); } long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ codec_setup_info *ci=vi->codec_setup; oggpack_buffer opb; int mode; oggpack_readinit(&opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(&opb,1)!=0){ /* Oops. This is not an audio data packet */ return(OV_ENOTAUDIO); } { int modebits=0; int v=ci->modes; while(v>1){ modebits++; v>>=1; } /* read our mode and pre/post windowsize */ mode=oggpack_read(&opb,modebits); } if(mode==-1)return(OV_EBADPACKET); return(ci->blocksizes[ci->mode_param[mode]->blockflag]); } int vorbis_synthesis_halfrate(vorbis_info *vi,int flag){ /* set / clear half-sample-rate mode */ codec_setup_info *ci=vi->codec_setup; /* right now, our MDCT can't handle < 64 sample windows. */ if(ci->blocksizes[0]<=64 && flag)return -1; ci->halfrate_flag=(flag?1:0); return 0; } int vorbis_synthesis_halfrate_p(vorbis_info *vi){ codec_setup_info *ci=vi->codec_setup; return ci->halfrate_flag; } ================================================ FILE: 3rdParty/libvorbis/include/tone.c ================================================ #include #include #include #include void usage(){ fprintf(stderr,"tone ,[] [,[]...]\n"); exit(1); } int main (int argc,char *argv[]){ int i,j; double *f; double *amp; if(argc<2)usage(); f=alloca(sizeof(*f)*(argc-1)); amp=alloca(sizeof(*amp)*(argc-1)); i=0; while(argv[i+1]){ char *pos=strchr(argv[i+1],','); f[i]=atof(argv[i+1]); if(pos) amp[i]=atof(pos+1)*32767.f; else amp[i]=32767.f; fprintf(stderr,"%g Hz, %g amp\n",f[i],amp[i]); i++; } for(i=0;i<44100*10;i++){ float val=0; int ival; for(j=0;j32767.f)ival=32767.f; if(ival<-32768.f)ival=-32768.f; fprintf(stdout,"%c%c%c%c", (char)(ival&0xff), (char)((ival>>8)&0xff), (char)(ival&0xff), (char)((ival>>8)&0xff)); } return(0); } ================================================ FILE: 3rdParty/libvorbis/include/vorbisenc.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: simple programmatic interface for encoder mode setup last mod: $Id: vorbisenc.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include #include "vorbis/codec.h" #include "vorbis/vorbisenc.h" #include "codec_internal.h" #include "os.h" #include "misc.h" /* careful with this; it's using static array sizing to make managing all the modes a little less annoying. If we use a residue backend with > 12 partition types, or a different division of iteration, this needs to be updated. */ typedef struct { static_codebook *books[12][3]; } static_bookblock; typedef struct { int res_type; int limit_type; /* 0 lowpass limited, 1 point stereo limited */ vorbis_info_residue0 *res; static_codebook *book_aux; static_codebook *book_aux_managed; static_bookblock *books_base; static_bookblock *books_base_managed; } vorbis_residue_template; typedef struct { vorbis_info_mapping0 *map; vorbis_residue_template *res; } vorbis_mapping_template; typedef struct vp_adjblock{ int block[P_BANDS]; } vp_adjblock; typedef struct { int data[NOISE_COMPAND_LEVELS]; } compandblock; /* high level configuration information for setting things up step-by-step with the detailed vorbis_encode_ctl interface. There's a fair amount of redundancy such that interactive setup does not directly deal with any vorbis_info or codec_setup_info initialization; it's all stored (until full init) in this highlevel setup, then flushed out to the real codec setup structs later. */ typedef struct { int att[P_NOISECURVES]; float boost; float decay; } att3; typedef struct { int data[P_NOISECURVES]; } adj3; typedef struct { int pre[PACKETBLOBS]; int post[PACKETBLOBS]; float kHz[PACKETBLOBS]; float lowpasskHz[PACKETBLOBS]; } adj_stereo; typedef struct { int lo; int hi; int fixed; } noiseguard; typedef struct { int data[P_NOISECURVES][17]; } noise3; typedef struct { int mappings; double *rate_mapping; double *quality_mapping; int coupling_restriction; long samplerate_min_restriction; long samplerate_max_restriction; int *blocksize_short; int *blocksize_long; att3 *psy_tone_masteratt; int *psy_tone_0dB; int *psy_tone_dBsuppress; vp_adjblock *psy_tone_adj_impulse; vp_adjblock *psy_tone_adj_long; vp_adjblock *psy_tone_adj_other; noiseguard *psy_noiseguards; noise3 *psy_noise_bias_impulse; noise3 *psy_noise_bias_padding; noise3 *psy_noise_bias_trans; noise3 *psy_noise_bias_long; int *psy_noise_dBsuppress; compandblock *psy_noise_compand; double *psy_noise_compand_short_mapping; double *psy_noise_compand_long_mapping; int *psy_noise_normal_start[2]; int *psy_noise_normal_partition[2]; double *psy_noise_normal_thresh; int *psy_ath_float; int *psy_ath_abs; double *psy_lowpass; vorbis_info_psy_global *global_params; double *global_mapping; adj_stereo *stereo_modes; static_codebook ***floor_books; vorbis_info_floor1 *floor_params; int *floor_short_mapping; int *floor_long_mapping; vorbis_mapping_template *maps; } ve_setup_data_template; /* a few static coder conventions */ static vorbis_info_mode _mode_template[2]={ {0,0,0,0}, {1,0,0,1} }; static vorbis_info_mapping0 _map_nominal[2]={ {1, {0,0}, {0}, {0}, 1,{0},{1}}, {1, {0,0}, {1}, {1}, 1,{0},{1}} }; #include "modes/setup_44.h" #include "modes/setup_44u.h" #include "modes/setup_32.h" #include "modes/setup_8.h" #include "modes/setup_11.h" #include "modes/setup_16.h" #include "modes/setup_22.h" #include "modes/setup_X.h" static ve_setup_data_template *setup_list[]={ &ve_setup_44_stereo, &ve_setup_44_uncoupled, &ve_setup_32_stereo, &ve_setup_32_uncoupled, &ve_setup_22_stereo, &ve_setup_22_uncoupled, &ve_setup_16_stereo, &ve_setup_16_uncoupled, &ve_setup_11_stereo, &ve_setup_11_uncoupled, &ve_setup_8_stereo, &ve_setup_8_uncoupled, &ve_setup_X_stereo, &ve_setup_X_uncoupled, &ve_setup_XX_stereo, &ve_setup_XX_uncoupled, 0 }; static int vorbis_encode_toplevel_setup(vorbis_info *vi,int ch,long rate){ if(vi && vi->codec_setup){ vi->version=0; vi->channels=ch; vi->rate=rate; return(0); } return(OV_EINVAL); } static void vorbis_encode_floor_setup(vorbis_info *vi,double s,int block, static_codebook ***books, vorbis_info_floor1 *in, int *x){ int i,k,is=s; vorbis_info_floor1 *f=_ogg_calloc(1,sizeof(*f)); codec_setup_info *ci=vi->codec_setup; memcpy(f,in+x[is],sizeof(*f)); /* fill in the lowpass field, even if it's temporary */ f->n=ci->blocksizes[block]>>1; /* books */ { int partitions=f->partitions; int maxclass=-1; int maxbook=-1; for(i=0;ipartitionclass[i]>maxclass)maxclass=f->partitionclass[i]; for(i=0;i<=maxclass;i++){ if(f->class_book[i]>maxbook)maxbook=f->class_book[i]; f->class_book[i]+=ci->books; for(k=0;k<(1<class_subs[i]);k++){ if(f->class_subbook[i][k]>maxbook)maxbook=f->class_subbook[i][k]; if(f->class_subbook[i][k]>=0)f->class_subbook[i][k]+=ci->books; } } for(i=0;i<=maxbook;i++) ci->book_param[ci->books++]=books[x[is]][i]; } /* for now, we're only using floor 1 */ ci->floor_type[ci->floors]=1; ci->floor_param[ci->floors]=f; ci->floors++; return; } static void vorbis_encode_global_psych_setup(vorbis_info *vi,double s, vorbis_info_psy_global *in, double *x){ int i,is=s; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *g=&ci->psy_g_param; memcpy(g,in+(int)x[is],sizeof(*g)); ds=x[is]*(1.-ds)+x[is+1]*ds; is=(int)ds; ds-=is; if(ds==0 && is>0){ is--; ds=1.; } /* interpolate the trigger threshholds */ for(i=0;i<4;i++){ g->preecho_thresh[i]=in[is].preecho_thresh[i]*(1.-ds)+in[is+1].preecho_thresh[i]*ds; g->postecho_thresh[i]=in[is].postecho_thresh[i]*(1.-ds)+in[is+1].postecho_thresh[i]*ds; } g->ampmax_att_per_sec=ci->hi.amplitude_track_dBpersec; return; } static void vorbis_encode_global_stereo(vorbis_info *vi, highlevel_encode_setup *hi, adj_stereo *p){ float s=hi->stereo_point_setting; int i,is=s; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy_global *g=&ci->psy_g_param; if(p){ memcpy(g->coupling_prepointamp,p[is].pre,sizeof(*p[is].pre)*PACKETBLOBS); memcpy(g->coupling_postpointamp,p[is].post,sizeof(*p[is].post)*PACKETBLOBS); if(hi->managed){ /* interpolate the kHz threshholds */ for(i=0;icoupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; g->coupling_pkHz[i]=kHz; kHz=p[is].lowpasskHz[i]*(1.-ds)+p[is+1].lowpasskHz[i]*ds; g->sliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; } }else{ float kHz=p[is].kHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].kHz[PACKETBLOBS/2]*ds; for(i=0;icoupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; g->coupling_pkHz[i]=kHz; } kHz=p[is].lowpasskHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].lowpasskHz[PACKETBLOBS/2]*ds; for(i=0;isliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; } } }else{ for(i=0;isliding_lowpass[0][i]=ci->blocksizes[0]; g->sliding_lowpass[1][i]=ci->blocksizes[1]; } } return; } static void vorbis_encode_psyset_setup(vorbis_info *vi,double s, int *nn_start, int *nn_partition, double *nn_thresh, int block){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; highlevel_encode_setup *hi=&ci->hi; int is=s; if(block>=ci->psys) ci->psys=block+1; if(!p){ p=_ogg_calloc(1,sizeof(*p)); ci->psy_param[block]=p; } memcpy(p,&_psy_info_template,sizeof(*p)); p->blockflag=block>>1; if(hi->noise_normalize_p){ p->normal_channel_p=1; p->normal_point_p=1; p->normal_start=nn_start[is]; p->normal_partition=nn_partition[is]; p->normal_thresh=nn_thresh[is]; } return; } static void vorbis_encode_tonemask_setup(vorbis_info *vi,double s,int block, att3 *att, int *max, vp_adjblock *in){ int i,is=s; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; /* 0 and 2 are only used by bitmanagement, but there's no harm to always filling the values in here */ p->tone_masteratt[0]=att[is].att[0]*(1.-ds)+att[is+1].att[0]*ds; p->tone_masteratt[1]=att[is].att[1]*(1.-ds)+att[is+1].att[1]*ds; p->tone_masteratt[2]=att[is].att[2]*(1.-ds)+att[is+1].att[2]*ds; p->tone_centerboost=att[is].boost*(1.-ds)+att[is+1].boost*ds; p->tone_decay=att[is].decay*(1.-ds)+att[is+1].decay*ds; p->max_curve_dB=max[is]*(1.-ds)+max[is+1]*ds; for(i=0;itoneatt[i]=in[is].block[i]*(1.-ds)+in[is+1].block[i]*ds; return; } static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block, compandblock *in, double *x){ int i,is=s; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; ds=x[is]*(1.-ds)+x[is+1]*ds; is=(int)ds; ds-=is; if(ds==0 && is>0){ is--; ds=1.; } /* interpolate the compander settings */ for(i=0;inoisecompand[i]=in[is].data[i]*(1.-ds)+in[is+1].data[i]*ds; return; } static void vorbis_encode_peak_setup(vorbis_info *vi,double s,int block, int *suppress){ int is=s; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; p->tone_abs_limit=suppress[is]*(1.-ds)+suppress[is+1]*ds; return; } static void vorbis_encode_noisebias_setup(vorbis_info *vi,double s,int block, int *suppress, noise3 *in, noiseguard *guard, double userbias){ int i,is=s,j; double ds=s-is; codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; p->noisemaxsupp=suppress[is]*(1.-ds)+suppress[is+1]*ds; p->noisewindowlomin=guard[block].lo; p->noisewindowhimin=guard[block].hi; p->noisewindowfixed=guard[block].fixed; for(j=0;jnoiseoff[j][i]=in[is].data[j][i]*(1.-ds)+in[is+1].data[j][i]*ds; /* impulse blocks may take a user specified bias to boost the nominal/high noise encoding depth */ for(j=0;jnoiseoff[j][0]+6; /* the lowest it can go */ for(i=0;inoiseoff[j][i]+=userbias; if(p->noiseoff[j][i]noiseoff[j][i]=min; } } return; } static void vorbis_encode_ath_setup(vorbis_info *vi,int block){ codec_setup_info *ci=vi->codec_setup; vorbis_info_psy *p=ci->psy_param[block]; p->ath_adjatt=ci->hi.ath_floating_dB; p->ath_maxatt=ci->hi.ath_absolute_dB; return; } static int book_dup_or_new(codec_setup_info *ci,static_codebook *book){ int i; for(i=0;ibooks;i++) if(ci->book_param[i]==book)return(i); return(ci->books++); } static void vorbis_encode_blocksize_setup(vorbis_info *vi,double s, int *shortb,int *longb){ codec_setup_info *ci=vi->codec_setup; int is=s; int blockshort=shortb[is]; int blocklong=longb[is]; ci->blocksizes[0]=blockshort; ci->blocksizes[1]=blocklong; } static void vorbis_encode_residue_setup(vorbis_info *vi, int number, int block, vorbis_residue_template *res){ codec_setup_info *ci=vi->codec_setup; int i,n; vorbis_info_residue0 *r=ci->residue_param[number]= _ogg_malloc(sizeof(*r)); memcpy(r,res->res,sizeof(*r)); if(ci->residues<=number)ci->residues=number+1; switch(ci->blocksizes[block]){ case 64:case 128:case 256: r->grouping=16; break; default: r->grouping=32; break; } ci->residue_type[number]=res->res_type; /* to be adjusted by lowpass/pointlimit later */ n=r->end=ci->blocksizes[block]>>1; if(res->res_type==2) n=r->end*=vi->channels; /* fill in all the books */ { int booklist=0,k; if(ci->hi.managed){ for(i=0;ipartitions;i++) for(k=0;k<3;k++) if(res->books_base_managed->books[i][k]) r->secondstages[i]|=(1<groupbook=book_dup_or_new(ci,res->book_aux_managed); ci->book_param[r->groupbook]=res->book_aux_managed; for(i=0;ipartitions;i++){ for(k=0;k<3;k++){ if(res->books_base_managed->books[i][k]){ int bookid=book_dup_or_new(ci,res->books_base_managed->books[i][k]); r->booklist[booklist++]=bookid; ci->book_param[bookid]=res->books_base_managed->books[i][k]; } } } }else{ for(i=0;ipartitions;i++) for(k=0;k<3;k++) if(res->books_base->books[i][k]) r->secondstages[i]|=(1<groupbook=book_dup_or_new(ci,res->book_aux); ci->book_param[r->groupbook]=res->book_aux; for(i=0;ipartitions;i++){ for(k=0;k<3;k++){ if(res->books_base->books[i][k]){ int bookid=book_dup_or_new(ci,res->books_base->books[i][k]); r->booklist[booklist++]=bookid; ci->book_param[bookid]=res->books_base->books[i][k]; } } } } } /* lowpass setup/pointlimit */ { double freq=ci->hi.lowpass_kHz*1000.; vorbis_info_floor1 *f=ci->floor_param[block]; /* by convention */ double nyq=vi->rate/2.; long blocksize=ci->blocksizes[block]>>1; /* lowpass needs to be set in the floor and the residue. */ if(freq>nyq)freq=nyq; /* in the floor, the granularity can be very fine; it doesn't alter the encoding structure, only the samples used to fit the floor approximation */ f->n=freq/nyq*blocksize; /* this res may by limited by the maximum pointlimit of the mode, not the lowpass. the floor is always lowpass limited. */ if(res->limit_type){ if(ci->hi.managed) freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS-1]*1000.; else freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS/2]*1000.; if(freq>nyq)freq=nyq; } /* in the residue, we're constrained, physically, by partition boundaries. We still lowpass 'wherever', but we have to round up here to next boundary, or the vorbis spec will round it *down* to previous boundary in encode/decode */ if(ci->residue_type[block]==2) r->end=(int)((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */ r->grouping; else r->end=(int)((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */ r->grouping; } } /* we assume two maps in this encoder */ static void vorbis_encode_map_n_res_setup(vorbis_info *vi,double s, vorbis_mapping_template *maps){ codec_setup_info *ci=vi->codec_setup; int i,j,is=s,modes=2; vorbis_info_mapping0 *map=maps[is].map; vorbis_info_mode *mode=_mode_template; vorbis_residue_template *res=maps[is].res; if(ci->blocksizes[0]==ci->blocksizes[1])modes=1; for(i=0;imap_param[i]=_ogg_calloc(1,sizeof(*map)); ci->mode_param[i]=_ogg_calloc(1,sizeof(*mode)); memcpy(ci->mode_param[i],mode+i,sizeof(*_mode_template)); if(i>=ci->modes)ci->modes=i+1; ci->map_type[i]=0; memcpy(ci->map_param[i],map+i,sizeof(*map)); if(i>=ci->maps)ci->maps=i+1; for(j=0;jcodec_setup; highlevel_encode_setup *hi=&ci->hi; ve_setup_data_template *setup=(ve_setup_data_template *)hi->setup; int is=hi->base_setting; double ds=hi->base_setting-is; int ch=vi->channels; double *r=setup->rate_mapping; if(r==NULL) return(-1); return((r[is]*(1.-ds)+r[is+1]*ds)*ch); } static void get_setup_template(vorbis_info *vi, long ch,long srate, double req,int q_or_bitrate){ int i=0,j; codec_setup_info *ci=vi->codec_setup; highlevel_encode_setup *hi=&ci->hi; if(q_or_bitrate)req/=ch; while(setup_list[i]){ if(setup_list[i]->coupling_restriction==-1 || setup_list[i]->coupling_restriction==ch){ if(srate>=setup_list[i]->samplerate_min_restriction && srate<=setup_list[i]->samplerate_max_restriction){ int mappings=setup_list[i]->mappings; double *map=(q_or_bitrate? setup_list[i]->rate_mapping: setup_list[i]->quality_mapping); /* the template matches. Does the requested quality mode fall within this template's modes? */ if(reqmap[setup_list[i]->mappings]){++i;continue;} for(j=0;j=map[j] && reqsetup=setup_list[i]; if(j==mappings) hi->base_setting=j-.001; else{ float low=map[j]; float high=map[j+1]; float del=(req-low)/(high-low); hi->base_setting=j+del; } return; } } i++; } hi->setup=NULL; } /* encoders will need to use vorbis_info_init beforehand and call vorbis_info clear when all done */ /* two interfaces; this, more detailed one, and later a convenience layer on top */ /* the final setup call */ int vorbis_encode_setup_init(vorbis_info *vi){ int i0=0,singleblock=0; codec_setup_info *ci=vi->codec_setup; ve_setup_data_template *setup=NULL; highlevel_encode_setup *hi=&ci->hi; if(ci==NULL)return(OV_EINVAL); if(!hi->impulse_block_p)i0=1; /* too low/high an ATH floater is nonsensical, but doesn't break anything */ if(hi->ath_floating_dB>-80)hi->ath_floating_dB=-80; if(hi->ath_floating_dB<-200)hi->ath_floating_dB=-200; /* again, bound this to avoid the app shooting itself int he foot too badly */ if(hi->amplitude_track_dBpersec>0.)hi->amplitude_track_dBpersec=0.; if(hi->amplitude_track_dBpersec<-99999.)hi->amplitude_track_dBpersec=-99999.; /* get the appropriate setup template; matches the fetch in previous stages */ setup=(ve_setup_data_template *)hi->setup; if(setup==NULL)return(OV_EINVAL); hi->set_in_stone=1; /* choose block sizes from configured sizes as well as paying attention to long_block_p and short_block_p. If the configured short and long blocks are the same length, we set long_block_p and unset short_block_p */ vorbis_encode_blocksize_setup(vi,hi->base_setting, setup->blocksize_short, setup->blocksize_long); if(ci->blocksizes[0]==ci->blocksizes[1])singleblock=1; /* floor setup; choose proper floor params. Allocated on the floor stack in order; if we alloc only long floor, it's 0 */ vorbis_encode_floor_setup(vi,hi->short_setting,0, setup->floor_books, setup->floor_params, setup->floor_short_mapping); if(!singleblock) vorbis_encode_floor_setup(vi,hi->long_setting,1, setup->floor_books, setup->floor_params, setup->floor_long_mapping); /* setup of [mostly] short block detection and stereo*/ vorbis_encode_global_psych_setup(vi,hi->trigger_setting, setup->global_params, setup->global_mapping); vorbis_encode_global_stereo(vi,hi,setup->stereo_modes); /* basic psych setup and noise normalization */ vorbis_encode_psyset_setup(vi,hi->short_setting, setup->psy_noise_normal_start[0], setup->psy_noise_normal_partition[0], setup->psy_noise_normal_thresh, 0); vorbis_encode_psyset_setup(vi,hi->short_setting, setup->psy_noise_normal_start[0], setup->psy_noise_normal_partition[0], setup->psy_noise_normal_thresh, 1); if(!singleblock){ vorbis_encode_psyset_setup(vi,hi->long_setting, setup->psy_noise_normal_start[1], setup->psy_noise_normal_partition[1], setup->psy_noise_normal_thresh, 2); vorbis_encode_psyset_setup(vi,hi->long_setting, setup->psy_noise_normal_start[1], setup->psy_noise_normal_partition[1], setup->psy_noise_normal_thresh, 3); } /* tone masking setup */ vorbis_encode_tonemask_setup(vi,hi->block[i0].tone_mask_setting,0, setup->psy_tone_masteratt, setup->psy_tone_0dB, setup->psy_tone_adj_impulse); vorbis_encode_tonemask_setup(vi,hi->block[1].tone_mask_setting,1, setup->psy_tone_masteratt, setup->psy_tone_0dB, setup->psy_tone_adj_other); if(!singleblock){ vorbis_encode_tonemask_setup(vi,hi->block[2].tone_mask_setting,2, setup->psy_tone_masteratt, setup->psy_tone_0dB, setup->psy_tone_adj_other); vorbis_encode_tonemask_setup(vi,hi->block[3].tone_mask_setting,3, setup->psy_tone_masteratt, setup->psy_tone_0dB, setup->psy_tone_adj_long); } /* noise companding setup */ vorbis_encode_compand_setup(vi,hi->block[i0].noise_compand_setting,0, setup->psy_noise_compand, setup->psy_noise_compand_short_mapping); vorbis_encode_compand_setup(vi,hi->block[1].noise_compand_setting,1, setup->psy_noise_compand, setup->psy_noise_compand_short_mapping); if(!singleblock){ vorbis_encode_compand_setup(vi,hi->block[2].noise_compand_setting,2, setup->psy_noise_compand, setup->psy_noise_compand_long_mapping); vorbis_encode_compand_setup(vi,hi->block[3].noise_compand_setting,3, setup->psy_noise_compand, setup->psy_noise_compand_long_mapping); } /* peak guarding setup */ vorbis_encode_peak_setup(vi,hi->block[i0].tone_peaklimit_setting,0, setup->psy_tone_dBsuppress); vorbis_encode_peak_setup(vi,hi->block[1].tone_peaklimit_setting,1, setup->psy_tone_dBsuppress); if(!singleblock){ vorbis_encode_peak_setup(vi,hi->block[2].tone_peaklimit_setting,2, setup->psy_tone_dBsuppress); vorbis_encode_peak_setup(vi,hi->block[3].tone_peaklimit_setting,3, setup->psy_tone_dBsuppress); } /* noise bias setup */ vorbis_encode_noisebias_setup(vi,hi->block[i0].noise_bias_setting,0, setup->psy_noise_dBsuppress, setup->psy_noise_bias_impulse, setup->psy_noiseguards, (i0==0?hi->impulse_noisetune:0.)); vorbis_encode_noisebias_setup(vi,hi->block[1].noise_bias_setting,1, setup->psy_noise_dBsuppress, setup->psy_noise_bias_padding, setup->psy_noiseguards,0.); if(!singleblock){ vorbis_encode_noisebias_setup(vi,hi->block[2].noise_bias_setting,2, setup->psy_noise_dBsuppress, setup->psy_noise_bias_trans, setup->psy_noiseguards,0.); vorbis_encode_noisebias_setup(vi,hi->block[3].noise_bias_setting,3, setup->psy_noise_dBsuppress, setup->psy_noise_bias_long, setup->psy_noiseguards,0.); } vorbis_encode_ath_setup(vi,0); vorbis_encode_ath_setup(vi,1); if(!singleblock){ vorbis_encode_ath_setup(vi,2); vorbis_encode_ath_setup(vi,3); } vorbis_encode_map_n_res_setup(vi,hi->base_setting,setup->maps); /* set bitrate readonlies and management */ if(hi->bitrate_av>0) vi->bitrate_nominal=hi->bitrate_av; else{ vi->bitrate_nominal=setting_to_approx_bitrate(vi); } vi->bitrate_lower=hi->bitrate_min; vi->bitrate_upper=hi->bitrate_max; if(hi->bitrate_av) vi->bitrate_window=(double)hi->bitrate_reservoir/hi->bitrate_av; else vi->bitrate_window=0.; if(hi->managed){ ci->bi.avg_rate=hi->bitrate_av; ci->bi.min_rate=hi->bitrate_min; ci->bi.max_rate=hi->bitrate_max; ci->bi.reservoir_bits=hi->bitrate_reservoir; ci->bi.reservoir_bias= hi->bitrate_reservoir_bias; ci->bi.slew_damp=hi->bitrate_av_damp; } return(0); } static int vorbis_encode_setup_setting(vorbis_info *vi, long channels, long rate){ int ret=0,i,is; codec_setup_info *ci=vi->codec_setup; highlevel_encode_setup *hi=&ci->hi; ve_setup_data_template *setup=hi->setup; double ds; ret=vorbis_encode_toplevel_setup(vi,channels,rate); if(ret)return(ret); is=hi->base_setting; ds=hi->base_setting-is; hi->short_setting=hi->base_setting; hi->long_setting=hi->base_setting; hi->managed=0; hi->impulse_block_p=1; hi->noise_normalize_p=1; hi->stereo_point_setting=hi->base_setting; hi->lowpass_kHz= setup->psy_lowpass[is]*(1.-ds)+setup->psy_lowpass[is+1]*ds; hi->ath_floating_dB=setup->psy_ath_float[is]*(1.-ds)+ setup->psy_ath_float[is+1]*ds; hi->ath_absolute_dB=setup->psy_ath_abs[is]*(1.-ds)+ setup->psy_ath_abs[is+1]*ds; hi->amplitude_track_dBpersec=-6.; hi->trigger_setting=hi->base_setting; for(i=0;i<4;i++){ hi->block[i].tone_mask_setting=hi->base_setting; hi->block[i].tone_peaklimit_setting=hi->base_setting; hi->block[i].noise_bias_setting=hi->base_setting; hi->block[i].noise_compand_setting=hi->base_setting; } return(ret); } int vorbis_encode_setup_vbr(vorbis_info *vi, long channels, long rate, float quality){ codec_setup_info *ci=vi->codec_setup; highlevel_encode_setup *hi=&ci->hi; quality+=.0000001; if(quality>=1.)quality=.9999; get_setup_template(vi,channels,rate,quality,0); if(!hi->setup)return OV_EIMPL; return vorbis_encode_setup_setting(vi,channels,rate); } int vorbis_encode_init_vbr(vorbis_info *vi, long channels, long rate, float base_quality /* 0. to 1. */ ){ int ret=0; ret=vorbis_encode_setup_vbr(vi,channels,rate,base_quality); if(ret){ vorbis_info_clear(vi); return ret; } ret=vorbis_encode_setup_init(vi); if(ret) vorbis_info_clear(vi); return(ret); } int vorbis_encode_setup_managed(vorbis_info *vi, long channels, long rate, long max_bitrate, long nominal_bitrate, long min_bitrate){ codec_setup_info *ci=vi->codec_setup; highlevel_encode_setup *hi=&ci->hi; double tnominal=nominal_bitrate; int ret=0; if(nominal_bitrate<=0.){ if(max_bitrate>0.){ if(min_bitrate>0.) nominal_bitrate=(max_bitrate+min_bitrate)*.5; else nominal_bitrate=max_bitrate*.875; }else{ if(min_bitrate>0.){ nominal_bitrate=min_bitrate; }else{ return(OV_EINVAL); } } } get_setup_template(vi,channels,rate,nominal_bitrate,1); if(!hi->setup)return OV_EIMPL; ret=vorbis_encode_setup_setting(vi,channels,rate); if(ret){ vorbis_info_clear(vi); return ret; } /* initialize management with sane defaults */ hi->managed=1; hi->bitrate_min=min_bitrate; hi->bitrate_max=max_bitrate; hi->bitrate_av=tnominal; hi->bitrate_av_damp=1.5f; /* full range in no less than 1.5 second */ hi->bitrate_reservoir=nominal_bitrate*2; hi->bitrate_reservoir_bias=.1; /* bias toward hoarding bits */ return(ret); } int vorbis_encode_init(vorbis_info *vi, long channels, long rate, long max_bitrate, long nominal_bitrate, long min_bitrate){ int ret=vorbis_encode_setup_managed(vi,channels,rate, max_bitrate, nominal_bitrate, min_bitrate); if(ret){ vorbis_info_clear(vi); return(ret); } ret=vorbis_encode_setup_init(vi); if(ret) vorbis_info_clear(vi); return(ret); } int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){ if(vi){ codec_setup_info *ci=vi->codec_setup; highlevel_encode_setup *hi=&ci->hi; int setp=(number&0xf); /* a read request has a low nibble of 0 */ if(setp && hi->set_in_stone)return(OV_EINVAL); switch(number){ /* now deprecated *****************/ case OV_ECTL_RATEMANAGE_GET: { struct ovectl_ratemanage_arg *ai= (struct ovectl_ratemanage_arg *)arg; ai->management_active=hi->managed; ai->bitrate_hard_window=ai->bitrate_av_window= (double)hi->bitrate_reservoir/vi->rate; ai->bitrate_av_window_center=1.; ai->bitrate_hard_min=hi->bitrate_min; ai->bitrate_hard_max=hi->bitrate_max; ai->bitrate_av_lo=hi->bitrate_av; ai->bitrate_av_hi=hi->bitrate_av; } return(0); /* now deprecated *****************/ case OV_ECTL_RATEMANAGE_SET: { struct ovectl_ratemanage_arg *ai= (struct ovectl_ratemanage_arg *)arg; if(ai==NULL){ hi->managed=0; }else{ hi->managed=ai->management_active; vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_AVG,arg); vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_HARD,arg); } } return 0; /* now deprecated *****************/ case OV_ECTL_RATEMANAGE_AVG: { struct ovectl_ratemanage_arg *ai= (struct ovectl_ratemanage_arg *)arg; if(ai==NULL){ hi->bitrate_av=0; }else{ hi->bitrate_av=(ai->bitrate_av_lo+ai->bitrate_av_hi)*.5; } } return(0); /* now deprecated *****************/ case OV_ECTL_RATEMANAGE_HARD: { struct ovectl_ratemanage_arg *ai= (struct ovectl_ratemanage_arg *)arg; if(ai==NULL){ hi->bitrate_min=0; hi->bitrate_max=0; }else{ hi->bitrate_min=ai->bitrate_hard_min; hi->bitrate_max=ai->bitrate_hard_max; hi->bitrate_reservoir=ai->bitrate_hard_window* (hi->bitrate_max+hi->bitrate_min)*.5; } if(hi->bitrate_reservoir<128.) hi->bitrate_reservoir=128.; } return(0); /* replacement ratemanage interface */ case OV_ECTL_RATEMANAGE2_GET: { struct ovectl_ratemanage2_arg *ai= (struct ovectl_ratemanage2_arg *)arg; if(ai==NULL)return OV_EINVAL; ai->management_active=hi->managed; ai->bitrate_limit_min_kbps=hi->bitrate_min/1000; ai->bitrate_limit_max_kbps=hi->bitrate_max/1000; ai->bitrate_average_kbps=hi->bitrate_av/1000; ai->bitrate_average_damping=hi->bitrate_av_damp; ai->bitrate_limit_reservoir_bits=hi->bitrate_reservoir; ai->bitrate_limit_reservoir_bias=hi->bitrate_reservoir_bias; } return (0); case OV_ECTL_RATEMANAGE2_SET: { struct ovectl_ratemanage2_arg *ai= (struct ovectl_ratemanage2_arg *)arg; if(ai==NULL){ hi->managed=0; }else{ /* sanity check; only catch invariant violations */ if(ai->bitrate_limit_min_kbps>0 && ai->bitrate_average_kbps>0 && ai->bitrate_limit_min_kbps>ai->bitrate_average_kbps) return OV_EINVAL; if(ai->bitrate_limit_max_kbps>0 && ai->bitrate_average_kbps>0 && ai->bitrate_limit_max_kbpsbitrate_average_kbps) return OV_EINVAL; if(ai->bitrate_limit_min_kbps>0 && ai->bitrate_limit_max_kbps>0 && ai->bitrate_limit_min_kbps>ai->bitrate_limit_max_kbps) return OV_EINVAL; if(ai->bitrate_average_damping <= 0.) return OV_EINVAL; if(ai->bitrate_limit_reservoir_bits < 0) return OV_EINVAL; if(ai->bitrate_limit_reservoir_bias < 0.) return OV_EINVAL; if(ai->bitrate_limit_reservoir_bias > 1.) return OV_EINVAL; hi->managed=ai->management_active; hi->bitrate_min=ai->bitrate_limit_min_kbps * 1000; hi->bitrate_max=ai->bitrate_limit_max_kbps * 1000; hi->bitrate_av=ai->bitrate_average_kbps * 1000; hi->bitrate_av_damp=ai->bitrate_average_damping; hi->bitrate_reservoir=ai->bitrate_limit_reservoir_bits; hi->bitrate_reservoir_bias=ai->bitrate_limit_reservoir_bias; } } return 0; case OV_ECTL_LOWPASS_GET: { double *farg=(double *)arg; *farg=hi->lowpass_kHz; } return(0); case OV_ECTL_LOWPASS_SET: { double *farg=(double *)arg; hi->lowpass_kHz=*farg; if(hi->lowpass_kHz<2.)hi->lowpass_kHz=2.; if(hi->lowpass_kHz>99.)hi->lowpass_kHz=99.; } return(0); case OV_ECTL_IBLOCK_GET: { double *farg=(double *)arg; *farg=hi->impulse_noisetune; } return(0); case OV_ECTL_IBLOCK_SET: { double *farg=(double *)arg; hi->impulse_noisetune=*farg; if(hi->impulse_noisetune>0.)hi->impulse_noisetune=0.; if(hi->impulse_noisetune<-15.)hi->impulse_noisetune=-15.; } return(0); } return(OV_EIMPL); } return(OV_EINVAL); } ================================================ FILE: 3rdParty/libvorbis/include/vorbisenc.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: vorbis encode-engine setup last mod: $Id: vorbisenc.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _OV_ENC_H_ #define _OV_ENC_H_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "codec.h" extern int vorbis_encode_init(vorbis_info *vi, long channels, long rate, long max_bitrate, long nominal_bitrate, long min_bitrate); extern int vorbis_encode_setup_managed(vorbis_info *vi, long channels, long rate, long max_bitrate, long nominal_bitrate, long min_bitrate); extern int vorbis_encode_setup_vbr(vorbis_info *vi, long channels, long rate, float quality /* quality level from 0. (lo) to 1. (hi) */ ); extern int vorbis_encode_init_vbr(vorbis_info *vi, long channels, long rate, float base_quality /* quality level from 0. (lo) to 1. (hi) */ ); extern int vorbis_encode_setup_init(vorbis_info *vi); extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg); /* deprecated rate management supported only for compatability */ #define OV_ECTL_RATEMANAGE_GET 0x10 #define OV_ECTL_RATEMANAGE_SET 0x11 #define OV_ECTL_RATEMANAGE_AVG 0x12 #define OV_ECTL_RATEMANAGE_HARD 0x13 struct ovectl_ratemanage_arg { int management_active; long bitrate_hard_min; long bitrate_hard_max; double bitrate_hard_window; long bitrate_av_lo; long bitrate_av_hi; double bitrate_av_window; double bitrate_av_window_center; }; /* new rate setup */ #define OV_ECTL_RATEMANAGE2_GET 0x14 #define OV_ECTL_RATEMANAGE2_SET 0x15 struct ovectl_ratemanage2_arg { int management_active; long bitrate_limit_min_kbps; long bitrate_limit_max_kbps; long bitrate_limit_reservoir_bits; double bitrate_limit_reservoir_bias; long bitrate_average_kbps; double bitrate_average_damping; }; #define OV_ECTL_LOWPASS_GET 0x20 #define OV_ECTL_LOWPASS_SET 0x21 #define OV_ECTL_IBLOCK_GET 0x30 #define OV_ECTL_IBLOCK_SET 0x31 #ifdef __cplusplus } #endif /* __cplusplus */ #endif ================================================ FILE: 3rdParty/libvorbis/include/vorbisfile.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: stdio-based convenience library for opening/seeking/decoding last mod: $Id: vorbisfile.c 13294 2007-07-24 01:08:23Z xiphmont $ ********************************************************************/ #include #include #include #include #include #include "vorbis/codec.h" #include "vorbis/vorbisfile.h" #include "os.h" #include "misc.h" /* A 'chained bitstream' is a Vorbis bitstream that contains more than one logical bitstream arranged end to end (the only form of Ogg multiplexing allowed in a Vorbis bitstream; grouping [parallel multiplexing] is not allowed in Vorbis) */ /* A Vorbis file can be played beginning to end (streamed) without worrying ahead of time about chaining (see decoder_example.c). If we have the whole file, however, and want random access (seeking/scrubbing) or desire to know the total length/time of a file, we need to account for the possibility of chaining. */ /* We can handle things a number of ways; we can determine the entire bitstream structure right off the bat, or find pieces on demand. This example determines and caches structure for the entire bitstream, but builds a virtual decoder on the fly when moving between links in the chain. */ /* There are also different ways to implement seeking. Enough information exists in an Ogg bitstream to seek to sample-granularity positions in the output. Or, one can seek by picking some portion of the stream roughly in the desired area if we only want coarse navigation through the stream. */ /************************************************************************* * Many, many internal helpers. The intention is not to be confusing; * rampant duplication and monolithic function implementation would be * harder to understand anyway. The high level functions are last. Begin * grokking near the end of the file */ /* read a little more data from the file/pipe into the ogg_sync framer */ #define CHUNKSIZE 65536 static long _get_data(OggVorbis_File *vf){ errno=0; if(!(vf->callbacks.read_func))return(-1); if(vf->datasource){ char *buffer=ogg_sync_buffer(&vf->oy,CHUNKSIZE); long bytes=(vf->callbacks.read_func)(buffer,1,CHUNKSIZE,vf->datasource); if(bytes>0)ogg_sync_wrote(&vf->oy,bytes); if(bytes==0 && errno)return(-1); return(bytes); }else return(0); } /* save a tiny smidge of verbosity to make the code more readable */ static int _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){ if(vf->datasource){ if(!(vf->callbacks.seek_func)|| (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET) == -1) return OV_EREAD; vf->offset=offset; ogg_sync_reset(&vf->oy); }else{ /* shouldn't happen unless someone writes a broken callback */ return OV_EFAULT; } return 0; } /* The read/seek functions track absolute position within the stream */ /* from the head of the stream, get the next page. boundary specifies if the function is allowed to fetch more data from the stream (and how much) or only use internally buffered data. boundary: -1) unbounded search 0) read no additional data; use cached only n) search for a new page beginning for n bytes return: <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD) n) found a page at absolute offset n */ static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og, ogg_int64_t boundary){ if(boundary>0)boundary+=vf->offset; while(1){ long more; if(boundary>0 && vf->offset>=boundary)return(OV_FALSE); more=ogg_sync_pageseek(&vf->oy,og); if(more<0){ /* skipped n bytes */ vf->offset-=more; }else{ if(more==0){ /* send more paramedics */ if(!boundary)return(OV_FALSE); { long ret=_get_data(vf); if(ret==0)return(OV_EOF); if(ret<0)return(OV_EREAD); } }else{ /* got a page. Return the offset at the page beginning, advance the internal offset past the page end */ ogg_int64_t ret=vf->offset; vf->offset+=more; return(ret); } } } } /* find the latest page beginning before the current stream cursor position. Much dirtier than the above as Ogg doesn't have any backward search linkage. no 'readp' as it will certainly have to read. */ /* returns offset or OV_EREAD, OV_FAULT */ static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ ogg_int64_t begin=vf->offset; ogg_int64_t end=begin; ogg_int64_t ret; ogg_int64_t offset=-1; while(offset==-1){ begin-=CHUNKSIZE; if(begin<0) begin=0; ret=_seek_helper(vf,begin); if(ret)return(ret); while(vf->offsetoffset); if(ret==OV_EREAD)return(OV_EREAD); if(ret<0){ break; }else{ offset=ret; } } } /* we have the offset. Actually snork and hold the page now */ ret=_seek_helper(vf,offset); if(ret)return(ret); ret=_get_next_page(vf,og,CHUNKSIZE); if(ret<0) /* this shouldn't be possible */ return(OV_EFAULT); return(offset); } static void _add_serialno(ogg_page *og,long **serialno_list, int *n){ long s = ogg_page_serialno(og); (*n)++; if(serialno_list){ *serialno_list = _ogg_realloc(*serialno_list, sizeof(*serialno_list)*(*n)); }else{ *serialno_list = _ogg_malloc(sizeof(**serialno_list)); } (*serialno_list)[(*n)-1] = s; } /* returns nonzero if found */ static int _lookup_serialno(ogg_page *og, long *serialno_list, int n){ long s = ogg_page_serialno(og); if(serialno_list){ while(n--){ if(*serialno_list == s) return 1; serialno_list++; } } return 0; } /* start parsing pages at current offset, remembering all serial numbers. Stop logging at first non-bos page */ static int _get_serialnos(OggVorbis_File *vf, long **s, int *n){ ogg_page og; *s=NULL; *n=0; while(1){ ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE); if(llret==OV_EOF)return(0); if(llret<0)return(llret); if(!ogg_page_bos(&og)) return 0; /* look for duplicate serialnos; add this one if unique */ if(_lookup_serialno(&og,*s,*n)){ if(*s)_ogg_free(*s); *s=0; *n=0; return(OV_EBADHEADER); } _add_serialno(&og,s,n); } } /* finds each bitstream link one at a time using a bisection search (has to begin by knowing the offset of the lb's initial page). Recurses for each link so it can alloc the link storage after finding them all, then unroll and fill the cache at the same time */ static int _bisect_forward_serialno(OggVorbis_File *vf, ogg_int64_t begin, ogg_int64_t searched, ogg_int64_t end, long *currentno_list, int currentnos, long m){ ogg_int64_t endsearched=end; ogg_int64_t next=end; ogg_page og; ogg_int64_t ret; /* the below guards against garbage seperating the last and first pages of two links. */ while(searched=0)next=ret; }else{ searched=ret+og.header_len+og.body_len; } } { long *next_serialno_list=NULL; int next_serialnos=0; ret=_seek_helper(vf,next); if(ret)return(ret); ret=_get_serialnos(vf,&next_serialno_list,&next_serialnos); if(ret)return(ret); if(searched>=end || next_serialnos==0){ vf->links=m+1; vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets)); vf->offsets[m+1]=searched; }else{ ret=_bisect_forward_serialno(vf,next,vf->offset, end,next_serialno_list,next_serialnos,m+1); if(ret)return(ret); } if(next_serialno_list)_ogg_free(next_serialno_list); } vf->offsets[m]=begin; return(0); } /* uses the local ogg_stream storage in vf; this is important for non-streaming input sources */ static int _fetch_headers(OggVorbis_File *vf,vorbis_info *vi,vorbis_comment *vc, long *serialno,ogg_page *og_ptr){ ogg_page og; ogg_packet op; int i,ret; int allbos=0; if(!og_ptr){ ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE); if(llret==OV_EREAD)return(OV_EREAD); if(llret<0)return(OV_ENOTVORBIS); og_ptr=&og; } vorbis_info_init(vi); vorbis_comment_init(vc); /* extract the first set of vorbis headers we see in the headerset */ while(1){ /* if we're past the ID headers, we won't be finding a Vorbis stream in this link */ if(!ogg_page_bos(og_ptr)){ ret = OV_ENOTVORBIS; goto bail_header; } /* prospective stream setup; we need a stream to get packets */ ogg_stream_reset_serialno(&vf->os,ogg_page_serialno(og_ptr)); ogg_stream_pagein(&vf->os,og_ptr); if(ogg_stream_packetout(&vf->os,&op) > 0 && vorbis_synthesis_idheader(&op)){ /* continue Vorbis header load; past this point, any error will render this link useless (we won't continue looking for more Vorbis streams */ if(serialno)*serialno=vf->os.serialno; vf->ready_state=STREAMSET; if((ret=vorbis_synthesis_headerin(vi,vc,&op))) goto bail_header; i=0; while(i<2){ /* get a page loop */ while(i<2){ /* get a packet loop */ int result=ogg_stream_packetout(&vf->os,&op); if(result==0)break; if(result==-1){ ret=OV_EBADHEADER; goto bail_header; } if((ret=vorbis_synthesis_headerin(vi,vc,&op))) goto bail_header; i++; } while(i<2){ if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){ ret=OV_EBADHEADER; goto bail_header; } /* if this page belongs to the correct stream, go parse it */ if(vf->os.serialno == ogg_page_serialno(og_ptr)){ ogg_stream_pagein(&vf->os,og_ptr); break; } /* if we never see the final vorbis headers before the link ends, abort */ if(ogg_page_bos(og_ptr)){ if(allbos){ ret = OV_EBADHEADER; goto bail_header; }else allbos=1; } /* otherwise, keep looking */ } } return 0; } /* this wasn't vorbis, get next page, try again */ { ogg_int64_t llret=_get_next_page(vf,og_ptr,CHUNKSIZE); if(llret==OV_EREAD)return(OV_EREAD); if(llret<0)return(OV_ENOTVORBIS); } } bail_header: vorbis_info_clear(vi); vorbis_comment_clear(vc); vf->ready_state=OPENED; return ret; } /* last step of the OggVorbis_File initialization; get all the vorbis_info structs and PCM positions. Only called by the seekable initialization (local stream storage is hacked slightly; pay attention to how that's done) */ /* this is void and does not propogate errors up because we want to be able to open and use damaged bitstreams as well as we can. Just watch out for missing information for links in the OggVorbis_File struct */ static void _prefetch_all_headers(OggVorbis_File *vf, ogg_int64_t dataoffset){ ogg_page og; int i; ogg_int64_t ret; vf->vi=_ogg_realloc(vf->vi,vf->links*sizeof(*vf->vi)); vf->vc=_ogg_realloc(vf->vc,vf->links*sizeof(*vf->vc)); vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos)); vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets)); vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths)); for(i=0;ilinks;i++){ if(i==0){ /* we already grabbed the initial header earlier. Just set the offset */ vf->serialnos[i]=vf->current_serialno; vf->dataoffsets[i]=dataoffset; ret=_seek_helper(vf,dataoffset); if(ret) vf->dataoffsets[i]=-1; }else{ /* seek to the location of the initial header */ ret=_seek_helper(vf,vf->offsets[i]); if(ret){ vf->dataoffsets[i]=-1; }else{ if(_fetch_headers(vf,vf->vi+i,vf->vc+i,vf->serialnos+i,NULL)<0){ vf->dataoffsets[i]=-1; }else{ vf->dataoffsets[i]=vf->offset; } } } /* fetch beginning PCM offset */ if(vf->dataoffsets[i]!=-1){ ogg_int64_t accumulated=0; long lastblock=-1; int result; ogg_stream_reset_serialno(&vf->os,vf->serialnos[i]); while(1){ ogg_packet op; ret=_get_next_page(vf,&og,-1); if(ret<0) /* this should not be possible unless the file is truncated/mangled */ break; if(ogg_page_bos(&og)) break; if(ogg_page_serialno(&og)!=vf->serialnos[i]) continue; /* count blocksizes of all frames in the page */ ogg_stream_pagein(&vf->os,&og); while((result=ogg_stream_packetout(&vf->os,&op))){ if(result>0){ /* ignore holes */ long thisblock=vorbis_packet_blocksize(vf->vi+i,&op); if(lastblock!=-1) accumulated+=(lastblock+thisblock)>>2; lastblock=thisblock; } } if(ogg_page_granulepos(&og)!=-1){ /* pcm offset of last packet on the first audio page */ accumulated= ogg_page_granulepos(&og)-accumulated; break; } } /* less than zero? This is a stream with samples trimmed off the beginning, a normal occurrence; set the offset to zero */ if(accumulated<0)accumulated=0; vf->pcmlengths[i*2]=accumulated; } /* get the PCM length of this link. To do this, get the last page of the stream */ { ogg_int64_t end=vf->offsets[i+1]; ret=_seek_helper(vf,end); if(ret){ /* this should not be possible */ vorbis_info_clear(vf->vi+i); vorbis_comment_clear(vf->vc+i); }else{ while(1){ ret=_get_prev_page(vf,&og); if(ret<0){ /* this should not be possible */ vorbis_info_clear(vf->vi+i); vorbis_comment_clear(vf->vc+i); break; } if(ogg_page_serialno(&og)==vf->serialnos[i]){ if(ogg_page_granulepos(&og)!=-1){ vf->pcmlengths[i*2+1]=ogg_page_granulepos(&og)-vf->pcmlengths[i*2]; break; } } vf->offset=ret; } } } } } static int _make_decode_ready(OggVorbis_File *vf){ if(vf->ready_state>STREAMSET)return 0; if(vf->ready_stateseekable){ if(vorbis_synthesis_init(&vf->vd,vf->vi+vf->current_link)) return OV_EBADLINK; }else{ if(vorbis_synthesis_init(&vf->vd,vf->vi)) return OV_EBADLINK; } vorbis_block_init(&vf->vd,&vf->vb); vf->ready_state=INITSET; vf->bittrack=0.f; vf->samptrack=0.f; return 0; } static int _open_seekable2(OggVorbis_File *vf){ ogg_int64_t dataoffset=vf->offset,end; long *serialno_list=NULL; int serialnos=0; int ret; ogg_page og; /* we're partially open and have a first link header state in storage in vf */ /* we can seek, so set out learning all about this file */ if(vf->callbacks.seek_func && vf->callbacks.tell_func){ (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END); vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource); }else{ vf->offset=vf->end=-1; } /* If seek_func is implemented, tell_func must also be implemented */ if(vf->end==-1) return(OV_EINVAL); /* We get the offset for the last page of the physical bitstream. Most OggVorbis files will contain a single logical bitstream */ end=_get_prev_page(vf,&og); if(end<0)return(end); /* back to beginning, learn all serialnos of first link */ ret=_seek_helper(vf,0); if(ret)return(ret); ret=_get_serialnos(vf,&serialno_list,&serialnos); if(ret)return(ret); /* now determine bitstream structure recursively */ if(_bisect_forward_serialno(vf,0,0,end+1,serialno_list,serialnos,0)<0)return(OV_EREAD); if(serialno_list)_ogg_free(serialno_list); /* the initial header memory is referenced by vf after; don't free it */ _prefetch_all_headers(vf,dataoffset); return(ov_raw_seek(vf,0)); } /* clear out the current logical bitstream decoder */ static void _decode_clear(OggVorbis_File *vf){ vorbis_dsp_clear(&vf->vd); vorbis_block_clear(&vf->vb); vf->ready_state=OPENED; } /* fetch and process a packet. Handles the case where we're at a bitstream boundary and dumps the decoding machine. If the decoding machine is unloaded, it loads it. It also keeps pcm_offset up to date (seek and read both use this. seek uses a special hack with readp). return: <0) error, OV_HOLE (lost packet) or OV_EOF 0) need more data (only if readp==0) 1) got a packet */ static int _fetch_and_process_packet(OggVorbis_File *vf, ogg_packet *op_in, int readp, int spanp){ ogg_page og; /* handle one packet. Try to fetch it from current stream state */ /* extract packets from page */ while(1){ /* process a packet if we can. If the machine isn't loaded, neither is a page */ if(vf->ready_state==INITSET){ while(1) { ogg_packet op; ogg_packet *op_ptr=(op_in?op_in:&op); int result=ogg_stream_packetout(&vf->os,op_ptr); ogg_int64_t granulepos; op_in=NULL; if(result==-1)return(OV_HOLE); /* hole in the data. */ if(result>0){ /* got a packet. process it */ granulepos=op_ptr->granulepos; if(!vorbis_synthesis(&vf->vb,op_ptr)){ /* lazy check for lazy header handling. The header packets aren't audio, so if/when we submit them, vorbis_synthesis will reject them */ /* suck in the synthesis data and track bitrate */ { int oldsamples=vorbis_synthesis_pcmout(&vf->vd,NULL); /* for proper use of libvorbis within libvorbisfile, oldsamples will always be zero. */ if(oldsamples)return(OV_EFAULT); vorbis_synthesis_blockin(&vf->vd,&vf->vb); vf->samptrack+=vorbis_synthesis_pcmout(&vf->vd,NULL)-oldsamples; vf->bittrack+=op_ptr->bytes*8; } /* update the pcm offset. */ if(granulepos!=-1 && !op_ptr->e_o_s){ int link=(vf->seekable?vf->current_link:0); int i,samples; /* this packet has a pcm_offset on it (the last packet completed on a page carries the offset) After processing (above), we know the pcm position of the *last* sample ready to be returned. Find the offset of the *first* As an aside, this trick is inaccurate if we begin reading anew right at the last page; the end-of-stream granulepos declares the last frame in the stream, and the last packet of the last page may be a partial frame. So, we need a previous granulepos from an in-sequence page to have a reference point. Thus the !op_ptr->e_o_s clause above */ if(vf->seekable && link>0) granulepos-=vf->pcmlengths[link*2]; if(granulepos<0)granulepos=0; /* actually, this shouldn't be possible here unless the stream is very broken */ samples=vorbis_synthesis_pcmout(&vf->vd,NULL); granulepos-=samples; for(i=0;ipcmlengths[i*2+1]; vf->pcm_offset=granulepos; } return(1); } } else break; } } if(vf->ready_state>=OPENED){ ogg_int64_t ret; while(1){ /* the loop is not strictly necessary, but there's no sense in doing the extra checks of the larger loop for the common case in a multiplexed bistream where the page is simply part of a different logical bitstream; keep reading until we get one with the correct serialno */ if(!readp)return(0); if((ret=_get_next_page(vf,&og,-1))<0){ return(OV_EOF); /* eof. leave unitialized */ } /* bitrate tracking; add the header's bytes here, the body bytes are done by packet above */ vf->bittrack+=og.header_len*8; if(vf->ready_state==INITSET){ if(vf->current_serialno!=ogg_page_serialno(&og)){ /* two possibilities: 1) our decoding just traversed a bitstream boundary 2) another stream is multiplexed into this logical section? */ if(ogg_page_bos(&og)){ /* boundary case */ if(!spanp) return(OV_EOF); _decode_clear(vf); if(!vf->seekable){ vorbis_info_clear(vf->vi); vorbis_comment_clear(vf->vc); } break; }else continue; /* possibility #2 */ } } break; } } /* Do we need to load a new machine before submitting the page? */ /* This is different in the seekable and non-seekable cases. In the seekable case, we already have all the header information loaded and cached; we just initialize the machine with it and continue on our merry way. In the non-seekable (streaming) case, we'll only be at a boundary if we just left the previous logical bitstream and we're now nominally at the header of the next bitstream */ if(vf->ready_state!=INITSET){ int link; if(vf->ready_stateseekable){ long serialno = ogg_page_serialno(&og); /* match the serialno to bitstream section. We use this rather than offset positions to avoid problems near logical bitstream boundaries */ for(link=0;linklinks;link++) if(vf->serialnos[link]==serialno)break; if(link==vf->links) continue; /* not the desired Vorbis bitstream section; keep trying */ vf->current_serialno=serialno; vf->current_link=link; ogg_stream_reset_serialno(&vf->os,vf->current_serialno); vf->ready_state=STREAMSET; }else{ /* we're streaming */ /* fetch the three header packets, build the info struct */ int ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,&og); if(ret)return(ret); vf->current_link++; link=0; } } { int ret=_make_decode_ready(vf); if(ret<0)return ret; } } /* the buffered page is the data we want, and we're ready for it; add it to the stream state */ ogg_stream_pagein(&vf->os,&og); } } /* if, eg, 64 bit stdio is configured by default, this will build with fseek64 */ static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ if(f==NULL)return(-1); return fseek(f,off,whence); } static int _ov_open1(void *f,OggVorbis_File *vf,char *initial, long ibytes, ov_callbacks callbacks){ int offsettest=((f && callbacks.seek_func)?callbacks.seek_func(f,0,SEEK_CUR):-1); int ret; memset(vf,0,sizeof(*vf)); vf->datasource=f; vf->callbacks = callbacks; /* init the framing state */ ogg_sync_init(&vf->oy); /* perhaps some data was previously read into a buffer for testing against other stream types. Allow initialization from this previously read data (as we may be reading from a non-seekable stream) */ if(initial){ char *buffer=ogg_sync_buffer(&vf->oy,ibytes); memcpy(buffer,initial,ibytes); ogg_sync_wrote(&vf->oy,ibytes); } /* can we seek? Stevens suggests the seek test was portable */ if(offsettest!=-1)vf->seekable=1; /* No seeking yet; Set up a 'single' (current) logical bitstream entry for partial open */ vf->links=1; vf->vi=_ogg_calloc(vf->links,sizeof(*vf->vi)); vf->vc=_ogg_calloc(vf->links,sizeof(*vf->vc)); ogg_stream_init(&vf->os,-1); /* fill in the serialno later */ /* Try to fetch the headers, maintaining all the storage */ if((ret=_fetch_headers(vf,vf->vi,vf->vc,&vf->current_serialno,NULL))<0){ vf->datasource=NULL; ov_clear(vf); }else vf->ready_state=PARTOPEN; return(ret); } static int _ov_open2(OggVorbis_File *vf){ if(vf->ready_state != PARTOPEN) return OV_EINVAL; vf->ready_state=OPENED; if(vf->seekable){ int ret=_open_seekable2(vf); if(ret){ vf->datasource=NULL; ov_clear(vf); } return(ret); }else vf->ready_state=STREAMSET; return 0; } /* clear out the OggVorbis_File struct */ int ov_clear(OggVorbis_File *vf){ if(vf){ vorbis_block_clear(&vf->vb); vorbis_dsp_clear(&vf->vd); ogg_stream_clear(&vf->os); if(vf->vi && vf->links){ int i; for(i=0;ilinks;i++){ vorbis_info_clear(vf->vi+i); vorbis_comment_clear(vf->vc+i); } _ogg_free(vf->vi); _ogg_free(vf->vc); } if(vf->dataoffsets)_ogg_free(vf->dataoffsets); if(vf->pcmlengths)_ogg_free(vf->pcmlengths); if(vf->serialnos)_ogg_free(vf->serialnos); if(vf->offsets)_ogg_free(vf->offsets); ogg_sync_clear(&vf->oy); if(vf->datasource && vf->callbacks.close_func) (vf->callbacks.close_func)(vf->datasource); memset(vf,0,sizeof(*vf)); } #ifdef DEBUG_LEAKS _VDBG_dump(); #endif return(0); } /* inspects the OggVorbis file and finds/documents all the logical bitstreams contained in it. Tries to be tolerant of logical bitstream sections that are truncated/woogie. return: -1) error 0) OK */ int ov_open_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, ov_callbacks callbacks){ int ret=_ov_open1(f,vf,initial,ibytes,callbacks); if(ret)return ret; return _ov_open2(vf); } int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ ov_callbacks callbacks = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, (int (*)(void *)) fclose, (long (*)(void *)) ftell }; return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); } int ov_fopen(char *path,OggVorbis_File *vf){ int ret; FILE *f = fopen(path,"rb"); if(!f) return -1; ret = ov_open(f,vf,NULL,0); if(ret) fclose(f); return ret; } /* cheap hack for game usage where downsampling is desirable; there's no need for SRC as we can just do it cheaply in libvorbis. */ int ov_halfrate(OggVorbis_File *vf,int flag){ int i; if(vf->vi==NULL)return OV_EINVAL; if(!vf->seekable)return OV_EINVAL; if(vf->ready_state>=STREAMSET) _decode_clear(vf); /* clear out stream state; later on libvorbis will be able to swap this on the fly, but for now dumping the decode machine is needed to reinit the MDCT lookups. 1.1 libvorbis is planned to be able to switch on the fly */ for(i=0;ilinks;i++){ if(vorbis_synthesis_halfrate(vf->vi+i,flag)){ ov_halfrate(vf,0); return OV_EINVAL; } } return 0; } int ov_halfrate_p(OggVorbis_File *vf){ if(vf->vi==NULL)return OV_EINVAL; return vorbis_synthesis_halfrate_p(vf->vi); } /* Only partially open the vorbis file; test for Vorbisness, and load the headers for the first chain. Do not seek (although test for seekability). Use ov_test_open to finish opening the file, else ov_clear to close/free it. Same return codes as open. */ int ov_test_callbacks(void *f,OggVorbis_File *vf,char *initial,long ibytes, ov_callbacks callbacks) { return _ov_open1(f,vf,initial,ibytes,callbacks); } int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes){ ov_callbacks callbacks = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, (int (*)(void *)) fclose, (long (*)(void *)) ftell }; return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks); } int ov_test_open(OggVorbis_File *vf){ if(vf->ready_state!=PARTOPEN)return(OV_EINVAL); return _ov_open2(vf); } /* How many logical bitstreams in this physical bitstream? */ long ov_streams(OggVorbis_File *vf){ return vf->links; } /* Is the FILE * associated with vf seekable? */ long ov_seekable(OggVorbis_File *vf){ return vf->seekable; } /* returns the bitrate for a given logical bitstream or the entire physical bitstream. If the file is open for random access, it will find the *actual* average bitrate. If the file is streaming, it returns the nominal bitrate (if set) else the average of the upper/lower bounds (if set) else -1 (unset). If you want the actual bitrate field settings, get them from the vorbis_info structs */ long ov_bitrate(OggVorbis_File *vf,int i){ if(vf->ready_state=vf->links)return(OV_EINVAL); if(!vf->seekable && i!=0)return(ov_bitrate(vf,0)); if(i<0){ ogg_int64_t bits=0; int i; float br; for(i=0;ilinks;i++) bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8; /* This once read: return(rint(bits/ov_time_total(vf,-1))); * gcc 3.x on x86 miscompiled this at optimisation level 2 and above, * so this is slightly transformed to make it work. */ br = bits/ov_time_total(vf,-1); return(rint(br)); }else{ if(vf->seekable){ /* return the actual bitrate */ return(rint((vf->offsets[i+1]-vf->dataoffsets[i])*8/ov_time_total(vf,i))); }else{ /* return nominal if set */ if(vf->vi[i].bitrate_nominal>0){ return vf->vi[i].bitrate_nominal; }else{ if(vf->vi[i].bitrate_upper>0){ if(vf->vi[i].bitrate_lower>0){ return (vf->vi[i].bitrate_upper+vf->vi[i].bitrate_lower)/2; }else{ return vf->vi[i].bitrate_upper; } } return(OV_FALSE); } } } } /* returns the actual bitrate since last call. returns -1 if no additional data to offer since last call (or at beginning of stream), EINVAL if stream is only partially open */ long ov_bitrate_instant(OggVorbis_File *vf){ int link=(vf->seekable?vf->current_link:0); long ret; if(vf->ready_statesamptrack==0)return(OV_FALSE); ret=vf->bittrack/vf->samptrack*vf->vi[link].rate+.5; vf->bittrack=0.f; vf->samptrack=0.f; return(ret); } /* Guess */ long ov_serialnumber(OggVorbis_File *vf,int i){ if(i>=vf->links)return(ov_serialnumber(vf,vf->links-1)); if(!vf->seekable && i>=0)return(ov_serialnumber(vf,-1)); if(i<0){ return(vf->current_serialno); }else{ return(vf->serialnos[i]); } } /* returns: total raw (compressed) length of content if i==-1 raw (compressed) length of that logical bitstream for i==0 to n OV_EINVAL if the stream is not seekable (we can't know the length) or if stream is only partially open */ ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){ if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); if(i<0){ ogg_int64_t acc=0; int i; for(i=0;ilinks;i++) acc+=ov_raw_total(vf,i); return(acc); }else{ return(vf->offsets[i+1]-vf->offsets[i]); } } /* returns: total PCM length (samples) of content if i==-1 PCM length (samples) of that logical bitstream for i==0 to n OV_EINVAL if the stream is not seekable (we can't know the length) or only partially open */ ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){ if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); if(i<0){ ogg_int64_t acc=0; int i; for(i=0;ilinks;i++) acc+=ov_pcm_total(vf,i); return(acc); }else{ return(vf->pcmlengths[i*2+1]); } } /* returns: total seconds of content if i==-1 seconds in that logical bitstream for i==0 to n OV_EINVAL if the stream is not seekable (we can't know the length) or only partially open */ double ov_time_total(OggVorbis_File *vf,int i){ if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); if(i<0){ double acc=0; int i; for(i=0;ilinks;i++) acc+=ov_time_total(vf,i); return(acc); }else{ return((double)(vf->pcmlengths[i*2+1])/vf->vi[i].rate); } } /* seek to an offset relative to the *compressed* data. This also scans packets to update the PCM cursor. It will cross a logical bitstream boundary, but only if it can't get any packets out of the tail of the bitstream we seek to (so no surprises). returns zero on success, nonzero on failure */ int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){ ogg_stream_state work_os; int ret; if(vf->ready_stateseekable) return(OV_ENOSEEK); /* don't dump machine if we can't seek */ if(pos<0 || pos>vf->end)return(OV_EINVAL); /* don't yet clear out decoding machine (if it's initialized), in the case we're in the same link. Restart the decode lapping, and let _fetch_and_process_packet deal with a potential bitstream boundary */ vf->pcm_offset=-1; ogg_stream_reset_serialno(&vf->os, vf->current_serialno); /* must set serialno */ vorbis_synthesis_restart(&vf->vd); ret=_seek_helper(vf,pos); if(ret)goto seek_error; /* we need to make sure the pcm_offset is set, but we don't want to advance the raw cursor past good packets just to get to the first with a granulepos. That's not equivalent behavior to beginning decoding as immediately after the seek position as possible. So, a hack. We use two stream states; a local scratch state and the shared vf->os stream state. We use the local state to scan, and the shared state as a buffer for later decode. Unfortuantely, on the last page we still advance to last packet because the granulepos on the last page is not necessarily on a packet boundary, and we need to make sure the granpos is correct. */ { ogg_page og; ogg_packet op; int lastblock=0; int accblock=0; int thisblock=0; int eosflag=0; ogg_stream_init(&work_os,vf->current_serialno); /* get the memory ready */ ogg_stream_reset(&work_os); /* eliminate the spurious OV_HOLE return from not necessarily starting from the beginning */ while(1){ if(vf->ready_state>=STREAMSET){ /* snarf/scan a packet if we can */ int result=ogg_stream_packetout(&work_os,&op); if(result>0){ if(vf->vi[vf->current_link].codec_setup){ thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); if(thisblock<0){ ogg_stream_packetout(&vf->os,NULL); thisblock=0; }else{ if(eosflag) ogg_stream_packetout(&vf->os,NULL); else if(lastblock)accblock+=(lastblock+thisblock)>>2; } if(op.granulepos!=-1){ int i,link=vf->current_link; ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2]; if(granulepos<0)granulepos=0; for(i=0;ipcmlengths[i*2+1]; vf->pcm_offset=granulepos-accblock; break; } lastblock=thisblock; continue; }else ogg_stream_packetout(&vf->os,NULL); } } if(!lastblock){ if(_get_next_page(vf,&og,-1)<0){ vf->pcm_offset=ov_pcm_total(vf,-1); break; } }else{ /* huh? Bogus stream with packets but no granulepos */ vf->pcm_offset=-1; break; } /* has our decoding just traversed a bitstream boundary? */ if(vf->ready_state>=STREAMSET){ if(vf->current_serialno!=ogg_page_serialno(&og)){ /* two possibilities: 1) our decoding just traversed a bitstream boundary 2) another stream is multiplexed into this logical section? */ if(ogg_page_bos(&og)){ /* we traversed */ _decode_clear(vf); /* clear out stream state */ ogg_stream_clear(&work_os); } /* else, do nothing; next loop will scoop another page */ } } if(vf->ready_statelinks;link++) if(vf->serialnos[link]==serialno)break; if(link==vf->links) continue; /* not the desired Vorbis bitstream section; keep trying */ vf->current_link=link; vf->current_serialno=serialno; ogg_stream_reset_serialno(&vf->os,serialno); ogg_stream_reset_serialno(&work_os,serialno); vf->ready_state=STREAMSET; } ogg_stream_pagein(&vf->os,&og); ogg_stream_pagein(&work_os,&og); eosflag=ogg_page_eos(&og); } } ogg_stream_clear(&work_os); vf->bittrack=0.f; vf->samptrack=0.f; return(0); seek_error: /* dump the machine so we're in a known state */ vf->pcm_offset=-1; ogg_stream_clear(&work_os); _decode_clear(vf); return OV_EBADLINK; } /* Page granularity seek (faster than sample granularity because we don't do the last bit of decode to find a specific sample). Seek to the last [granule marked] page preceeding the specified pos location, such that decoding past the returned point will quickly arrive at the requested position. */ int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ int link=-1; ogg_int64_t result=0; ogg_int64_t total=ov_pcm_total(vf,-1); if(vf->ready_stateseekable)return(OV_ENOSEEK); if(pos<0 || pos>total)return(OV_EINVAL); /* which bitstream section does this pcm offset occur in? */ for(link=vf->links-1;link>=0;link--){ total-=vf->pcmlengths[link*2+1]; if(pos>=total)break; } /* search within the logical bitstream for the page with the highest pcm_pos preceeding (or equal to) pos. There is a danger here; missing pages or incorrect frame number information in the bitstream could make our task impossible. Account for that (it would be an error condition) */ /* new search algorithm by HB (Nicholas Vinen) */ { ogg_int64_t end=vf->offsets[link+1]; ogg_int64_t begin=vf->offsets[link]; ogg_int64_t begintime = vf->pcmlengths[link*2]; ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime; ogg_int64_t target=pos-total+begintime; ogg_int64_t best=begin; ogg_page og; while(beginoffset); if(result==OV_EREAD) goto seek_error; if(result<0){ if(bisect<=begin+1) end=begin; /* found it */ else{ if(bisect==0) goto seek_error; bisect-=CHUNKSIZE; if(bisect<=begin)bisect=begin+1; result=_seek_helper(vf,bisect); if(result) goto seek_error; } }else{ ogg_int64_t granulepos; if(ogg_page_serialno(&og)!=vf->serialnos[link]) continue; granulepos=ogg_page_granulepos(&og); if(granulepos==-1)continue; if(granuleposoffset; /* raw offset of next page */ begintime=granulepos; if(target-begintime>44100)break; bisect=begin; /* *not* begin + 1 */ }else{ if(bisect<=begin+1) end=begin; /* found it */ else{ if(end==vf->offset){ /* we're pretty close - we'd be stuck in */ end=result; bisect-=CHUNKSIZE; /* an endless loop otherwise. */ if(bisect<=begin)bisect=begin+1; result=_seek_helper(vf,bisect); if(result) goto seek_error; }else{ end=bisect; endtime=granulepos; break; } } } } } } /* found our page. seek to it, update pcm offset. Easier case than raw_seek, don't keep packets preceeding granulepos. */ { ogg_page og; ogg_packet op; /* seek */ result=_seek_helper(vf,best); vf->pcm_offset=-1; if(result) goto seek_error; result=_get_next_page(vf,&og,-1); if(result<0) goto seek_error; if(link!=vf->current_link){ /* Different link; dump entire decode machine */ _decode_clear(vf); vf->current_link=link; vf->current_serialno=vf->serialnos[link]; vf->ready_state=STREAMSET; }else{ vorbis_synthesis_restart(&vf->vd); } ogg_stream_reset_serialno(&vf->os,vf->current_serialno); ogg_stream_pagein(&vf->os,&og); /* pull out all but last packet; the one with granulepos */ while(1){ result=ogg_stream_packetpeek(&vf->os,&op); if(result==0){ /* !!! the packet finishing this page originated on a preceeding page. Keep fetching previous pages until we get one with a granulepos or without the 'continued' flag set. Then just use raw_seek for simplicity. */ result=_seek_helper(vf,best); if(result<0) goto seek_error; while(1){ result=_get_prev_page(vf,&og); if(result<0) goto seek_error; if(ogg_page_serialno(&og)==vf->current_serialno && (ogg_page_granulepos(&og)>-1 || !ogg_page_continued(&og))){ return ov_raw_seek(vf,result); } vf->offset=result; } } if(result<0){ result = OV_EBADPACKET; goto seek_error; } if(op.granulepos!=-1){ vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; if(vf->pcm_offset<0)vf->pcm_offset=0; vf->pcm_offset+=total; break; }else result=ogg_stream_packetout(&vf->os,NULL); } } } /* verify result */ if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){ result=OV_EFAULT; goto seek_error; } vf->bittrack=0.f; vf->samptrack=0.f; return(0); seek_error: /* dump machine so we're in a known state */ vf->pcm_offset=-1; _decode_clear(vf); return (int)result; } /* seek to a sample offset relative to the decompressed pcm stream returns zero on success, nonzero on failure */ int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ int thisblock,lastblock=0; int ret=ov_pcm_seek_page(vf,pos); if(ret<0)return(ret); if((ret=_make_decode_ready(vf)))return ret; /* discard leading packets we don't need for the lapping of the position we want; don't decode them */ while(1){ ogg_packet op; ogg_page og; int ret=ogg_stream_packetpeek(&vf->os,&op); if(ret>0){ thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); if(thisblock<0){ ogg_stream_packetout(&vf->os,NULL); continue; /* non audio packet */ } if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2; if(vf->pcm_offset+((thisblock+ vorbis_info_blocksize(vf->vi,1))>>2)>=pos)break; /* remove the packet from packet queue and track its granulepos */ ogg_stream_packetout(&vf->os,NULL); vorbis_synthesis_trackonly(&vf->vb,&op); /* set up a vb with only tracking, no pcm_decode */ vorbis_synthesis_blockin(&vf->vd,&vf->vb); /* end of logical stream case is hard, especially with exact length positioning. */ if(op.granulepos>-1){ int i; /* always believe the stream markers */ vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; if(vf->pcm_offset<0)vf->pcm_offset=0; for(i=0;icurrent_link;i++) vf->pcm_offset+=vf->pcmlengths[i*2+1]; } lastblock=thisblock; }else{ if(ret<0 && ret!=OV_HOLE)break; /* suck in a new page */ if(_get_next_page(vf,&og,-1)<0)break; if(ogg_page_bos(&og))_decode_clear(vf); if(vf->ready_statelinks;link++) if(vf->serialnos[link]==serialno)break; if(link==vf->links) continue; vf->current_link=link; vf->ready_state=STREAMSET; vf->current_serialno=ogg_page_serialno(&og); ogg_stream_reset_serialno(&vf->os,serialno); ret=_make_decode_ready(vf); if(ret)return ret; lastblock=0; } ogg_stream_pagein(&vf->os,&og); } } vf->bittrack=0.f; vf->samptrack=0.f; /* discard samples until we reach the desired position. Crossing a logical bitstream boundary with abandon is OK. */ while(vf->pcm_offsetpcm_offset; long samples=vorbis_synthesis_pcmout(&vf->vd,NULL); if(samples>target)samples=target; vorbis_synthesis_read(&vf->vd,samples); vf->pcm_offset+=samples; if(samplespcm_offset=ov_pcm_total(vf,-1); /* eof */ } return 0; } /* seek to a playback time relative to the decompressed pcm stream returns zero on success, nonzero on failure */ int ov_time_seek(OggVorbis_File *vf,double seconds){ /* translate time to PCM position and call ov_pcm_seek */ int link=-1; ogg_int64_t pcm_total=0; double time_total=0.; if(vf->ready_stateseekable)return(OV_ENOSEEK); if(seconds<0)return(OV_EINVAL); /* which bitstream section does this time offset occur in? */ for(link=0;linklinks;link++){ double addsec = ov_time_total(vf,link); if(secondspcmlengths[link*2+1]; } if(link==vf->links)return(OV_EINVAL); /* enough information to convert time offset to pcm offset */ { ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate; return(ov_pcm_seek(vf,target)); } } /* page-granularity version of ov_time_seek returns zero on success, nonzero on failure */ int ov_time_seek_page(OggVorbis_File *vf,double seconds){ /* translate time to PCM position and call ov_pcm_seek */ int link=-1; ogg_int64_t pcm_total=0; double time_total=0.; if(vf->ready_stateseekable)return(OV_ENOSEEK); if(seconds<0)return(OV_EINVAL); /* which bitstream section does this time offset occur in? */ for(link=0;linklinks;link++){ double addsec = ov_time_total(vf,link); if(secondspcmlengths[link*2+1]; } if(link==vf->links)return(OV_EINVAL); /* enough information to convert time offset to pcm offset */ { ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate; return(ov_pcm_seek_page(vf,target)); } } /* tell the current stream offset cursor. Note that seek followed by tell will likely not give the set offset due to caching */ ogg_int64_t ov_raw_tell(OggVorbis_File *vf){ if(vf->ready_stateoffset); } /* return PCM offset (sample) of next PCM sample to be read */ ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ if(vf->ready_statepcm_offset); } /* return time offset (seconds) of next PCM sample to be read */ double ov_time_tell(OggVorbis_File *vf){ int link=0; ogg_int64_t pcm_total=0; double time_total=0.f; if(vf->ready_stateseekable){ pcm_total=ov_pcm_total(vf,-1); time_total=ov_time_total(vf,-1); /* which bitstream section does this time offset occur in? */ for(link=vf->links-1;link>=0;link--){ pcm_total-=vf->pcmlengths[link*2+1]; time_total-=ov_time_total(vf,link); if(vf->pcm_offset>=pcm_total)break; } } return((double)time_total+(double)(vf->pcm_offset-pcm_total)/vf->vi[link].rate); } /* link: -1) return the vorbis_info struct for the bitstream section currently being decoded 0-n) to request information for a specific bitstream section In the case of a non-seekable bitstream, any call returns the current bitstream. NULL in the case that the machine is not initialized */ vorbis_info *ov_info(OggVorbis_File *vf,int link){ if(vf->seekable){ if(link<0) if(vf->ready_state>=STREAMSET) return vf->vi+vf->current_link; else return vf->vi; else if(link>=vf->links) return NULL; else return vf->vi+link; }else{ return vf->vi; } } /* grr, strong typing, grr, no templates/inheritence, grr */ vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ if(vf->seekable){ if(link<0) if(vf->ready_state>=STREAMSET) return vf->vc+vf->current_link; else return vf->vc; else if(link>=vf->links) return NULL; else return vf->vc+link; }else{ return vf->vc; } } static int host_is_big_endian() { ogg_int32_t pattern = 0xfeedface; /* deadbeef */ unsigned char *bytewise = (unsigned char *)&pattern; if (bytewise[0] == 0xfe) return 1; return 0; } /* up to this point, everything could more or less hide the multiple logical bitstream nature of chaining from the toplevel application if the toplevel application didn't particularly care. However, at the point that we actually read audio back, the multiple-section nature must surface: Multiple bitstream sections do not necessarily have to have the same number of channels or sampling rate. ov_read returns the sequential logical bitstream number currently being decoded along with the PCM data in order that the toplevel application can take action on channel/sample rate changes. This number will be incremented even for streamed (non-seekable) streams (for seekable streams, it represents the actual logical bitstream index within the physical bitstream. Note that the accessor functions above are aware of this dichotomy). input values: buffer) a buffer to hold packed PCM data for return length) the byte length requested to be placed into buffer bigendianp) should the data be packed LSB first (0) or MSB first (1) word) word size for output. currently 1 (byte) or 2 (16 bit short) return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) 0) EOF n) number of bytes of PCM actually returned. The below works on a packet-by-packet basis, so the return length is not related to the 'length' passed in, just guaranteed to fit. *section) set to the logical bitstream number */ long ov_read(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream){ int i,j; int host_endian = host_is_big_endian(); float **pcm; long samples; if(vf->ready_stateready_state==INITSET){ samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); if(samples)break; } /* suck in another packet */ { int ret=_fetch_and_process_packet(vf,NULL,1,1); if(ret==OV_EOF) return(0); if(ret<=0) return(ret); } } if(samples>0){ /* yay! proceed to pack data into the byte buffer */ long channels=ov_info(vf,-1)->channels; long bytespersample=word * channels; vorbis_fpu_control fpu; if(samples>length/bytespersample)samples=length/bytespersample; if(samples <= 0) return OV_EINVAL; /* a tight loop to pack each size */ { int val; if(word==1){ int off=(sgned?0:128); vorbis_fpu_setround(&fpu); for(j=0;j127)val=127; else if(val<-128)val=-128; *buffer++=val+off; } vorbis_fpu_restore(fpu); }else{ int off=(sgned?0:32768); if(host_endian==bigendianp){ if(sgned){ vorbis_fpu_setround(&fpu); for(i=0;i32767)val=32767; else if(val<-32768)val=-32768; *dest=val; dest+=channels; } } vorbis_fpu_restore(fpu); }else{ vorbis_fpu_setround(&fpu); for(i=0;i32767)val=32767; else if(val<-32768)val=-32768; *dest=val+off; dest+=channels; } } vorbis_fpu_restore(fpu); } }else if(bigendianp){ vorbis_fpu_setround(&fpu); for(j=0;j32767)val=32767; else if(val<-32768)val=-32768; val+=off; *buffer++=(val>>8); *buffer++=(val&0xff); } vorbis_fpu_restore(fpu); }else{ int val; vorbis_fpu_setround(&fpu); for(j=0;j32767)val=32767; else if(val<-32768)val=-32768; val+=off; *buffer++=(val&0xff); *buffer++=(val>>8); } vorbis_fpu_restore(fpu); } } } vorbis_synthesis_read(&vf->vd,samples); vf->pcm_offset+=samples; if(bitstream)*bitstream=vf->current_link; return(samples*bytespersample); }else{ return(samples); } } /* input values: pcm_channels) a float vector per channel of output length) the sample length being read by the app return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) 0) EOF n) number of samples of PCM actually returned. The below works on a packet-by-packet basis, so the return length is not related to the 'length' passed in, just guaranteed to fit. *section) set to the logical bitstream number */ long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int length, int *bitstream){ if(vf->ready_stateready_state==INITSET){ float **pcm; long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); if(samples){ if(pcm_channels)*pcm_channels=pcm; if(samples>length)samples=length; vorbis_synthesis_read(&vf->vd,samples); vf->pcm_offset+=samples; if(bitstream)*bitstream=vf->current_link; return samples; } } /* suck in another packet */ { int ret=_fetch_and_process_packet(vf,NULL,1,1); if(ret==OV_EOF)return(0); if(ret<=0)return(ret); } } } extern float *vorbis_window(vorbis_dsp_state *v,int W); extern void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB, ogg_int64_t off); static void _ov_splice(float **pcm,float **lappcm, int n1, int n2, int ch1, int ch2, float *w1, float *w2){ int i,j; float *w=w1; int n=n1; if(n1>n2){ n=n2; w=w2; } /* splice */ for(j=0;jready_state==INITSET)break; /* suck in another packet */ { int ret=_fetch_and_process_packet(vf,NULL,1,0); if(ret<0 && ret!=OV_HOLE)return(ret); } } return 0; } /* make sure vf is INITSET and that we have a primed buffer; if we're crosslapping at a stream section boundary, this also makes sure we're sanity checking against the right stream information */ static int _ov_initprime(OggVorbis_File *vf){ vorbis_dsp_state *vd=&vf->vd; while(1){ if(vf->ready_state==INITSET) if(vorbis_synthesis_pcmout(vd,NULL))break; /* suck in another packet */ { int ret=_fetch_and_process_packet(vf,NULL,1,0); if(ret<0 && ret!=OV_HOLE)return(ret); } } return 0; } /* grab enough data for lapping from vf; this may be in the form of unreturned, already-decoded pcm, remaining PCM we will need to decode, or synthetic postextrapolation from last packets. */ static void _ov_getlap(OggVorbis_File *vf,vorbis_info *vi,vorbis_dsp_state *vd, float **lappcm,int lapsize){ int lapcount=0,i; float **pcm; /* try first to decode the lapping data */ while(lapcountlapsize-lapcount)samples=lapsize-lapcount; for(i=0;ichannels;i++) memcpy(lappcm[i]+lapcount,pcm[i],sizeof(**pcm)*samples); lapcount+=samples; vorbis_synthesis_read(vd,samples); }else{ /* suck in another packet */ int ret=_fetch_and_process_packet(vf,NULL,1,0); /* do *not* span */ if(ret==OV_EOF)break; } } if(lapcountvd,&pcm); if(samples==0){ for(i=0;ichannels;i++) memset(lappcm[i]+lapcount,0,sizeof(**pcm)*lapsize-lapcount); lapcount=lapsize; }else{ if(samples>lapsize-lapcount)samples=lapsize-lapcount; for(i=0;ichannels;i++) memcpy(lappcm[i]+lapcount,pcm[i],sizeof(**pcm)*samples); lapcount+=samples; } } } /* this sets up crosslapping of a sample by using trailing data from sample 1 and lapping it into the windowing buffer of sample 2 */ int ov_crosslap(OggVorbis_File *vf1, OggVorbis_File *vf2){ vorbis_info *vi1,*vi2; float **lappcm; float **pcm; float *w1,*w2; int n1,n2,i,ret,hs1,hs2; if(vf1==vf2)return(0); /* degenerate case */ if(vf1->ready_stateready_statechannels); n1=vorbis_info_blocksize(vi1,0)>>(1+hs1); n2=vorbis_info_blocksize(vi2,0)>>(1+hs2); w1=vorbis_window(&vf1->vd,0); w2=vorbis_window(&vf2->vd,0); for(i=0;ichannels;i++) lappcm[i]=alloca(sizeof(**lappcm)*n1); _ov_getlap(vf1,vi1,&vf1->vd,lappcm,n1); /* have a lapping buffer from vf1; now to splice it into the lapping buffer of vf2 */ /* consolidate and expose the buffer. */ vorbis_synthesis_lapout(&vf2->vd,&pcm); _analysis_output_always("pcmL",0,pcm[0],n1*2,0,0,0); _analysis_output_always("pcmR",0,pcm[1],n1*2,0,0,0); /* splice */ _ov_splice(pcm,lappcm,n1,n2,vi1->channels,vi2->channels,w1,w2); /* done */ return(0); } static int _ov_64_seek_lap(OggVorbis_File *vf,ogg_int64_t pos, int (*localseek)(OggVorbis_File *,ogg_int64_t)){ vorbis_info *vi; float **lappcm; float **pcm; float *w1,*w2; int n1,n2,ch1,ch2,hs; int i,ret; if(vf->ready_statechannels; n1=vorbis_info_blocksize(vi,0)>>(1+hs); w1=vorbis_window(&vf->vd,0); /* window arrays from libvorbis are persistent; even if the decode state from this link gets dumped, this window array continues to exist */ lappcm=alloca(sizeof(*lappcm)*ch1); for(i=0;ivd,lappcm,n1); /* have lapping data; seek and prime the buffer */ ret=localseek(vf,pos); if(ret)return ret; ret=_ov_initprime(vf); if(ret)return(ret); /* Guard against cross-link changes; they're perfectly legal */ vi=ov_info(vf,-1); ch2=vi->channels; n2=vorbis_info_blocksize(vi,0)>>(1+hs); w2=vorbis_window(&vf->vd,0); /* consolidate and expose the buffer. */ vorbis_synthesis_lapout(&vf->vd,&pcm); /* splice */ _ov_splice(pcm,lappcm,n1,n2,ch1,ch2,w1,w2); /* done */ return(0); } int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos){ return _ov_64_seek_lap(vf,pos,ov_raw_seek); } int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos){ return _ov_64_seek_lap(vf,pos,ov_pcm_seek); } int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos){ return _ov_64_seek_lap(vf,pos,ov_pcm_seek_page); } static int _ov_d_seek_lap(OggVorbis_File *vf,double pos, int (*localseek)(OggVorbis_File *,double)){ vorbis_info *vi; float **lappcm; float **pcm; float *w1,*w2; int n1,n2,ch1,ch2,hs; int i,ret; if(vf->ready_statechannels; n1=vorbis_info_blocksize(vi,0)>>(1+hs); w1=vorbis_window(&vf->vd,0); /* window arrays from libvorbis are persistent; even if the decode state from this link gets dumped, this window array continues to exist */ lappcm=alloca(sizeof(*lappcm)*ch1); for(i=0;ivd,lappcm,n1); /* have lapping data; seek and prime the buffer */ ret=localseek(vf,pos); if(ret)return ret; ret=_ov_initprime(vf); if(ret)return(ret); /* Guard against cross-link changes; they're perfectly legal */ vi=ov_info(vf,-1); ch2=vi->channels; n2=vorbis_info_blocksize(vi,0)>>(1+hs); w2=vorbis_window(&vf->vd,0); /* consolidate and expose the buffer. */ vorbis_synthesis_lapout(&vf->vd,&pcm); /* splice */ _ov_splice(pcm,lappcm,n1,n2,ch1,ch2,w1,w2); /* done */ return(0); } int ov_time_seek_lap(OggVorbis_File *vf,double pos){ return _ov_d_seek_lap(vf,pos,ov_time_seek); } int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){ return _ov_d_seek_lap(vf,pos,ov_time_seek_page); } ================================================ FILE: 3rdParty/libvorbis/include/vorbisfile.h ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: stdio-based convenience library for opening/seeking/decoding last mod: $Id: vorbisfile.h 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #ifndef _OV_FILE_H_ #define _OV_FILE_H_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include #include "codec.h" /* The function prototypes for the callbacks are basically the same as for * the stdio functions fread, fseek, fclose, ftell. * The one difference is that the FILE * arguments have been replaced with * a void * - this is to be used as a pointer to whatever internal data these * functions might need. In the stdio case, it's just a FILE * cast to a void * * * If you use other functions, check the docs for these functions and return * the right values. For seek_func(), you *MUST* return -1 if the stream is * unseekable */ typedef struct { size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); int (*close_func) (void *datasource); long (*tell_func) (void *datasource); } ov_callbacks; /* a few sets of convenient callbacks, especially for use under * Windows where ov_open_callbacks() should always be used instead of * ov_open() to avoid problems with incompatable crt.o version linking * issues. */ static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){ if(f==NULL)return(-1); return fseek(f,off,whence); } static ov_callbacks OV_CALLBACKS_DEFAULT = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, (int (*)(void *)) fclose, (long (*)(void *)) ftell }; static ov_callbacks OV_CALLBACKS_NOCLOSE = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, (int (*)(void *)) NULL, (long (*)(void *)) ftell }; static ov_callbacks OV_CALLBACKS_STREAMONLY = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) NULL, (int (*)(void *)) fclose, (long (*)(void *)) NULL }; static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = { (size_t (*)(void *, size_t, size_t, void *)) fread, (int (*)(void *, ogg_int64_t, int)) NULL, (int (*)(void *)) NULL, (long (*)(void *)) NULL }; #define NOTOPEN 0 #define PARTOPEN 1 #define OPENED 2 #define STREAMSET 3 #define INITSET 4 typedef struct OggVorbis_File { void *datasource; /* Pointer to a FILE *, etc. */ int seekable; ogg_int64_t offset; ogg_int64_t end; ogg_sync_state oy; /* If the FILE handle isn't seekable (eg, a pipe), only the current stream appears */ int links; ogg_int64_t *offsets; ogg_int64_t *dataoffsets; long *serialnos; ogg_int64_t *pcmlengths; /* overloaded to maintain binary compatability; x2 size, stores both beginning and end values */ vorbis_info *vi; vorbis_comment *vc; /* Decoding working state local storage */ ogg_int64_t pcm_offset; int ready_state; long current_serialno; int current_link; double bittrack; double samptrack; ogg_stream_state os; /* take physical pages, weld into a logical stream of packets */ vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ vorbis_block vb; /* local working space for packet->PCM decode */ ov_callbacks callbacks; } OggVorbis_File; extern int ov_clear(OggVorbis_File *vf); extern int ov_fopen(char *path,OggVorbis_File *vf); extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks); extern int ov_test(FILE *f,OggVorbis_File *vf,char *initial,long ibytes); extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks); extern int ov_test_open(OggVorbis_File *vf); extern long ov_bitrate(OggVorbis_File *vf,int i); extern long ov_bitrate_instant(OggVorbis_File *vf); extern long ov_streams(OggVorbis_File *vf); extern long ov_seekable(OggVorbis_File *vf); extern long ov_serialnumber(OggVorbis_File *vf,int i); extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); extern double ov_time_total(OggVorbis_File *vf,int i); extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_time_seek(OggVorbis_File *vf,double pos); extern int ov_time_seek_page(OggVorbis_File *vf,double pos); extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos); extern int ov_time_seek_lap(OggVorbis_File *vf,double pos); extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos); extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); extern double ov_time_tell(OggVorbis_File *vf); extern vorbis_info *ov_info(OggVorbis_File *vf,int link); extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples, int *bitstream); extern long ov_read(OggVorbis_File *vf,char *buffer,int length, int bigendianp,int word,int sgned,int *bitstream); extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2); extern int ov_halfrate(OggVorbis_File *vf,int flag); extern int ov_halfrate_p(OggVorbis_File *vf); #ifdef __cplusplus } #endif /* __cplusplus */ #endif ================================================ FILE: 3rdParty/libvorbis/include/window.c ================================================ /******************************************************************** * * * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: window functions last mod: $Id: window.c 13293 2007-07-24 00:09:47Z xiphmont $ ********************************************************************/ #include #include #include "os.h" #include "misc.h" static float vwin64[32] = { 0.0009460463F, 0.0085006468F, 0.0235352254F, 0.0458950567F, 0.0753351908F, 0.1115073077F, 0.1539457973F, 0.2020557475F, 0.2551056759F, 0.3122276645F, 0.3724270287F, 0.4346027792F, 0.4975789974F, 0.5601459521F, 0.6211085051F, 0.6793382689F, 0.7338252629F, 0.7837245849F, 0.8283939355F, 0.8674186656F, 0.9006222429F, 0.9280614787F, 0.9500073081F, 0.9669131782F, 0.9793740220F, 0.9880792941F, 0.9937636139F, 0.9971582668F, 0.9989462667F, 0.9997230082F, 0.9999638688F, 0.9999995525F, }; static float vwin128[64] = { 0.0002365472F, 0.0021280687F, 0.0059065254F, 0.0115626550F, 0.0190823442F, 0.0284463735F, 0.0396300935F, 0.0526030430F, 0.0673285281F, 0.0837631763F, 0.1018564887F, 0.1215504095F, 0.1427789367F, 0.1654677960F, 0.1895342001F, 0.2148867160F, 0.2414252576F, 0.2690412240F, 0.2976177952F, 0.3270303960F, 0.3571473350F, 0.3878306189F, 0.4189369387F, 0.4503188188F, 0.4818259135F, 0.5133064334F, 0.5446086751F, 0.5755826278F, 0.6060816248F, 0.6359640047F, 0.6650947483F, 0.6933470543F, 0.7206038179F, 0.7467589810F, 0.7717187213F, 0.7954024542F, 0.8177436264F, 0.8386902831F, 0.8582053981F, 0.8762669622F, 0.8928678298F, 0.9080153310F, 0.9217306608F, 0.9340480615F, 0.9450138200F, 0.9546851041F, 0.9631286621F, 0.9704194171F, 0.9766389810F, 0.9818741197F, 0.9862151938F, 0.9897546035F, 0.9925852598F, 0.9947991032F, 0.9964856900F, 0.9977308602F, 0.9986155015F, 0.9992144193F, 0.9995953200F, 0.9998179155F, 0.9999331503F, 0.9999825563F, 0.9999977357F, 0.9999999720F, }; static float vwin256[128] = { 0.0000591390F, 0.0005321979F, 0.0014780301F, 0.0028960636F, 0.0047854363F, 0.0071449926F, 0.0099732775F, 0.0132685298F, 0.0170286741F, 0.0212513119F, 0.0259337111F, 0.0310727950F, 0.0366651302F, 0.0427069140F, 0.0491939614F, 0.0561216907F, 0.0634851102F, 0.0712788035F, 0.0794969160F, 0.0881331402F, 0.0971807028F, 0.1066323515F, 0.1164803426F, 0.1267164297F, 0.1373318534F, 0.1483173323F, 0.1596630553F, 0.1713586755F, 0.1833933062F, 0.1957555184F, 0.2084333404F, 0.2214142599F, 0.2346852280F, 0.2482326664F, 0.2620424757F, 0.2761000481F, 0.2903902813F, 0.3048975959F, 0.3196059553F, 0.3344988887F, 0.3495595160F, 0.3647705766F, 0.3801144597F, 0.3955732382F, 0.4111287047F, 0.4267624093F, 0.4424557009F, 0.4581897696F, 0.4739456913F, 0.4897044744F, 0.5054471075F, 0.5211546088F, 0.5368080763F, 0.5523887395F, 0.5678780103F, 0.5832575361F, 0.5985092508F, 0.6136154277F, 0.6285587300F, 0.6433222619F, 0.6578896175F, 0.6722449294F, 0.6863729144F, 0.7002589187F, 0.7138889597F, 0.7272497662F, 0.7403288154F, 0.7531143679F, 0.7655954985F, 0.7777621249F, 0.7896050322F, 0.8011158947F, 0.8122872932F, 0.8231127294F, 0.8335866365F, 0.8437043850F, 0.8534622861F, 0.8628575905F, 0.8718884835F, 0.8805540765F, 0.8888543947F, 0.8967903616F, 0.9043637797F, 0.9115773078F, 0.9184344360F, 0.9249394562F, 0.9310974312F, 0.9369141608F, 0.9423961446F, 0.9475505439F, 0.9523851406F, 0.9569082947F, 0.9611289005F, 0.9650563408F, 0.9687004405F, 0.9720714191F, 0.9751798427F, 0.9780365753F, 0.9806527301F, 0.9830396204F, 0.9852087111F, 0.9871715701F, 0.9889398207F, 0.9905250941F, 0.9919389832F, 0.9931929973F, 0.9942985174F, 0.9952667537F, 0.9961087037F, 0.9968351119F, 0.9974564312F, 0.9979827858F, 0.9984239359F, 0.9987892441F, 0.9990876435F, 0.9993276081F, 0.9995171241F, 0.9996636648F, 0.9997741654F, 0.9998550016F, 0.9999119692F, 0.9999502656F, 0.9999744742F, 0.9999885497F, 0.9999958064F, 0.9999989077F, 0.9999998584F, 0.9999999983F, }; static float vwin512[256] = { 0.0000147849F, 0.0001330607F, 0.0003695946F, 0.0007243509F, 0.0011972759F, 0.0017882983F, 0.0024973285F, 0.0033242588F, 0.0042689632F, 0.0053312973F, 0.0065110982F, 0.0078081841F, 0.0092223540F, 0.0107533880F, 0.0124010466F, 0.0141650703F, 0.0160451800F, 0.0180410758F, 0.0201524373F, 0.0223789233F, 0.0247201710F, 0.0271757958F, 0.0297453914F, 0.0324285286F, 0.0352247556F, 0.0381335972F, 0.0411545545F, 0.0442871045F, 0.0475306997F, 0.0508847676F, 0.0543487103F, 0.0579219038F, 0.0616036982F, 0.0653934164F, 0.0692903546F, 0.0732937809F, 0.0774029356F, 0.0816170305F, 0.0859352485F, 0.0903567428F, 0.0948806375F, 0.0995060259F, 0.1042319712F, 0.1090575056F, 0.1139816300F, 0.1190033137F, 0.1241214941F, 0.1293350764F, 0.1346429333F, 0.1400439046F, 0.1455367974F, 0.1511203852F, 0.1567934083F, 0.1625545735F, 0.1684025537F, 0.1743359881F, 0.1803534820F, 0.1864536069F, 0.1926349000F, 0.1988958650F, 0.2052349715F, 0.2116506555F, 0.2181413191F, 0.2247053313F, 0.2313410275F, 0.2380467105F, 0.2448206500F, 0.2516610835F, 0.2585662164F, 0.2655342226F, 0.2725632448F, 0.2796513950F, 0.2867967551F, 0.2939973773F, 0.3012512852F, 0.3085564739F, 0.3159109111F, 0.3233125375F, 0.3307592680F, 0.3382489922F, 0.3457795756F, 0.3533488602F, 0.3609546657F, 0.3685947904F, 0.3762670121F, 0.3839690896F, 0.3916987634F, 0.3994537572F, 0.4072317788F, 0.4150305215F, 0.4228476653F, 0.4306808783F, 0.4385278181F, 0.4463861329F, 0.4542534630F, 0.4621274424F, 0.4700057001F, 0.4778858615F, 0.4857655502F, 0.4936423891F, 0.5015140023F, 0.5093780165F, 0.5172320626F, 0.5250737772F, 0.5329008043F, 0.5407107971F, 0.5485014192F, 0.5562703465F, 0.5640152688F, 0.5717338914F, 0.5794239366F, 0.5870831457F, 0.5947092801F, 0.6023001235F, 0.6098534829F, 0.6173671907F, 0.6248391059F, 0.6322671161F, 0.6396491384F, 0.6469831217F, 0.6542670475F, 0.6614989319F, 0.6686768267F, 0.6757988210F, 0.6828630426F, 0.6898676592F, 0.6968108799F, 0.7036909564F, 0.7105061843F, 0.7172549043F, 0.7239355032F, 0.7305464154F, 0.7370861235F, 0.7435531598F, 0.7499461068F, 0.7562635986F, 0.7625043214F, 0.7686670148F, 0.7747504721F, 0.7807535410F, 0.7866751247F, 0.7925141825F, 0.7982697296F, 0.8039408387F, 0.8095266395F, 0.8150263196F, 0.8204391248F, 0.8257643590F, 0.8310013848F, 0.8361496236F, 0.8412085555F, 0.8461777194F, 0.8510567129F, 0.8558451924F, 0.8605428730F, 0.8651495278F, 0.8696649882F, 0.8740891432F, 0.8784219392F, 0.8826633797F, 0.8868135244F, 0.8908724888F, 0.8948404441F, 0.8987176157F, 0.9025042831F, 0.9062007791F, 0.9098074886F, 0.9133248482F, 0.9167533451F, 0.9200935163F, 0.9233459472F, 0.9265112712F, 0.9295901680F, 0.9325833632F, 0.9354916263F, 0.9383157705F, 0.9410566504F, 0.9437151618F, 0.9462922398F, 0.9487888576F, 0.9512060252F, 0.9535447882F, 0.9558062262F, 0.9579914516F, 0.9601016078F, 0.9621378683F, 0.9641014348F, 0.9659935361F, 0.9678154261F, 0.9695683830F, 0.9712537071F, 0.9728727198F, 0.9744267618F, 0.9759171916F, 0.9773453842F, 0.9787127293F, 0.9800206298F, 0.9812705006F, 0.9824637665F, 0.9836018613F, 0.9846862258F, 0.9857183066F, 0.9866995544F, 0.9876314227F, 0.9885153662F, 0.9893528393F, 0.9901452948F, 0.9908941823F, 0.9916009470F, 0.9922670279F, 0.9928938570F, 0.9934828574F, 0.9940354423F, 0.9945530133F, 0.9950369595F, 0.9954886562F, 0.9959094633F, 0.9963007242F, 0.9966637649F, 0.9969998925F, 0.9973103939F, 0.9975965351F, 0.9978595598F, 0.9981006885F, 0.9983211172F, 0.9985220166F, 0.9987045311F, 0.9988697776F, 0.9990188449F, 0.9991527924F, 0.9992726499F, 0.9993794157F, 0.9994740570F, 0.9995575079F, 0.9996306699F, 0.9996944099F, 0.9997495605F, 0.9997969190F, 0.9998372465F, 0.9998712678F, 0.9998996704F, 0.9999231041F, 0.9999421807F, 0.9999574732F, 0.9999695157F, 0.9999788026F, 0.9999857885F, 0.9999908879F, 0.9999944746F, 0.9999968817F, 0.9999984010F, 0.9999992833F, 0.9999997377F, 0.9999999317F, 0.9999999911F, 0.9999999999F, }; static float vwin1024[512] = { 0.0000036962F, 0.0000332659F, 0.0000924041F, 0.0001811086F, 0.0002993761F, 0.0004472021F, 0.0006245811F, 0.0008315063F, 0.0010679699F, 0.0013339631F, 0.0016294757F, 0.0019544965F, 0.0023090133F, 0.0026930125F, 0.0031064797F, 0.0035493989F, 0.0040217533F, 0.0045235250F, 0.0050546946F, 0.0056152418F, 0.0062051451F, 0.0068243817F, 0.0074729278F, 0.0081507582F, 0.0088578466F, 0.0095941655F, 0.0103596863F, 0.0111543789F, 0.0119782122F, 0.0128311538F, 0.0137131701F, 0.0146242260F, 0.0155642855F, 0.0165333111F, 0.0175312640F, 0.0185581042F, 0.0196137903F, 0.0206982797F, 0.0218115284F, 0.0229534910F, 0.0241241208F, 0.0253233698F, 0.0265511886F, 0.0278075263F, 0.0290923308F, 0.0304055484F, 0.0317471241F, 0.0331170013F, 0.0345151222F, 0.0359414274F, 0.0373958560F, 0.0388783456F, 0.0403888325F, 0.0419272511F, 0.0434935347F, 0.0450876148F, 0.0467094213F, 0.0483588828F, 0.0500359261F, 0.0517404765F, 0.0534724575F, 0.0552317913F, 0.0570183983F, 0.0588321971F, 0.0606731048F, 0.0625410369F, 0.0644359070F, 0.0663576272F, 0.0683061077F, 0.0702812571F, 0.0722829821F, 0.0743111878F, 0.0763657775F, 0.0784466526F, 0.0805537129F, 0.0826868561F, 0.0848459782F, 0.0870309736F, 0.0892417345F, 0.0914781514F, 0.0937401128F, 0.0960275056F, 0.0983402145F, 0.1006781223F, 0.1030411101F, 0.1054290568F, 0.1078418397F, 0.1102793336F, 0.1127414119F, 0.1152279457F, 0.1177388042F, 0.1202738544F, 0.1228329618F, 0.1254159892F, 0.1280227980F, 0.1306532471F, 0.1333071937F, 0.1359844927F, 0.1386849970F, 0.1414085575F, 0.1441550230F, 0.1469242403F, 0.1497160539F, 0.1525303063F, 0.1553668381F, 0.1582254875F, 0.1611060909F, 0.1640084822F, 0.1669324936F, 0.1698779549F, 0.1728446939F, 0.1758325362F, 0.1788413055F, 0.1818708232F, 0.1849209084F, 0.1879913785F, 0.1910820485F, 0.1941927312F, 0.1973232376F, 0.2004733764F, 0.2036429541F, 0.2068317752F, 0.2100396421F, 0.2132663552F, 0.2165117125F, 0.2197755102F, 0.2230575422F, 0.2263576007F, 0.2296754753F, 0.2330109540F, 0.2363638225F, 0.2397338646F, 0.2431208619F, 0.2465245941F, 0.2499448389F, 0.2533813719F, 0.2568339669F, 0.2603023956F, 0.2637864277F, 0.2672858312F, 0.2708003718F, 0.2743298135F, 0.2778739186F, 0.2814324472F, 0.2850051576F, 0.2885918065F, 0.2921921485F, 0.2958059366F, 0.2994329219F, 0.3030728538F, 0.3067254799F, 0.3103905462F, 0.3140677969F, 0.3177569747F, 0.3214578205F, 0.3251700736F, 0.3288934718F, 0.3326277513F, 0.3363726468F, 0.3401278914F, 0.3438932168F, 0.3476683533F, 0.3514530297F, 0.3552469734F, 0.3590499106F, 0.3628615659F, 0.3666816630F, 0.3705099239F, 0.3743460698F, 0.3781898204F, 0.3820408945F, 0.3858990095F, 0.3897638820F, 0.3936352274F, 0.3975127601F, 0.4013961936F, 0.4052852405F, 0.4091796123F, 0.4130790198F, 0.4169831732F, 0.4208917815F, 0.4248045534F, 0.4287211965F, 0.4326414181F, 0.4365649248F, 0.4404914225F, 0.4444206167F, 0.4483522125F, 0.4522859146F, 0.4562214270F, 0.4601584538F, 0.4640966984F, 0.4680358644F, 0.4719756548F, 0.4759157726F, 0.4798559209F, 0.4837958024F, 0.4877351199F, 0.4916735765F, 0.4956108751F, 0.4995467188F, 0.5034808109F, 0.5074128550F, 0.5113425550F, 0.5152696149F, 0.5191937395F, 0.5231146336F, 0.5270320028F, 0.5309455530F, 0.5348549910F, 0.5387600239F, 0.5426603597F, 0.5465557070F, 0.5504457754F, 0.5543302752F, 0.5582089175F, 0.5620814145F, 0.5659474793F, 0.5698068262F, 0.5736591704F, 0.5775042283F, 0.5813417176F, 0.5851713571F, 0.5889928670F, 0.5928059689F, 0.5966103856F, 0.6004058415F, 0.6041920626F, 0.6079687761F, 0.6117357113F, 0.6154925986F, 0.6192391705F, 0.6229751612F, 0.6267003064F, 0.6304143441F, 0.6341170137F, 0.6378080569F, 0.6414872173F, 0.6451542405F, 0.6488088741F, 0.6524508681F, 0.6560799742F, 0.6596959469F, 0.6632985424F, 0.6668875197F, 0.6704626398F, 0.6740236662F, 0.6775703649F, 0.6811025043F, 0.6846198554F, 0.6881221916F, 0.6916092892F, 0.6950809269F, 0.6985368861F, 0.7019769510F, 0.7054009085F, 0.7088085484F, 0.7121996632F, 0.7155740484F, 0.7189315023F, 0.7222718263F, 0.7255948245F, 0.7289003043F, 0.7321880760F, 0.7354579530F, 0.7387097518F, 0.7419432921F, 0.7451583966F, 0.7483548915F, 0.7515326059F, 0.7546913723F, 0.7578310265F, 0.7609514077F, 0.7640523581F, 0.7671337237F, 0.7701953535F, 0.7732371001F, 0.7762588195F, 0.7792603711F, 0.7822416178F, 0.7852024259F, 0.7881426654F, 0.7910622097F, 0.7939609356F, 0.7968387237F, 0.7996954579F, 0.8025310261F, 0.8053453193F, 0.8081382324F, 0.8109096638F, 0.8136595156F, 0.8163876936F, 0.8190941071F, 0.8217786690F, 0.8244412960F, 0.8270819086F, 0.8297004305F, 0.8322967896F, 0.8348709171F, 0.8374227481F, 0.8399522213F, 0.8424592789F, 0.8449438672F, 0.8474059356F, 0.8498454378F, 0.8522623306F, 0.8546565748F, 0.8570281348F, 0.8593769787F, 0.8617030779F, 0.8640064080F, 0.8662869477F, 0.8685446796F, 0.8707795899F, 0.8729916682F, 0.8751809079F, 0.8773473059F, 0.8794908626F, 0.8816115819F, 0.8837094713F, 0.8857845418F, 0.8878368079F, 0.8898662874F, 0.8918730019F, 0.8938569760F, 0.8958182380F, 0.8977568194F, 0.8996727552F, 0.9015660837F, 0.9034368465F, 0.9052850885F, 0.9071108577F, 0.9089142057F, 0.9106951869F, 0.9124538591F, 0.9141902832F, 0.9159045233F, 0.9175966464F, 0.9192667228F, 0.9209148257F, 0.9225410313F, 0.9241454187F, 0.9257280701F, 0.9272890704F, 0.9288285075F, 0.9303464720F, 0.9318430576F, 0.9333183603F, 0.9347724792F, 0.9362055158F, 0.9376175745F, 0.9390087622F, 0.9403791881F, 0.9417289644F, 0.9430582055F, 0.9443670283F, 0.9456555521F, 0.9469238986F, 0.9481721917F, 0.9494005577F, 0.9506091252F, 0.9517980248F, 0.9529673894F, 0.9541173540F, 0.9552480557F, 0.9563596334F, 0.9574522282F, 0.9585259830F, 0.9595810428F, 0.9606175542F, 0.9616356656F, 0.9626355274F, 0.9636172915F, 0.9645811114F, 0.9655271425F, 0.9664555414F, 0.9673664664F, 0.9682600774F, 0.9691365355F, 0.9699960034F, 0.9708386448F, 0.9716646250F, 0.9724741103F, 0.9732672685F, 0.9740442683F, 0.9748052795F, 0.9755504729F, 0.9762800205F, 0.9769940950F, 0.9776928703F, 0.9783765210F, 0.9790452223F, 0.9796991504F, 0.9803384823F, 0.9809633954F, 0.9815740679F, 0.9821706784F, 0.9827534063F, 0.9833224312F, 0.9838779332F, 0.9844200928F, 0.9849490910F, 0.9854651087F, 0.9859683274F, 0.9864589286F, 0.9869370940F, 0.9874030054F, 0.9878568447F, 0.9882987937F, 0.9887290343F, 0.9891477481F, 0.9895551169F, 0.9899513220F, 0.9903365446F, 0.9907109658F, 0.9910747662F, 0.9914281260F, 0.9917712252F, 0.9921042433F, 0.9924273593F, 0.9927407516F, 0.9930445982F, 0.9933390763F, 0.9936243626F, 0.9939006331F, 0.9941680631F, 0.9944268269F, 0.9946770982F, 0.9949190498F, 0.9951528537F, 0.9953786808F, 0.9955967011F, 0.9958070836F, 0.9960099963F, 0.9962056061F, 0.9963940787F, 0.9965755786F, 0.9967502693F, 0.9969183129F, 0.9970798704F, 0.9972351013F, 0.9973841640F, 0.9975272151F, 0.9976644103F, 0.9977959036F, 0.9979218476F, 0.9980423932F, 0.9981576901F, 0.9982678862F, 0.9983731278F, 0.9984735596F, 0.9985693247F, 0.9986605645F, 0.9987474186F, 0.9988300248F, 0.9989085193F, 0.9989830364F, 0.9990537085F, 0.9991206662F, 0.9991840382F, 0.9992439513F, 0.9993005303F, 0.9993538982F, 0.9994041757F, 0.9994514817F, 0.9994959330F, 0.9995376444F, 0.9995767286F, 0.9996132960F, 0.9996474550F, 0.9996793121F, 0.9997089710F, 0.9997365339F, 0.9997621003F, 0.9997857677F, 0.9998076311F, 0.9998277836F, 0.9998463156F, 0.9998633155F, 0.9998788692F, 0.9998930603F, 0.9999059701F, 0.9999176774F, 0.9999282586F, 0.9999377880F, 0.9999463370F, 0.9999539749F, 0.9999607685F, 0.9999667820F, 0.9999720773F, 0.9999767136F, 0.9999807479F, 0.9999842344F, 0.9999872249F, 0.9999897688F, 0.9999919127F, 0.9999937009F, 0.9999951749F, 0.9999963738F, 0.9999973342F, 0.9999980900F, 0.9999986724F, 0.9999991103F, 0.9999994297F, 0.9999996543F, 0.9999998049F, 0.9999999000F, 0.9999999552F, 0.9999999836F, 0.9999999957F, 0.9999999994F, 1.0000000000F, }; static float vwin2048[1024] = { 0.0000009241F, 0.0000083165F, 0.0000231014F, 0.0000452785F, 0.0000748476F, 0.0001118085F, 0.0001561608F, 0.0002079041F, 0.0002670379F, 0.0003335617F, 0.0004074748F, 0.0004887765F, 0.0005774661F, 0.0006735427F, 0.0007770054F, 0.0008878533F, 0.0010060853F, 0.0011317002F, 0.0012646969F, 0.0014050742F, 0.0015528307F, 0.0017079650F, 0.0018704756F, 0.0020403610F, 0.0022176196F, 0.0024022497F, 0.0025942495F, 0.0027936173F, 0.0030003511F, 0.0032144490F, 0.0034359088F, 0.0036647286F, 0.0039009061F, 0.0041444391F, 0.0043953253F, 0.0046535621F, 0.0049191472F, 0.0051920781F, 0.0054723520F, 0.0057599664F, 0.0060549184F, 0.0063572052F, 0.0066668239F, 0.0069837715F, 0.0073080449F, 0.0076396410F, 0.0079785566F, 0.0083247884F, 0.0086783330F, 0.0090391871F, 0.0094073470F, 0.0097828092F, 0.0101655700F, 0.0105556258F, 0.0109529726F, 0.0113576065F, 0.0117695237F, 0.0121887200F, 0.0126151913F, 0.0130489335F, 0.0134899422F, 0.0139382130F, 0.0143937415F, 0.0148565233F, 0.0153265536F, 0.0158038279F, 0.0162883413F, 0.0167800889F, 0.0172790660F, 0.0177852675F, 0.0182986882F, 0.0188193231F, 0.0193471668F, 0.0198822141F, 0.0204244594F, 0.0209738974F, 0.0215305225F, 0.0220943289F, 0.0226653109F, 0.0232434627F, 0.0238287784F, 0.0244212519F, 0.0250208772F, 0.0256276481F, 0.0262415582F, 0.0268626014F, 0.0274907711F, 0.0281260608F, 0.0287684638F, 0.0294179736F, 0.0300745833F, 0.0307382859F, 0.0314090747F, 0.0320869424F, 0.0327718819F, 0.0334638860F, 0.0341629474F, 0.0348690586F, 0.0355822122F, 0.0363024004F, 0.0370296157F, 0.0377638502F, 0.0385050960F, 0.0392533451F, 0.0400085896F, 0.0407708211F, 0.0415400315F, 0.0423162123F, 0.0430993552F, 0.0438894515F, 0.0446864926F, 0.0454904698F, 0.0463013742F, 0.0471191969F, 0.0479439288F, 0.0487755607F, 0.0496140836F, 0.0504594879F, 0.0513117642F, 0.0521709031F, 0.0530368949F, 0.0539097297F, 0.0547893979F, 0.0556758894F, 0.0565691941F, 0.0574693019F, 0.0583762026F, 0.0592898858F, 0.0602103410F, 0.0611375576F, 0.0620715250F, 0.0630122324F, 0.0639596688F, 0.0649138234F, 0.0658746848F, 0.0668422421F, 0.0678164838F, 0.0687973985F, 0.0697849746F, 0.0707792005F, 0.0717800645F, 0.0727875547F, 0.0738016591F, 0.0748223656F, 0.0758496620F, 0.0768835359F, 0.0779239751F, 0.0789709668F, 0.0800244985F, 0.0810845574F, 0.0821511306F, 0.0832242052F, 0.0843037679F, 0.0853898056F, 0.0864823050F, 0.0875812525F, 0.0886866347F, 0.0897984378F, 0.0909166480F, 0.0920412513F, 0.0931722338F, 0.0943095813F, 0.0954532795F, 0.0966033140F, 0.0977596702F, 0.0989223336F, 0.1000912894F, 0.1012665227F, 0.1024480185F, 0.1036357616F, 0.1048297369F, 0.1060299290F, 0.1072363224F, 0.1084489014F, 0.1096676504F, 0.1108925534F, 0.1121235946F, 0.1133607577F, 0.1146040267F, 0.1158533850F, 0.1171088163F, 0.1183703040F, 0.1196378312F, 0.1209113812F, 0.1221909370F, 0.1234764815F, 0.1247679974F, 0.1260654674F, 0.1273688740F, 0.1286781995F, 0.1299934263F, 0.1313145365F, 0.1326415121F, 0.1339743349F, 0.1353129866F, 0.1366574490F, 0.1380077035F, 0.1393637315F, 0.1407255141F, 0.1420930325F, 0.1434662677F, 0.1448452004F, 0.1462298115F, 0.1476200814F, 0.1490159906F, 0.1504175195F, 0.1518246482F, 0.1532373569F, 0.1546556253F, 0.1560794333F, 0.1575087606F, 0.1589435866F, 0.1603838909F, 0.1618296526F, 0.1632808509F, 0.1647374648F, 0.1661994731F, 0.1676668546F, 0.1691395880F, 0.1706176516F, 0.1721010238F, 0.1735896829F, 0.1750836068F, 0.1765827736F, 0.1780871610F, 0.1795967468F, 0.1811115084F, 0.1826314234F, 0.1841564689F, 0.1856866221F, 0.1872218600F, 0.1887621595F, 0.1903074974F, 0.1918578503F, 0.1934131947F, 0.1949735068F, 0.1965387630F, 0.1981089393F, 0.1996840117F, 0.2012639560F, 0.2028487479F, 0.2044383630F, 0.2060327766F, 0.2076319642F, 0.2092359007F, 0.2108445614F, 0.2124579211F, 0.2140759545F, 0.2156986364F, 0.2173259411F, 0.2189578432F, 0.2205943168F, 0.2222353361F, 0.2238808751F, 0.2255309076F, 0.2271854073F, 0.2288443480F, 0.2305077030F, 0.2321754457F, 0.2338475493F, 0.2355239869F, 0.2372047315F, 0.2388897560F, 0.2405790329F, 0.2422725350F, 0.2439702347F, 0.2456721043F, 0.2473781159F, 0.2490882418F, 0.2508024539F, 0.2525207240F, 0.2542430237F, 0.2559693248F, 0.2576995986F, 0.2594338166F, 0.2611719498F, 0.2629139695F, 0.2646598466F, 0.2664095520F, 0.2681630564F, 0.2699203304F, 0.2716813445F, 0.2734460691F, 0.2752144744F, 0.2769865307F, 0.2787622079F, 0.2805414760F, 0.2823243047F, 0.2841106637F, 0.2859005227F, 0.2876938509F, 0.2894906179F, 0.2912907928F, 0.2930943447F, 0.2949012426F, 0.2967114554F, 0.2985249520F, 0.3003417009F, 0.3021616708F, 0.3039848301F, 0.3058111471F, 0.3076405901F, 0.3094731273F, 0.3113087266F, 0.3131473560F, 0.3149889833F, 0.3168335762F, 0.3186811024F, 0.3205315294F, 0.3223848245F, 0.3242409552F, 0.3260998886F, 0.3279615918F, 0.3298260319F, 0.3316931758F, 0.3335629903F, 0.3354354423F, 0.3373104982F, 0.3391881247F, 0.3410682882F, 0.3429509551F, 0.3448360917F, 0.3467236642F, 0.3486136387F, 0.3505059811F, 0.3524006575F, 0.3542976336F, 0.3561968753F, 0.3580983482F, 0.3600020179F, 0.3619078499F, 0.3638158096F, 0.3657258625F, 0.3676379737F, 0.3695521086F, 0.3714682321F, 0.3733863094F, 0.3753063055F, 0.3772281852F, 0.3791519134F, 0.3810774548F, 0.3830047742F, 0.3849338362F, 0.3868646053F, 0.3887970459F, 0.3907311227F, 0.3926667998F, 0.3946040417F, 0.3965428125F, 0.3984830765F, 0.4004247978F, 0.4023679403F, 0.4043124683F, 0.4062583455F, 0.4082055359F, 0.4101540034F, 0.4121037117F, 0.4140546246F, 0.4160067058F, 0.4179599190F, 0.4199142277F, 0.4218695956F, 0.4238259861F, 0.4257833627F, 0.4277416888F, 0.4297009279F, 0.4316610433F, 0.4336219983F, 0.4355837562F, 0.4375462803F, 0.4395095337F, 0.4414734797F, 0.4434380815F, 0.4454033021F, 0.4473691046F, 0.4493354521F, 0.4513023078F, 0.4532696345F, 0.4552373954F, 0.4572055533F, 0.4591740713F, 0.4611429123F, 0.4631120393F, 0.4650814151F, 0.4670510028F, 0.4690207650F, 0.4709906649F, 0.4729606651F, 0.4749307287F, 0.4769008185F, 0.4788708972F, 0.4808409279F, 0.4828108732F, 0.4847806962F, 0.4867503597F, 0.4887198264F, 0.4906890593F, 0.4926580213F, 0.4946266753F, 0.4965949840F, 0.4985629105F, 0.5005304176F, 0.5024974683F, 0.5044640255F, 0.5064300522F, 0.5083955114F, 0.5103603659F, 0.5123245790F, 0.5142881136F, 0.5162509328F, 0.5182129997F, 0.5201742774F, 0.5221347290F, 0.5240943178F, 0.5260530070F, 0.5280107598F, 0.5299675395F, 0.5319233095F, 0.5338780330F, 0.5358316736F, 0.5377841946F, 0.5397355596F, 0.5416857320F, 0.5436346755F, 0.5455823538F, 0.5475287304F, 0.5494737691F, 0.5514174337F, 0.5533596881F, 0.5553004962F, 0.5572398218F, 0.5591776291F, 0.5611138821F, 0.5630485449F, 0.5649815818F, 0.5669129570F, 0.5688426349F, 0.5707705799F, 0.5726967564F, 0.5746211290F, 0.5765436624F, 0.5784643212F, 0.5803830702F, 0.5822998743F, 0.5842146984F, 0.5861275076F, 0.5880382669F, 0.5899469416F, 0.5918534968F, 0.5937578981F, 0.5956601107F, 0.5975601004F, 0.5994578326F, 0.6013532732F, 0.6032463880F, 0.6051371429F, 0.6070255039F, 0.6089114372F, 0.6107949090F, 0.6126758856F, 0.6145543334F, 0.6164302191F, 0.6183035092F, 0.6201741706F, 0.6220421700F, 0.6239074745F, 0.6257700513F, 0.6276298674F, 0.6294868903F, 0.6313410873F, 0.6331924262F, 0.6350408745F, 0.6368864001F, 0.6387289710F, 0.6405685552F, 0.6424051209F, 0.6442386364F, 0.6460690702F, 0.6478963910F, 0.6497205673F, 0.6515415682F, 0.6533593625F, 0.6551739194F, 0.6569852082F, 0.6587931984F, 0.6605978593F, 0.6623991609F, 0.6641970728F, 0.6659915652F, 0.6677826081F, 0.6695701718F, 0.6713542268F, 0.6731347437F, 0.6749116932F, 0.6766850461F, 0.6784547736F, 0.6802208469F, 0.6819832374F, 0.6837419164F, 0.6854968559F, 0.6872480275F, 0.6889954034F, 0.6907389556F, 0.6924786566F, 0.6942144788F, 0.6959463950F, 0.6976743780F, 0.6993984008F, 0.7011184365F, 0.7028344587F, 0.7045464407F, 0.7062543564F, 0.7079581796F, 0.7096578844F, 0.7113534450F, 0.7130448359F, 0.7147320316F, 0.7164150070F, 0.7180937371F, 0.7197681970F, 0.7214383620F, 0.7231042077F, 0.7247657098F, 0.7264228443F, 0.7280755871F, 0.7297239147F, 0.7313678035F, 0.7330072301F, 0.7346421715F, 0.7362726046F, 0.7378985069F, 0.7395198556F, 0.7411366285F, 0.7427488034F, 0.7443563584F, 0.7459592717F, 0.7475575218F, 0.7491510873F, 0.7507399471F, 0.7523240803F, 0.7539034661F, 0.7554780839F, 0.7570479136F, 0.7586129349F, 0.7601731279F, 0.7617284730F, 0.7632789506F, 0.7648245416F, 0.7663652267F, 0.7679009872F, 0.7694318044F, 0.7709576599F, 0.7724785354F, 0.7739944130F, 0.7755052749F, 0.7770111035F, 0.7785118815F, 0.7800075916F, 0.7814982170F, 0.7829837410F, 0.7844641472F, 0.7859394191F, 0.7874095408F, 0.7888744965F, 0.7903342706F, 0.7917888476F, 0.7932382124F, 0.7946823501F, 0.7961212460F, 0.7975548855F, 0.7989832544F, 0.8004063386F, 0.8018241244F, 0.8032365981F, 0.8046437463F, 0.8060455560F, 0.8074420141F, 0.8088331080F, 0.8102188253F, 0.8115991536F, 0.8129740810F, 0.8143435957F, 0.8157076861F, 0.8170663409F, 0.8184195489F, 0.8197672994F, 0.8211095817F, 0.8224463853F, 0.8237777001F, 0.8251035161F, 0.8264238235F, 0.8277386129F, 0.8290478750F, 0.8303516008F, 0.8316497814F, 0.8329424083F, 0.8342294731F, 0.8355109677F, 0.8367868841F, 0.8380572148F, 0.8393219523F, 0.8405810893F, 0.8418346190F, 0.8430825345F, 0.8443248294F, 0.8455614974F, 0.8467925323F, 0.8480179285F, 0.8492376802F, 0.8504517822F, 0.8516602292F, 0.8528630164F, 0.8540601391F, 0.8552515928F, 0.8564373733F, 0.8576174766F, 0.8587918990F, 0.8599606368F, 0.8611236868F, 0.8622810460F, 0.8634327113F, 0.8645786802F, 0.8657189504F, 0.8668535195F, 0.8679823857F, 0.8691055472F, 0.8702230025F, 0.8713347503F, 0.8724407896F, 0.8735411194F, 0.8746357394F, 0.8757246489F, 0.8768078479F, 0.8778853364F, 0.8789571146F, 0.8800231832F, 0.8810835427F, 0.8821381942F, 0.8831871387F, 0.8842303777F, 0.8852679127F, 0.8862997456F, 0.8873258784F, 0.8883463132F, 0.8893610527F, 0.8903700994F, 0.8913734562F, 0.8923711263F, 0.8933631129F, 0.8943494196F, 0.8953300500F, 0.8963050083F, 0.8972742985F, 0.8982379249F, 0.8991958922F, 0.9001482052F, 0.9010948688F, 0.9020358883F, 0.9029712690F, 0.9039010165F, 0.9048251367F, 0.9057436357F, 0.9066565195F, 0.9075637946F, 0.9084654678F, 0.9093615456F, 0.9102520353F, 0.9111369440F, 0.9120162792F, 0.9128900484F, 0.9137582595F, 0.9146209204F, 0.9154780394F, 0.9163296248F, 0.9171756853F, 0.9180162296F, 0.9188512667F, 0.9196808057F, 0.9205048559F, 0.9213234270F, 0.9221365285F, 0.9229441704F, 0.9237463629F, 0.9245431160F, 0.9253344404F, 0.9261203465F, 0.9269008453F, 0.9276759477F, 0.9284456648F, 0.9292100080F, 0.9299689889F, 0.9307226190F, 0.9314709103F, 0.9322138747F, 0.9329515245F, 0.9336838721F, 0.9344109300F, 0.9351327108F, 0.9358492275F, 0.9365604931F, 0.9372665208F, 0.9379673239F, 0.9386629160F, 0.9393533107F, 0.9400385220F, 0.9407185637F, 0.9413934501F, 0.9420631954F, 0.9427278141F, 0.9433873208F, 0.9440417304F, 0.9446910576F, 0.9453353176F, 0.9459745255F, 0.9466086968F, 0.9472378469F, 0.9478619915F, 0.9484811463F, 0.9490953274F, 0.9497045506F, 0.9503088323F, 0.9509081888F, 0.9515026365F, 0.9520921921F, 0.9526768723F, 0.9532566940F, 0.9538316742F, 0.9544018300F, 0.9549671786F, 0.9555277375F, 0.9560835241F, 0.9566345562F, 0.9571808513F, 0.9577224275F, 0.9582593027F, 0.9587914949F, 0.9593190225F, 0.9598419038F, 0.9603601571F, 0.9608738012F, 0.9613828546F, 0.9618873361F, 0.9623872646F, 0.9628826591F, 0.9633735388F, 0.9638599227F, 0.9643418303F, 0.9648192808F, 0.9652922939F, 0.9657608890F, 0.9662250860F, 0.9666849046F, 0.9671403646F, 0.9675914861F, 0.9680382891F, 0.9684807937F, 0.9689190202F, 0.9693529890F, 0.9697827203F, 0.9702082347F, 0.9706295529F, 0.9710466953F, 0.9714596828F, 0.9718685362F, 0.9722732762F, 0.9726739240F, 0.9730705005F, 0.9734630267F, 0.9738515239F, 0.9742360134F, 0.9746165163F, 0.9749930540F, 0.9753656481F, 0.9757343198F, 0.9760990909F, 0.9764599829F, 0.9768170175F, 0.9771702164F, 0.9775196013F, 0.9778651941F, 0.9782070167F, 0.9785450909F, 0.9788794388F, 0.9792100824F, 0.9795370437F, 0.9798603449F, 0.9801800080F, 0.9804960554F, 0.9808085092F, 0.9811173916F, 0.9814227251F, 0.9817245318F, 0.9820228343F, 0.9823176549F, 0.9826090160F, 0.9828969402F, 0.9831814498F, 0.9834625674F, 0.9837403156F, 0.9840147169F, 0.9842857939F, 0.9845535692F, 0.9848180654F, 0.9850793052F, 0.9853373113F, 0.9855921062F, 0.9858437127F, 0.9860921535F, 0.9863374512F, 0.9865796287F, 0.9868187085F, 0.9870547136F, 0.9872876664F, 0.9875175899F, 0.9877445067F, 0.9879684396F, 0.9881894112F, 0.9884074444F, 0.9886225619F, 0.9888347863F, 0.9890441404F, 0.9892506468F, 0.9894543284F, 0.9896552077F, 0.9898533074F, 0.9900486502F, 0.9902412587F, 0.9904311555F, 0.9906183633F, 0.9908029045F, 0.9909848019F, 0.9911640779F, 0.9913407550F, 0.9915148557F, 0.9916864025F, 0.9918554179F, 0.9920219241F, 0.9921859437F, 0.9923474989F, 0.9925066120F, 0.9926633054F, 0.9928176012F, 0.9929695218F, 0.9931190891F, 0.9932663254F, 0.9934112527F, 0.9935538932F, 0.9936942686F, 0.9938324012F, 0.9939683126F, 0.9941020248F, 0.9942335597F, 0.9943629388F, 0.9944901841F, 0.9946153170F, 0.9947383593F, 0.9948593325F, 0.9949782579F, 0.9950951572F, 0.9952100516F, 0.9953229625F, 0.9954339111F, 0.9955429186F, 0.9956500062F, 0.9957551948F, 0.9958585056F, 0.9959599593F, 0.9960595769F, 0.9961573792F, 0.9962533869F, 0.9963476206F, 0.9964401009F, 0.9965308483F, 0.9966198833F, 0.9967072261F, 0.9967928971F, 0.9968769164F, 0.9969593041F, 0.9970400804F, 0.9971192651F, 0.9971968781F, 0.9972729391F, 0.9973474680F, 0.9974204842F, 0.9974920074F, 0.9975620569F, 0.9976306521F, 0.9976978122F, 0.9977635565F, 0.9978279039F, 0.9978908736F, 0.9979524842F, 0.9980127547F, 0.9980717037F, 0.9981293499F, 0.9981857116F, 0.9982408073F, 0.9982946554F, 0.9983472739F, 0.9983986810F, 0.9984488947F, 0.9984979328F, 0.9985458132F, 0.9985925534F, 0.9986381711F, 0.9986826838F, 0.9987261086F, 0.9987684630F, 0.9988097640F, 0.9988500286F, 0.9988892738F, 0.9989275163F, 0.9989647727F, 0.9990010597F, 0.9990363938F, 0.9990707911F, 0.9991042679F, 0.9991368404F, 0.9991685244F, 0.9991993358F, 0.9992292905F, 0.9992584038F, 0.9992866914F, 0.9993141686F, 0.9993408506F, 0.9993667526F, 0.9993918895F, 0.9994162761F, 0.9994399273F, 0.9994628576F, 0.9994850815F, 0.9995066133F, 0.9995274672F, 0.9995476574F, 0.9995671978F, 0.9995861021F, 0.9996043841F, 0.9996220573F, 0.9996391352F, 0.9996556310F, 0.9996715579F, 0.9996869288F, 0.9997017568F, 0.9997160543F, 0.9997298342F, 0.9997431088F, 0.9997558905F, 0.9997681914F, 0.9997800236F, 0.9997913990F, 0.9998023292F, 0.9998128261F, 0.9998229009F, 0.9998325650F, 0.9998418296F, 0.9998507058F, 0.9998592044F, 0.9998673362F, 0.9998751117F, 0.9998825415F, 0.9998896358F, 0.9998964047F, 0.9999028584F, 0.9999090066F, 0.9999148590F, 0.9999204253F, 0.9999257148F, 0.9999307368F, 0.9999355003F, 0.9999400144F, 0.9999442878F, 0.9999483293F, 0.9999521472F, 0.9999557499F, 0.9999591457F, 0.9999623426F, 0.9999653483F, 0.9999681708F, 0.9999708175F, 0.9999732959F, 0.9999756132F, 0.9999777765F, 0.9999797928F, 0.9999816688F, 0.9999834113F, 0.9999850266F, 0.9999865211F, 0.9999879009F, 0.9999891721F, 0.9999903405F, 0.9999914118F, 0.9999923914F, 0.9999932849F, 0.9999940972F, 0.9999948336F, 0.9999954989F, 0.9999960978F, 0.9999966349F, 0.9999971146F, 0.9999975411F, 0.9999979185F, 0.9999982507F, 0.9999985414F, 0.9999987944F, 0.9999990129F, 0.9999992003F, 0.9999993596F, 0.9999994939F, 0.9999996059F, 0.9999996981F, 0.9999997732F, 0.9999998333F, 0.9999998805F, 0.9999999170F, 0.9999999444F, 0.9999999643F, 0.9999999784F, 0.9999999878F, 0.9999999937F, 0.9999999972F, 0.9999999990F, 0.9999999997F, 1.0000000000F, 1.0000000000F, }; static float vwin4096[2048] = { 0.0000002310F, 0.0000020791F, 0.0000057754F, 0.0000113197F, 0.0000187121F, 0.0000279526F, 0.0000390412F, 0.0000519777F, 0.0000667623F, 0.0000833949F, 0.0001018753F, 0.0001222036F, 0.0001443798F, 0.0001684037F, 0.0001942754F, 0.0002219947F, 0.0002515616F, 0.0002829761F, 0.0003162380F, 0.0003513472F, 0.0003883038F, 0.0004271076F, 0.0004677584F, 0.0005102563F, 0.0005546011F, 0.0006007928F, 0.0006488311F, 0.0006987160F, 0.0007504474F, 0.0008040251F, 0.0008594490F, 0.0009167191F, 0.0009758351F, 0.0010367969F, 0.0010996044F, 0.0011642574F, 0.0012307558F, 0.0012990994F, 0.0013692880F, 0.0014413216F, 0.0015151998F, 0.0015909226F, 0.0016684898F, 0.0017479011F, 0.0018291565F, 0.0019122556F, 0.0019971983F, 0.0020839845F, 0.0021726138F, 0.0022630861F, 0.0023554012F, 0.0024495588F, 0.0025455588F, 0.0026434008F, 0.0027430847F, 0.0028446103F, 0.0029479772F, 0.0030531853F, 0.0031602342F, 0.0032691238F, 0.0033798538F, 0.0034924239F, 0.0036068338F, 0.0037230833F, 0.0038411721F, 0.0039610999F, 0.0040828664F, 0.0042064714F, 0.0043319145F, 0.0044591954F, 0.0045883139F, 0.0047192696F, 0.0048520622F, 0.0049866914F, 0.0051231569F, 0.0052614583F, 0.0054015953F, 0.0055435676F, 0.0056873748F, 0.0058330166F, 0.0059804926F, 0.0061298026F, 0.0062809460F, 0.0064339226F, 0.0065887320F, 0.0067453738F, 0.0069038476F, 0.0070641531F, 0.0072262899F, 0.0073902575F, 0.0075560556F, 0.0077236838F, 0.0078931417F, 0.0080644288F, 0.0082375447F, 0.0084124891F, 0.0085892615F, 0.0087678614F, 0.0089482885F, 0.0091305422F, 0.0093146223F, 0.0095005281F, 0.0096882592F, 0.0098778153F, 0.0100691958F, 0.0102624002F, 0.0104574281F, 0.0106542791F, 0.0108529525F, 0.0110534480F, 0.0112557651F, 0.0114599032F, 0.0116658618F, 0.0118736405F, 0.0120832387F, 0.0122946560F, 0.0125078917F, 0.0127229454F, 0.0129398166F, 0.0131585046F, 0.0133790090F, 0.0136013292F, 0.0138254647F, 0.0140514149F, 0.0142791792F, 0.0145087572F, 0.0147401481F, 0.0149733515F, 0.0152083667F, 0.0154451932F, 0.0156838304F, 0.0159242777F, 0.0161665345F, 0.0164106001F, 0.0166564741F, 0.0169041557F, 0.0171536443F, 0.0174049393F, 0.0176580401F, 0.0179129461F, 0.0181696565F, 0.0184281708F, 0.0186884883F, 0.0189506084F, 0.0192145303F, 0.0194802535F, 0.0197477772F, 0.0200171008F, 0.0202882236F, 0.0205611449F, 0.0208358639F, 0.0211123801F, 0.0213906927F, 0.0216708011F, 0.0219527043F, 0.0222364019F, 0.0225218930F, 0.0228091769F, 0.0230982529F, 0.0233891203F, 0.0236817782F, 0.0239762259F, 0.0242724628F, 0.0245704880F, 0.0248703007F, 0.0251719002F, 0.0254752858F, 0.0257804565F, 0.0260874117F, 0.0263961506F, 0.0267066722F, 0.0270189760F, 0.0273330609F, 0.0276489263F, 0.0279665712F, 0.0282859949F, 0.0286071966F, 0.0289301753F, 0.0292549303F, 0.0295814607F, 0.0299097656F, 0.0302398442F, 0.0305716957F, 0.0309053191F, 0.0312407135F, 0.0315778782F, 0.0319168122F, 0.0322575145F, 0.0325999844F, 0.0329442209F, 0.0332902231F, 0.0336379900F, 0.0339875208F, 0.0343388146F, 0.0346918703F, 0.0350466871F, 0.0354032640F, 0.0357616000F, 0.0361216943F, 0.0364835458F, 0.0368471535F, 0.0372125166F, 0.0375796339F, 0.0379485046F, 0.0383191276F, 0.0386915020F, 0.0390656267F, 0.0394415008F, 0.0398191231F, 0.0401984927F, 0.0405796086F, 0.0409624698F, 0.0413470751F, 0.0417334235F, 0.0421215141F, 0.0425113457F, 0.0429029172F, 0.0432962277F, 0.0436912760F, 0.0440880610F, 0.0444865817F, 0.0448868370F, 0.0452888257F, 0.0456925468F, 0.0460979992F, 0.0465051816F, 0.0469140931F, 0.0473247325F, 0.0477370986F, 0.0481511902F, 0.0485670064F, 0.0489845458F, 0.0494038074F, 0.0498247899F, 0.0502474922F, 0.0506719131F, 0.0510980514F, 0.0515259060F, 0.0519554756F, 0.0523867590F, 0.0528197550F, 0.0532544624F, 0.0536908800F, 0.0541290066F, 0.0545688408F, 0.0550103815F, 0.0554536274F, 0.0558985772F, 0.0563452297F, 0.0567935837F, 0.0572436377F, 0.0576953907F, 0.0581488412F, 0.0586039880F, 0.0590608297F, 0.0595193651F, 0.0599795929F, 0.0604415117F, 0.0609051202F, 0.0613704170F, 0.0618374009F, 0.0623060704F, 0.0627764243F, 0.0632484611F, 0.0637221795F, 0.0641975781F, 0.0646746555F, 0.0651534104F, 0.0656338413F, 0.0661159469F, 0.0665997257F, 0.0670851763F, 0.0675722973F, 0.0680610873F, 0.0685515448F, 0.0690436684F, 0.0695374567F, 0.0700329081F, 0.0705300213F, 0.0710287947F, 0.0715292269F, 0.0720313163F, 0.0725350616F, 0.0730404612F, 0.0735475136F, 0.0740562172F, 0.0745665707F, 0.0750785723F, 0.0755922207F, 0.0761075143F, 0.0766244515F, 0.0771430307F, 0.0776632505F, 0.0781851092F, 0.0787086052F, 0.0792337371F, 0.0797605032F, 0.0802889018F, 0.0808189315F, 0.0813505905F, 0.0818838773F, 0.0824187903F, 0.0829553277F, 0.0834934881F, 0.0840332697F, 0.0845746708F, 0.0851176899F, 0.0856623252F, 0.0862085751F, 0.0867564379F, 0.0873059119F, 0.0878569954F, 0.0884096867F, 0.0889639840F, 0.0895198858F, 0.0900773902F, 0.0906364955F, 0.0911972000F, 0.0917595019F, 0.0923233995F, 0.0928888909F, 0.0934559745F, 0.0940246485F, 0.0945949110F, 0.0951667604F, 0.0957401946F, 0.0963152121F, 0.0968918109F, 0.0974699893F, 0.0980497454F, 0.0986310773F, 0.0992139832F, 0.0997984614F, 0.1003845098F, 0.1009721267F, 0.1015613101F, 0.1021520582F, 0.1027443692F, 0.1033382410F, 0.1039336718F, 0.1045306597F, 0.1051292027F, 0.1057292990F, 0.1063309466F, 0.1069341435F, 0.1075388878F, 0.1081451776F, 0.1087530108F, 0.1093623856F, 0.1099732998F, 0.1105857516F, 0.1111997389F, 0.1118152597F, 0.1124323121F, 0.1130508939F, 0.1136710032F, 0.1142926379F, 0.1149157960F, 0.1155404755F, 0.1161666742F, 0.1167943901F, 0.1174236211F, 0.1180543652F, 0.1186866202F, 0.1193203841F, 0.1199556548F, 0.1205924300F, 0.1212307078F, 0.1218704860F, 0.1225117624F, 0.1231545349F, 0.1237988013F, 0.1244445596F, 0.1250918074F, 0.1257405427F, 0.1263907632F, 0.1270424667F, 0.1276956512F, 0.1283503142F, 0.1290064537F, 0.1296640674F, 0.1303231530F, 0.1309837084F, 0.1316457312F, 0.1323092193F, 0.1329741703F, 0.1336405820F, 0.1343084520F, 0.1349777782F, 0.1356485582F, 0.1363207897F, 0.1369944704F, 0.1376695979F, 0.1383461700F, 0.1390241842F, 0.1397036384F, 0.1403845300F, 0.1410668567F, 0.1417506162F, 0.1424358061F, 0.1431224240F, 0.1438104674F, 0.1444999341F, 0.1451908216F, 0.1458831274F, 0.1465768492F, 0.1472719844F, 0.1479685308F, 0.1486664857F, 0.1493658468F, 0.1500666115F, 0.1507687775F, 0.1514723422F, 0.1521773031F, 0.1528836577F, 0.1535914035F, 0.1543005380F, 0.1550110587F, 0.1557229631F, 0.1564362485F, 0.1571509124F, 0.1578669524F, 0.1585843657F, 0.1593031499F, 0.1600233024F, 0.1607448205F, 0.1614677017F, 0.1621919433F, 0.1629175428F, 0.1636444975F, 0.1643728047F, 0.1651024619F, 0.1658334665F, 0.1665658156F, 0.1672995067F, 0.1680345371F, 0.1687709041F, 0.1695086050F, 0.1702476372F, 0.1709879978F, 0.1717296843F, 0.1724726938F, 0.1732170237F, 0.1739626711F, 0.1747096335F, 0.1754579079F, 0.1762074916F, 0.1769583819F, 0.1777105760F, 0.1784640710F, 0.1792188642F, 0.1799749529F, 0.1807323340F, 0.1814910049F, 0.1822509628F, 0.1830122046F, 0.1837747277F, 0.1845385292F, 0.1853036062F, 0.1860699558F, 0.1868375751F, 0.1876064613F, 0.1883766114F, 0.1891480226F, 0.1899206919F, 0.1906946164F, 0.1914697932F, 0.1922462194F, 0.1930238919F, 0.1938028079F, 0.1945829643F, 0.1953643583F, 0.1961469868F, 0.1969308468F, 0.1977159353F, 0.1985022494F, 0.1992897859F, 0.2000785420F, 0.2008685145F, 0.2016597005F, 0.2024520968F, 0.2032457005F, 0.2040405084F, 0.2048365175F, 0.2056337247F, 0.2064321269F, 0.2072317211F, 0.2080325041F, 0.2088344727F, 0.2096376240F, 0.2104419547F, 0.2112474618F, 0.2120541420F, 0.2128619923F, 0.2136710094F, 0.2144811902F, 0.2152925315F, 0.2161050301F, 0.2169186829F, 0.2177334866F, 0.2185494381F, 0.2193665340F, 0.2201847712F, 0.2210041465F, 0.2218246565F, 0.2226462981F, 0.2234690680F, 0.2242929629F, 0.2251179796F, 0.2259441147F, 0.2267713650F, 0.2275997272F, 0.2284291979F, 0.2292597739F, 0.2300914518F, 0.2309242283F, 0.2317581001F, 0.2325930638F, 0.2334291160F, 0.2342662534F, 0.2351044727F, 0.2359437703F, 0.2367841431F, 0.2376255875F, 0.2384681001F, 0.2393116776F, 0.2401563165F, 0.2410020134F, 0.2418487649F, 0.2426965675F, 0.2435454178F, 0.2443953122F, 0.2452462474F, 0.2460982199F, 0.2469512262F, 0.2478052628F, 0.2486603262F, 0.2495164129F, 0.2503735194F, 0.2512316421F, 0.2520907776F, 0.2529509222F, 0.2538120726F, 0.2546742250F, 0.2555373760F, 0.2564015219F, 0.2572666593F, 0.2581327845F, 0.2589998939F, 0.2598679840F, 0.2607370510F, 0.2616070916F, 0.2624781019F, 0.2633500783F, 0.2642230173F, 0.2650969152F, 0.2659717684F, 0.2668475731F, 0.2677243257F, 0.2686020226F, 0.2694806601F, 0.2703602344F, 0.2712407419F, 0.2721221789F, 0.2730045417F, 0.2738878265F, 0.2747720297F, 0.2756571474F, 0.2765431760F, 0.2774301117F, 0.2783179508F, 0.2792066895F, 0.2800963240F, 0.2809868505F, 0.2818782654F, 0.2827705647F, 0.2836637447F, 0.2845578016F, 0.2854527315F, 0.2863485307F, 0.2872451953F, 0.2881427215F, 0.2890411055F, 0.2899403433F, 0.2908404312F, 0.2917413654F, 0.2926431418F, 0.2935457567F, 0.2944492061F, 0.2953534863F, 0.2962585932F, 0.2971645230F, 0.2980712717F, 0.2989788356F, 0.2998872105F, 0.3007963927F, 0.3017063781F, 0.3026171629F, 0.3035287430F, 0.3044411145F, 0.3053542736F, 0.3062682161F, 0.3071829381F, 0.3080984356F, 0.3090147047F, 0.3099317413F, 0.3108495414F, 0.3117681011F, 0.3126874163F, 0.3136074830F, 0.3145282972F, 0.3154498548F, 0.3163721517F, 0.3172951841F, 0.3182189477F, 0.3191434385F, 0.3200686525F, 0.3209945856F, 0.3219212336F, 0.3228485927F, 0.3237766585F, 0.3247054271F, 0.3256348943F, 0.3265650560F, 0.3274959081F, 0.3284274465F, 0.3293596671F, 0.3302925657F, 0.3312261382F, 0.3321603804F, 0.3330952882F, 0.3340308574F, 0.3349670838F, 0.3359039634F, 0.3368414919F, 0.3377796651F, 0.3387184789F, 0.3396579290F, 0.3405980113F, 0.3415387216F, 0.3424800556F, 0.3434220091F, 0.3443645779F, 0.3453077578F, 0.3462515446F, 0.3471959340F, 0.3481409217F, 0.3490865036F, 0.3500326754F, 0.3509794328F, 0.3519267715F, 0.3528746873F, 0.3538231759F, 0.3547722330F, 0.3557218544F, 0.3566720357F, 0.3576227727F, 0.3585740610F, 0.3595258964F, 0.3604782745F, 0.3614311910F, 0.3623846417F, 0.3633386221F, 0.3642931280F, 0.3652481549F, 0.3662036987F, 0.3671597548F, 0.3681163191F, 0.3690733870F, 0.3700309544F, 0.3709890167F, 0.3719475696F, 0.3729066089F, 0.3738661299F, 0.3748261285F, 0.3757866002F, 0.3767475406F, 0.3777089453F, 0.3786708100F, 0.3796331302F, 0.3805959014F, 0.3815591194F, 0.3825227796F, 0.3834868777F, 0.3844514093F, 0.3854163698F, 0.3863817549F, 0.3873475601F, 0.3883137810F, 0.3892804131F, 0.3902474521F, 0.3912148933F, 0.3921827325F, 0.3931509650F, 0.3941195865F, 0.3950885925F, 0.3960579785F, 0.3970277400F, 0.3979978725F, 0.3989683716F, 0.3999392328F, 0.4009104516F, 0.4018820234F, 0.4028539438F, 0.4038262084F, 0.4047988125F, 0.4057717516F, 0.4067450214F, 0.4077186172F, 0.4086925345F, 0.4096667688F, 0.4106413155F, 0.4116161703F, 0.4125913284F, 0.4135667854F, 0.4145425368F, 0.4155185780F, 0.4164949044F, 0.4174715116F, 0.4184483949F, 0.4194255498F, 0.4204029718F, 0.4213806563F, 0.4223585987F, 0.4233367946F, 0.4243152392F, 0.4252939281F, 0.4262728566F, 0.4272520202F, 0.4282314144F, 0.4292110345F, 0.4301908760F, 0.4311709343F, 0.4321512047F, 0.4331316828F, 0.4341123639F, 0.4350932435F, 0.4360743168F, 0.4370555794F, 0.4380370267F, 0.4390186540F, 0.4400004567F, 0.4409824303F, 0.4419645701F, 0.4429468716F, 0.4439293300F, 0.4449119409F, 0.4458946996F, 0.4468776014F, 0.4478606418F, 0.4488438162F, 0.4498271199F, 0.4508105483F, 0.4517940967F, 0.4527777607F, 0.4537615355F, 0.4547454165F, 0.4557293991F, 0.4567134786F, 0.4576976505F, 0.4586819101F, 0.4596662527F, 0.4606506738F, 0.4616351687F, 0.4626197328F, 0.4636043614F, 0.4645890499F, 0.4655737936F, 0.4665585880F, 0.4675434284F, 0.4685283101F, 0.4695132286F, 0.4704981791F, 0.4714831570F, 0.4724681577F, 0.4734531766F, 0.4744382089F, 0.4754232501F, 0.4764082956F, 0.4773933406F, 0.4783783806F, 0.4793634108F, 0.4803484267F, 0.4813334237F, 0.4823183969F, 0.4833033419F, 0.4842882540F, 0.4852731285F, 0.4862579608F, 0.4872427462F, 0.4882274802F, 0.4892121580F, 0.4901967751F, 0.4911813267F, 0.4921658083F, 0.4931502151F, 0.4941345427F, 0.4951187863F, 0.4961029412F, 0.4970870029F, 0.4980709667F, 0.4990548280F, 0.5000385822F, 0.5010222245F, 0.5020057505F, 0.5029891553F, 0.5039724345F, 0.5049555834F, 0.5059385973F, 0.5069214716F, 0.5079042018F, 0.5088867831F, 0.5098692110F, 0.5108514808F, 0.5118335879F, 0.5128155277F, 0.5137972956F, 0.5147788869F, 0.5157602971F, 0.5167415215F, 0.5177225555F, 0.5187033945F, 0.5196840339F, 0.5206644692F, 0.5216446956F, 0.5226247086F, 0.5236045035F, 0.5245840759F, 0.5255634211F, 0.5265425344F, 0.5275214114F, 0.5285000474F, 0.5294784378F, 0.5304565781F, 0.5314344637F, 0.5324120899F, 0.5333894522F, 0.5343665461F, 0.5353433670F, 0.5363199102F, 0.5372961713F, 0.5382721457F, 0.5392478287F, 0.5402232159F, 0.5411983027F, 0.5421730845F, 0.5431475569F, 0.5441217151F, 0.5450955548F, 0.5460690714F, 0.5470422602F, 0.5480151169F, 0.5489876368F, 0.5499598155F, 0.5509316484F, 0.5519031310F, 0.5528742587F, 0.5538450271F, 0.5548154317F, 0.5557854680F, 0.5567551314F, 0.5577244174F, 0.5586933216F, 0.5596618395F, 0.5606299665F, 0.5615976983F, 0.5625650302F, 0.5635319580F, 0.5644984770F, 0.5654645828F, 0.5664302709F, 0.5673955370F, 0.5683603765F, 0.5693247850F, 0.5702887580F, 0.5712522912F, 0.5722153800F, 0.5731780200F, 0.5741402069F, 0.5751019362F, 0.5760632034F, 0.5770240042F, 0.5779843341F, 0.5789441889F, 0.5799035639F, 0.5808624549F, 0.5818208575F, 0.5827787673F, 0.5837361800F, 0.5846930910F, 0.5856494961F, 0.5866053910F, 0.5875607712F, 0.5885156324F, 0.5894699703F, 0.5904237804F, 0.5913770586F, 0.5923298004F, 0.5932820016F, 0.5942336578F, 0.5951847646F, 0.5961353179F, 0.5970853132F, 0.5980347464F, 0.5989836131F, 0.5999319090F, 0.6008796298F, 0.6018267713F, 0.6027733292F, 0.6037192993F, 0.6046646773F, 0.6056094589F, 0.6065536400F, 0.6074972162F, 0.6084401833F, 0.6093825372F, 0.6103242736F, 0.6112653884F, 0.6122058772F, 0.6131457359F, 0.6140849604F, 0.6150235464F, 0.6159614897F, 0.6168987862F, 0.6178354318F, 0.6187714223F, 0.6197067535F, 0.6206414213F, 0.6215754215F, 0.6225087501F, 0.6234414028F, 0.6243733757F, 0.6253046646F, 0.6262352654F, 0.6271651739F, 0.6280943862F, 0.6290228982F, 0.6299507057F, 0.6308778048F, 0.6318041913F, 0.6327298612F, 0.6336548105F, 0.6345790352F, 0.6355025312F, 0.6364252945F, 0.6373473211F, 0.6382686070F, 0.6391891483F, 0.6401089409F, 0.6410279808F, 0.6419462642F, 0.6428637869F, 0.6437805452F, 0.6446965350F, 0.6456117524F, 0.6465261935F, 0.6474398544F, 0.6483527311F, 0.6492648197F, 0.6501761165F, 0.6510866174F, 0.6519963186F, 0.6529052162F, 0.6538133064F, 0.6547205854F, 0.6556270492F, 0.6565326941F, 0.6574375162F, 0.6583415117F, 0.6592446769F, 0.6601470079F, 0.6610485009F, 0.6619491521F, 0.6628489578F, 0.6637479143F, 0.6646460177F, 0.6655432643F, 0.6664396505F, 0.6673351724F, 0.6682298264F, 0.6691236087F, 0.6700165157F, 0.6709085436F, 0.6717996889F, 0.6726899478F, 0.6735793167F, 0.6744677918F, 0.6753553697F, 0.6762420466F, 0.6771278190F, 0.6780126832F, 0.6788966357F, 0.6797796728F, 0.6806617909F, 0.6815429866F, 0.6824232562F, 0.6833025961F, 0.6841810030F, 0.6850584731F, 0.6859350031F, 0.6868105894F, 0.6876852284F, 0.6885589168F, 0.6894316510F, 0.6903034275F, 0.6911742430F, 0.6920440939F, 0.6929129769F, 0.6937808884F, 0.6946478251F, 0.6955137837F, 0.6963787606F, 0.6972427525F, 0.6981057560F, 0.6989677678F, 0.6998287845F, 0.7006888028F, 0.7015478194F, 0.7024058309F, 0.7032628340F, 0.7041188254F, 0.7049738019F, 0.7058277601F, 0.7066806969F, 0.7075326089F, 0.7083834929F, 0.7092333457F, 0.7100821640F, 0.7109299447F, 0.7117766846F, 0.7126223804F, 0.7134670291F, 0.7143106273F, 0.7151531721F, 0.7159946602F, 0.7168350885F, 0.7176744539F, 0.7185127534F, 0.7193499837F, 0.7201861418F, 0.7210212247F, 0.7218552293F, 0.7226881526F, 0.7235199914F, 0.7243507428F, 0.7251804039F, 0.7260089715F, 0.7268364426F, 0.7276628144F, 0.7284880839F, 0.7293122481F, 0.7301353040F, 0.7309572487F, 0.7317780794F, 0.7325977930F, 0.7334163868F, 0.7342338579F, 0.7350502033F, 0.7358654202F, 0.7366795059F, 0.7374924573F, 0.7383042718F, 0.7391149465F, 0.7399244787F, 0.7407328655F, 0.7415401041F, 0.7423461920F, 0.7431511261F, 0.7439549040F, 0.7447575227F, 0.7455589797F, 0.7463592723F, 0.7471583976F, 0.7479563532F, 0.7487531363F, 0.7495487443F, 0.7503431745F, 0.7511364244F, 0.7519284913F, 0.7527193726F, 0.7535090658F, 0.7542975683F, 0.7550848776F, 0.7558709910F, 0.7566559062F, 0.7574396205F, 0.7582221314F, 0.7590034366F, 0.7597835334F, 0.7605624194F, 0.7613400923F, 0.7621165495F, 0.7628917886F, 0.7636658072F, 0.7644386030F, 0.7652101735F, 0.7659805164F, 0.7667496292F, 0.7675175098F, 0.7682841556F, 0.7690495645F, 0.7698137341F, 0.7705766622F, 0.7713383463F, 0.7720987844F, 0.7728579741F, 0.7736159132F, 0.7743725994F, 0.7751280306F, 0.7758822046F, 0.7766351192F, 0.7773867722F, 0.7781371614F, 0.7788862848F, 0.7796341401F, 0.7803807253F, 0.7811260383F, 0.7818700769F, 0.7826128392F, 0.7833543230F, 0.7840945263F, 0.7848334471F, 0.7855710833F, 0.7863074330F, 0.7870424941F, 0.7877762647F, 0.7885087428F, 0.7892399264F, 0.7899698137F, 0.7906984026F, 0.7914256914F, 0.7921516780F, 0.7928763607F, 0.7935997375F, 0.7943218065F, 0.7950425661F, 0.7957620142F, 0.7964801492F, 0.7971969692F, 0.7979124724F, 0.7986266570F, 0.7993395214F, 0.8000510638F, 0.8007612823F, 0.8014701754F, 0.8021777413F, 0.8028839784F, 0.8035888849F, 0.8042924592F, 0.8049946997F, 0.8056956048F, 0.8063951727F, 0.8070934020F, 0.8077902910F, 0.8084858381F, 0.8091800419F, 0.8098729007F, 0.8105644130F, 0.8112545774F, 0.8119433922F, 0.8126308561F, 0.8133169676F, 0.8140017251F, 0.8146851272F, 0.8153671726F, 0.8160478598F, 0.8167271874F, 0.8174051539F, 0.8180817582F, 0.8187569986F, 0.8194308741F, 0.8201033831F, 0.8207745244F, 0.8214442966F, 0.8221126986F, 0.8227797290F, 0.8234453865F, 0.8241096700F, 0.8247725781F, 0.8254341097F, 0.8260942636F, 0.8267530385F, 0.8274104334F, 0.8280664470F, 0.8287210782F, 0.8293743259F, 0.8300261889F, 0.8306766662F, 0.8313257566F, 0.8319734591F, 0.8326197727F, 0.8332646963F, 0.8339082288F, 0.8345503692F, 0.8351911167F, 0.8358304700F, 0.8364684284F, 0.8371049907F, 0.8377401562F, 0.8383739238F, 0.8390062927F, 0.8396372618F, 0.8402668305F, 0.8408949977F, 0.8415217626F, 0.8421471245F, 0.8427710823F, 0.8433936354F, 0.8440147830F, 0.8446345242F, 0.8452528582F, 0.8458697844F, 0.8464853020F, 0.8470994102F, 0.8477121084F, 0.8483233958F, 0.8489332718F, 0.8495417356F, 0.8501487866F, 0.8507544243F, 0.8513586479F, 0.8519614568F, 0.8525628505F, 0.8531628283F, 0.8537613897F, 0.8543585341F, 0.8549542611F, 0.8555485699F, 0.8561414603F, 0.8567329315F, 0.8573229832F, 0.8579116149F, 0.8584988262F, 0.8590846165F, 0.8596689855F, 0.8602519327F, 0.8608334577F, 0.8614135603F, 0.8619922399F, 0.8625694962F, 0.8631453289F, 0.8637197377F, 0.8642927222F, 0.8648642821F, 0.8654344172F, 0.8660031272F, 0.8665704118F, 0.8671362708F, 0.8677007039F, 0.8682637109F, 0.8688252917F, 0.8693854460F, 0.8699441737F, 0.8705014745F, 0.8710573485F, 0.8716117953F, 0.8721648150F, 0.8727164073F, 0.8732665723F, 0.8738153098F, 0.8743626197F, 0.8749085021F, 0.8754529569F, 0.8759959840F, 0.8765375835F, 0.8770777553F, 0.8776164996F, 0.8781538162F, 0.8786897054F, 0.8792241670F, 0.8797572013F, 0.8802888082F, 0.8808189880F, 0.8813477407F, 0.8818750664F, 0.8824009653F, 0.8829254375F, 0.8834484833F, 0.8839701028F, 0.8844902961F, 0.8850090636F, 0.8855264054F, 0.8860423218F, 0.8865568131F, 0.8870698794F, 0.8875815212F, 0.8880917386F, 0.8886005319F, 0.8891079016F, 0.8896138479F, 0.8901183712F, 0.8906214719F, 0.8911231503F, 0.8916234067F, 0.8921222417F, 0.8926196556F, 0.8931156489F, 0.8936102219F, 0.8941033752F, 0.8945951092F, 0.8950854244F, 0.8955743212F, 0.8960618003F, 0.8965478621F, 0.8970325071F, 0.8975157359F, 0.8979975490F, 0.8984779471F, 0.8989569307F, 0.8994345004F, 0.8999106568F, 0.9003854005F, 0.9008587323F, 0.9013306526F, 0.9018011623F, 0.9022702619F, 0.9027379521F, 0.9032042337F, 0.9036691074F, 0.9041325739F, 0.9045946339F, 0.9050552882F, 0.9055145376F, 0.9059723828F, 0.9064288246F, 0.9068838638F, 0.9073375013F, 0.9077897379F, 0.9082405743F, 0.9086900115F, 0.9091380503F, 0.9095846917F, 0.9100299364F, 0.9104737854F, 0.9109162397F, 0.9113573001F, 0.9117969675F, 0.9122352430F, 0.9126721275F, 0.9131076219F, 0.9135417273F, 0.9139744447F, 0.9144057750F, 0.9148357194F, 0.9152642787F, 0.9156914542F, 0.9161172468F, 0.9165416576F, 0.9169646877F, 0.9173863382F, 0.9178066102F, 0.9182255048F, 0.9186430232F, 0.9190591665F, 0.9194739359F, 0.9198873324F, 0.9202993574F, 0.9207100120F, 0.9211192973F, 0.9215272147F, 0.9219337653F, 0.9223389504F, 0.9227427713F, 0.9231452290F, 0.9235463251F, 0.9239460607F, 0.9243444371F, 0.9247414557F, 0.9251371177F, 0.9255314245F, 0.9259243774F, 0.9263159778F, 0.9267062270F, 0.9270951264F, 0.9274826774F, 0.9278688814F, 0.9282537398F, 0.9286372540F, 0.9290194254F, 0.9294002555F, 0.9297797458F, 0.9301578976F, 0.9305347125F, 0.9309101919F, 0.9312843373F, 0.9316571503F, 0.9320286323F, 0.9323987849F, 0.9327676097F, 0.9331351080F, 0.9335012816F, 0.9338661320F, 0.9342296607F, 0.9345918694F, 0.9349527596F, 0.9353123330F, 0.9356705911F, 0.9360275357F, 0.9363831683F, 0.9367374905F, 0.9370905042F, 0.9374422108F, 0.9377926122F, 0.9381417099F, 0.9384895057F, 0.9388360014F, 0.9391811985F, 0.9395250989F, 0.9398677043F, 0.9402090165F, 0.9405490371F, 0.9408877680F, 0.9412252110F, 0.9415613678F, 0.9418962402F, 0.9422298301F, 0.9425621392F, 0.9428931695F, 0.9432229226F, 0.9435514005F, 0.9438786050F, 0.9442045381F, 0.9445292014F, 0.9448525971F, 0.9451747268F, 0.9454955926F, 0.9458151963F, 0.9461335399F, 0.9464506253F, 0.9467664545F, 0.9470810293F, 0.9473943517F, 0.9477064238F, 0.9480172474F, 0.9483268246F, 0.9486351573F, 0.9489422475F, 0.9492480973F, 0.9495527087F, 0.9498560837F, 0.9501582243F, 0.9504591325F, 0.9507588105F, 0.9510572603F, 0.9513544839F, 0.9516504834F, 0.9519452609F, 0.9522388186F, 0.9525311584F, 0.9528222826F, 0.9531121932F, 0.9534008923F, 0.9536883821F, 0.9539746647F, 0.9542597424F, 0.9545436171F, 0.9548262912F, 0.9551077667F, 0.9553880459F, 0.9556671309F, 0.9559450239F, 0.9562217272F, 0.9564972429F, 0.9567715733F, 0.9570447206F, 0.9573166871F, 0.9575874749F, 0.9578570863F, 0.9581255236F, 0.9583927890F, 0.9586588849F, 0.9589238134F, 0.9591875769F, 0.9594501777F, 0.9597116180F, 0.9599719003F, 0.9602310267F, 0.9604889995F, 0.9607458213F, 0.9610014942F, 0.9612560206F, 0.9615094028F, 0.9617616433F, 0.9620127443F, 0.9622627083F, 0.9625115376F, 0.9627592345F, 0.9630058016F, 0.9632512411F, 0.9634955555F, 0.9637387471F, 0.9639808185F, 0.9642217720F, 0.9644616100F, 0.9647003349F, 0.9649379493F, 0.9651744556F, 0.9654098561F, 0.9656441534F, 0.9658773499F, 0.9661094480F, 0.9663404504F, 0.9665703593F, 0.9667991774F, 0.9670269071F, 0.9672535509F, 0.9674791114F, 0.9677035909F, 0.9679269921F, 0.9681493174F, 0.9683705694F, 0.9685907506F, 0.9688098636F, 0.9690279108F, 0.9692448948F, 0.9694608182F, 0.9696756836F, 0.9698894934F, 0.9701022503F, 0.9703139569F, 0.9705246156F, 0.9707342291F, 0.9709428000F, 0.9711503309F, 0.9713568243F, 0.9715622829F, 0.9717667093F, 0.9719701060F, 0.9721724757F, 0.9723738210F, 0.9725741446F, 0.9727734490F, 0.9729717369F, 0.9731690109F, 0.9733652737F, 0.9735605279F, 0.9737547762F, 0.9739480212F, 0.9741402656F, 0.9743315120F, 0.9745217631F, 0.9747110216F, 0.9748992901F, 0.9750865714F, 0.9752728681F, 0.9754581829F, 0.9756425184F, 0.9758258775F, 0.9760082627F, 0.9761896768F, 0.9763701224F, 0.9765496024F, 0.9767281193F, 0.9769056760F, 0.9770822751F, 0.9772579193F, 0.9774326114F, 0.9776063542F, 0.9777791502F, 0.9779510023F, 0.9781219133F, 0.9782918858F, 0.9784609226F, 0.9786290264F, 0.9787962000F, 0.9789624461F, 0.9791277676F, 0.9792921671F, 0.9794556474F, 0.9796182113F, 0.9797798615F, 0.9799406009F, 0.9801004321F, 0.9802593580F, 0.9804173813F, 0.9805745049F, 0.9807307314F, 0.9808860637F, 0.9810405046F, 0.9811940568F, 0.9813467232F, 0.9814985065F, 0.9816494095F, 0.9817994351F, 0.9819485860F, 0.9820968650F, 0.9822442750F, 0.9823908186F, 0.9825364988F, 0.9826813184F, 0.9828252801F, 0.9829683868F, 0.9831106413F, 0.9832520463F, 0.9833926048F, 0.9835323195F, 0.9836711932F, 0.9838092288F, 0.9839464291F, 0.9840827969F, 0.9842183351F, 0.9843530464F, 0.9844869337F, 0.9846199998F, 0.9847522475F, 0.9848836798F, 0.9850142993F, 0.9851441090F, 0.9852731117F, 0.9854013101F, 0.9855287073F, 0.9856553058F, 0.9857811087F, 0.9859061188F, 0.9860303388F, 0.9861537717F, 0.9862764202F, 0.9863982872F, 0.9865193756F, 0.9866396882F, 0.9867592277F, 0.9868779972F, 0.9869959993F, 0.9871132370F, 0.9872297131F, 0.9873454304F, 0.9874603918F, 0.9875746001F, 0.9876880581F, 0.9878007688F, 0.9879127348F, 0.9880239592F, 0.9881344447F, 0.9882441941F, 0.9883532104F, 0.9884614962F, 0.9885690546F, 0.9886758883F, 0.9887820001F, 0.9888873930F, 0.9889920697F, 0.9890960331F, 0.9891992859F, 0.9893018312F, 0.9894036716F, 0.9895048100F, 0.9896052493F, 0.9897049923F, 0.9898040418F, 0.9899024006F, 0.9900000717F, 0.9900970577F, 0.9901933616F, 0.9902889862F, 0.9903839343F, 0.9904782087F, 0.9905718122F, 0.9906647477F, 0.9907570180F, 0.9908486259F, 0.9909395742F, 0.9910298658F, 0.9911195034F, 0.9912084899F, 0.9912968281F, 0.9913845208F, 0.9914715708F, 0.9915579810F, 0.9916437540F, 0.9917288928F, 0.9918134001F, 0.9918972788F, 0.9919805316F, 0.9920631613F, 0.9921451707F, 0.9922265626F, 0.9923073399F, 0.9923875052F, 0.9924670615F, 0.9925460114F, 0.9926243577F, 0.9927021033F, 0.9927792508F, 0.9928558032F, 0.9929317631F, 0.9930071333F, 0.9930819167F, 0.9931561158F, 0.9932297337F, 0.9933027728F, 0.9933752362F, 0.9934471264F, 0.9935184462F, 0.9935891985F, 0.9936593859F, 0.9937290112F, 0.9937980771F, 0.9938665864F, 0.9939345418F, 0.9940019460F, 0.9940688018F, 0.9941351118F, 0.9942008789F, 0.9942661057F, 0.9943307950F, 0.9943949494F, 0.9944585717F, 0.9945216645F, 0.9945842307F, 0.9946462728F, 0.9947077936F, 0.9947687957F, 0.9948292820F, 0.9948892550F, 0.9949487174F, 0.9950076719F, 0.9950661212F, 0.9951240679F, 0.9951815148F, 0.9952384645F, 0.9952949196F, 0.9953508828F, 0.9954063568F, 0.9954613442F, 0.9955158476F, 0.9955698697F, 0.9956234132F, 0.9956764806F, 0.9957290746F, 0.9957811978F, 0.9958328528F, 0.9958840423F, 0.9959347688F, 0.9959850351F, 0.9960348435F, 0.9960841969F, 0.9961330977F, 0.9961815486F, 0.9962295521F, 0.9962771108F, 0.9963242274F, 0.9963709043F, 0.9964171441F, 0.9964629494F, 0.9965083228F, 0.9965532668F, 0.9965977840F, 0.9966418768F, 0.9966855479F, 0.9967287998F, 0.9967716350F, 0.9968140559F, 0.9968560653F, 0.9968976655F, 0.9969388591F, 0.9969796485F, 0.9970200363F, 0.9970600250F, 0.9970996170F, 0.9971388149F, 0.9971776211F, 0.9972160380F, 0.9972540683F, 0.9972917142F, 0.9973289783F, 0.9973658631F, 0.9974023709F, 0.9974385042F, 0.9974742655F, 0.9975096571F, 0.9975446816F, 0.9975793413F, 0.9976136386F, 0.9976475759F, 0.9976811557F, 0.9977143803F, 0.9977472521F, 0.9977797736F, 0.9978119470F, 0.9978437748F, 0.9978752593F, 0.9979064029F, 0.9979372079F, 0.9979676768F, 0.9979978117F, 0.9980276151F, 0.9980570893F, 0.9980862367F, 0.9981150595F, 0.9981435600F, 0.9981717406F, 0.9981996035F, 0.9982271511F, 0.9982543856F, 0.9982813093F, 0.9983079246F, 0.9983342336F, 0.9983602386F, 0.9983859418F, 0.9984113456F, 0.9984364522F, 0.9984612638F, 0.9984857825F, 0.9985100108F, 0.9985339507F, 0.9985576044F, 0.9985809743F, 0.9986040624F, 0.9986268710F, 0.9986494022F, 0.9986716583F, 0.9986936413F, 0.9987153535F, 0.9987367969F, 0.9987579738F, 0.9987788864F, 0.9987995366F, 0.9988199267F, 0.9988400587F, 0.9988599348F, 0.9988795572F, 0.9988989278F, 0.9989180487F, 0.9989369222F, 0.9989555501F, 0.9989739347F, 0.9989920780F, 0.9990099820F, 0.9990276487F, 0.9990450803F, 0.9990622787F, 0.9990792460F, 0.9990959841F, 0.9991124952F, 0.9991287812F, 0.9991448440F, 0.9991606858F, 0.9991763084F, 0.9991917139F, 0.9992069042F, 0.9992218813F, 0.9992366471F, 0.9992512035F, 0.9992655525F, 0.9992796961F, 0.9992936361F, 0.9993073744F, 0.9993209131F, 0.9993342538F, 0.9993473987F, 0.9993603494F, 0.9993731080F, 0.9993856762F, 0.9993980559F, 0.9994102490F, 0.9994222573F, 0.9994340827F, 0.9994457269F, 0.9994571918F, 0.9994684793F, 0.9994795910F, 0.9994905288F, 0.9995012945F, 0.9995118898F, 0.9995223165F, 0.9995325765F, 0.9995426713F, 0.9995526029F, 0.9995623728F, 0.9995719829F, 0.9995814349F, 0.9995907304F, 0.9995998712F, 0.9996088590F, 0.9996176954F, 0.9996263821F, 0.9996349208F, 0.9996433132F, 0.9996515609F, 0.9996596656F, 0.9996676288F, 0.9996754522F, 0.9996831375F, 0.9996906862F, 0.9996981000F, 0.9997053804F, 0.9997125290F, 0.9997195474F, 0.9997264371F, 0.9997331998F, 0.9997398369F, 0.9997463500F, 0.9997527406F, 0.9997590103F, 0.9997651606F, 0.9997711930F, 0.9997771089F, 0.9997829098F, 0.9997885973F, 0.9997941728F, 0.9997996378F, 0.9998049936F, 0.9998102419F, 0.9998153839F, 0.9998204211F, 0.9998253550F, 0.9998301868F, 0.9998349182F, 0.9998395503F, 0.9998440847F, 0.9998485226F, 0.9998528654F, 0.9998571146F, 0.9998612713F, 0.9998653370F, 0.9998693130F, 0.9998732007F, 0.9998770012F, 0.9998807159F, 0.9998843461F, 0.9998878931F, 0.9998913581F, 0.9998947424F, 0.9998980473F, 0.9999012740F, 0.9999044237F, 0.9999074976F, 0.9999104971F, 0.9999134231F, 0.9999162771F, 0.9999190601F, 0.9999217733F, 0.9999244179F, 0.9999269950F, 0.9999295058F, 0.9999319515F, 0.9999343332F, 0.9999366519F, 0.9999389088F, 0.9999411050F, 0.9999432416F, 0.9999453196F, 0.9999473402F, 0.9999493044F, 0.9999512132F, 0.9999530677F, 0.9999548690F, 0.9999566180F, 0.9999583157F, 0.9999599633F, 0.9999615616F, 0.9999631116F, 0.9999646144F, 0.9999660709F, 0.9999674820F, 0.9999688487F, 0.9999701719F, 0.9999714526F, 0.9999726917F, 0.9999738900F, 0.9999750486F, 0.9999761682F, 0.9999772497F, 0.9999782941F, 0.9999793021F, 0.9999802747F, 0.9999812126F, 0.9999821167F, 0.9999829878F, 0.9999838268F, 0.9999846343F, 0.9999854113F, 0.9999861584F, 0.9999868765F, 0.9999875664F, 0.9999882287F, 0.9999888642F, 0.9999894736F, 0.9999900577F, 0.9999906172F, 0.9999911528F, 0.9999916651F, 0.9999921548F, 0.9999926227F, 0.9999930693F, 0.9999934954F, 0.9999939015F, 0.9999942883F, 0.9999946564F, 0.9999950064F, 0.9999953390F, 0.9999956547F, 0.9999959541F, 0.9999962377F, 0.9999965062F, 0.9999967601F, 0.9999969998F, 0.9999972260F, 0.9999974392F, 0.9999976399F, 0.9999978285F, 0.9999980056F, 0.9999981716F, 0.9999983271F, 0.9999984724F, 0.9999986081F, 0.9999987345F, 0.9999988521F, 0.9999989613F, 0.9999990625F, 0.9999991562F, 0.9999992426F, 0.9999993223F, 0.9999993954F, 0.9999994625F, 0.9999995239F, 0.9999995798F, 0.9999996307F, 0.9999996768F, 0.9999997184F, 0.9999997559F, 0.9999997895F, 0.9999998195F, 0.9999998462F, 0.9999998698F, 0.9999998906F, 0.9999999088F, 0.9999999246F, 0.9999999383F, 0.9999999500F, 0.9999999600F, 0.9999999684F, 0.9999999754F, 0.9999999811F, 0.9999999858F, 0.9999999896F, 0.9999999925F, 0.9999999948F, 0.9999999965F, 0.9999999978F, 0.9999999986F, 0.9999999992F, 0.9999999996F, 0.9999999998F, 0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F, }; static float vwin8192[4096] = { 0.0000000578F, 0.0000005198F, 0.0000014438F, 0.0000028299F, 0.0000046780F, 0.0000069882F, 0.0000097604F, 0.0000129945F, 0.0000166908F, 0.0000208490F, 0.0000254692F, 0.0000305515F, 0.0000360958F, 0.0000421021F, 0.0000485704F, 0.0000555006F, 0.0000628929F, 0.0000707472F, 0.0000790635F, 0.0000878417F, 0.0000970820F, 0.0001067842F, 0.0001169483F, 0.0001275744F, 0.0001386625F, 0.0001502126F, 0.0001622245F, 0.0001746984F, 0.0001876343F, 0.0002010320F, 0.0002148917F, 0.0002292132F, 0.0002439967F, 0.0002592421F, 0.0002749493F, 0.0002911184F, 0.0003077493F, 0.0003248421F, 0.0003423967F, 0.0003604132F, 0.0003788915F, 0.0003978316F, 0.0004172335F, 0.0004370971F, 0.0004574226F, 0.0004782098F, 0.0004994587F, 0.0005211694F, 0.0005433418F, 0.0005659759F, 0.0005890717F, 0.0006126292F, 0.0006366484F, 0.0006611292F, 0.0006860716F, 0.0007114757F, 0.0007373414F, 0.0007636687F, 0.0007904576F, 0.0008177080F, 0.0008454200F, 0.0008735935F, 0.0009022285F, 0.0009313250F, 0.0009608830F, 0.0009909025F, 0.0010213834F, 0.0010523257F, 0.0010837295F, 0.0011155946F, 0.0011479211F, 0.0011807090F, 0.0012139582F, 0.0012476687F, 0.0012818405F, 0.0013164736F, 0.0013515679F, 0.0013871235F, 0.0014231402F, 0.0014596182F, 0.0014965573F, 0.0015339576F, 0.0015718190F, 0.0016101415F, 0.0016489251F, 0.0016881698F, 0.0017278754F, 0.0017680421F, 0.0018086698F, 0.0018497584F, 0.0018913080F, 0.0019333185F, 0.0019757898F, 0.0020187221F, 0.0020621151F, 0.0021059690F, 0.0021502837F, 0.0021950591F, 0.0022402953F, 0.0022859921F, 0.0023321497F, 0.0023787679F, 0.0024258467F, 0.0024733861F, 0.0025213861F, 0.0025698466F, 0.0026187676F, 0.0026681491F, 0.0027179911F, 0.0027682935F, 0.0028190562F, 0.0028702794F, 0.0029219628F, 0.0029741066F, 0.0030267107F, 0.0030797749F, 0.0031332994F, 0.0031872841F, 0.0032417289F, 0.0032966338F, 0.0033519988F, 0.0034078238F, 0.0034641089F, 0.0035208539F, 0.0035780589F, 0.0036357237F, 0.0036938485F, 0.0037524331F, 0.0038114775F, 0.0038709817F, 0.0039309456F, 0.0039913692F, 0.0040522524F, 0.0041135953F, 0.0041753978F, 0.0042376599F, 0.0043003814F, 0.0043635624F, 0.0044272029F, 0.0044913028F, 0.0045558620F, 0.0046208806F, 0.0046863585F, 0.0047522955F, 0.0048186919F, 0.0048855473F, 0.0049528619F, 0.0050206356F, 0.0050888684F, 0.0051575601F, 0.0052267108F, 0.0052963204F, 0.0053663890F, 0.0054369163F, 0.0055079025F, 0.0055793474F, 0.0056512510F, 0.0057236133F, 0.0057964342F, 0.0058697137F, 0.0059434517F, 0.0060176482F, 0.0060923032F, 0.0061674166F, 0.0062429883F, 0.0063190183F, 0.0063955066F, 0.0064724532F, 0.0065498579F, 0.0066277207F, 0.0067060416F, 0.0067848205F, 0.0068640575F, 0.0069437523F, 0.0070239051F, 0.0071045157F, 0.0071855840F, 0.0072671102F, 0.0073490940F, 0.0074315355F, 0.0075144345F, 0.0075977911F, 0.0076816052F, 0.0077658768F, 0.0078506057F, 0.0079357920F, 0.0080214355F, 0.0081075363F, 0.0081940943F, 0.0082811094F, 0.0083685816F, 0.0084565108F, 0.0085448970F, 0.0086337401F, 0.0087230401F, 0.0088127969F, 0.0089030104F, 0.0089936807F, 0.0090848076F, 0.0091763911F, 0.0092684311F, 0.0093609276F, 0.0094538805F, 0.0095472898F, 0.0096411554F, 0.0097354772F, 0.0098302552F, 0.0099254894F, 0.0100211796F, 0.0101173259F, 0.0102139281F, 0.0103109863F, 0.0104085002F, 0.0105064700F, 0.0106048955F, 0.0107037766F, 0.0108031133F, 0.0109029056F, 0.0110031534F, 0.0111038565F, 0.0112050151F, 0.0113066289F, 0.0114086980F, 0.0115112222F, 0.0116142015F, 0.0117176359F, 0.0118215252F, 0.0119258695F, 0.0120306686F, 0.0121359225F, 0.0122416312F, 0.0123477944F, 0.0124544123F, 0.0125614847F, 0.0126690116F, 0.0127769928F, 0.0128854284F, 0.0129943182F, 0.0131036623F, 0.0132134604F, 0.0133237126F, 0.0134344188F, 0.0135455790F, 0.0136571929F, 0.0137692607F, 0.0138817821F, 0.0139947572F, 0.0141081859F, 0.0142220681F, 0.0143364037F, 0.0144511927F, 0.0145664350F, 0.0146821304F, 0.0147982791F, 0.0149148808F, 0.0150319355F, 0.0151494431F, 0.0152674036F, 0.0153858168F, 0.0155046828F, 0.0156240014F, 0.0157437726F, 0.0158639962F, 0.0159846723F, 0.0161058007F, 0.0162273814F, 0.0163494142F, 0.0164718991F, 0.0165948361F, 0.0167182250F, 0.0168420658F, 0.0169663584F, 0.0170911027F, 0.0172162987F, 0.0173419462F, 0.0174680452F, 0.0175945956F, 0.0177215974F, 0.0178490504F, 0.0179769545F, 0.0181053098F, 0.0182341160F, 0.0183633732F, 0.0184930812F, 0.0186232399F, 0.0187538494F, 0.0188849094F, 0.0190164200F, 0.0191483809F, 0.0192807923F, 0.0194136539F, 0.0195469656F, 0.0196807275F, 0.0198149394F, 0.0199496012F, 0.0200847128F, 0.0202202742F, 0.0203562853F, 0.0204927460F, 0.0206296561F, 0.0207670157F, 0.0209048245F, 0.0210430826F, 0.0211817899F, 0.0213209462F, 0.0214605515F, 0.0216006057F, 0.0217411086F, 0.0218820603F, 0.0220234605F, 0.0221653093F, 0.0223076066F, 0.0224503521F, 0.0225935459F, 0.0227371879F, 0.0228812779F, 0.0230258160F, 0.0231708018F, 0.0233162355F, 0.0234621169F, 0.0236084459F, 0.0237552224F, 0.0239024462F, 0.0240501175F, 0.0241982359F, 0.0243468015F, 0.0244958141F, 0.0246452736F, 0.0247951800F, 0.0249455331F, 0.0250963329F, 0.0252475792F, 0.0253992720F, 0.0255514111F, 0.0257039965F, 0.0258570281F, 0.0260105057F, 0.0261644293F, 0.0263187987F, 0.0264736139F, 0.0266288747F, 0.0267845811F, 0.0269407330F, 0.0270973302F, 0.0272543727F, 0.0274118604F, 0.0275697930F, 0.0277281707F, 0.0278869932F, 0.0280462604F, 0.0282059723F, 0.0283661287F, 0.0285267295F, 0.0286877747F, 0.0288492641F, 0.0290111976F, 0.0291735751F, 0.0293363965F, 0.0294996617F, 0.0296633706F, 0.0298275231F, 0.0299921190F, 0.0301571583F, 0.0303226409F, 0.0304885667F, 0.0306549354F, 0.0308217472F, 0.0309890017F, 0.0311566989F, 0.0313248388F, 0.0314934211F, 0.0316624459F, 0.0318319128F, 0.0320018220F, 0.0321721732F, 0.0323429663F, 0.0325142013F, 0.0326858779F, 0.0328579962F, 0.0330305559F, 0.0332035570F, 0.0333769994F, 0.0335508829F, 0.0337252074F, 0.0338999728F, 0.0340751790F, 0.0342508259F, 0.0344269134F, 0.0346034412F, 0.0347804094F, 0.0349578178F, 0.0351356663F, 0.0353139548F, 0.0354926831F, 0.0356718511F, 0.0358514588F, 0.0360315059F, 0.0362119924F, 0.0363929182F, 0.0365742831F, 0.0367560870F, 0.0369383297F, 0.0371210113F, 0.0373041315F, 0.0374876902F, 0.0376716873F, 0.0378561226F, 0.0380409961F, 0.0382263077F, 0.0384120571F, 0.0385982443F, 0.0387848691F, 0.0389719315F, 0.0391594313F, 0.0393473683F, 0.0395357425F, 0.0397245537F, 0.0399138017F, 0.0401034866F, 0.0402936080F, 0.0404841660F, 0.0406751603F, 0.0408665909F, 0.0410584576F, 0.0412507603F, 0.0414434988F, 0.0416366731F, 0.0418302829F, 0.0420243282F, 0.0422188088F, 0.0424137246F, 0.0426090755F, 0.0428048613F, 0.0430010819F, 0.0431977371F, 0.0433948269F, 0.0435923511F, 0.0437903095F, 0.0439887020F, 0.0441875285F, 0.0443867889F, 0.0445864830F, 0.0447866106F, 0.0449871717F, 0.0451881661F, 0.0453895936F, 0.0455914542F, 0.0457937477F, 0.0459964738F, 0.0461996326F, 0.0464032239F, 0.0466072475F, 0.0468117032F, 0.0470165910F, 0.0472219107F, 0.0474276622F, 0.0476338452F, 0.0478404597F, 0.0480475056F, 0.0482549827F, 0.0484628907F, 0.0486712297F, 0.0488799994F, 0.0490891998F, 0.0492988306F, 0.0495088917F, 0.0497193830F, 0.0499303043F, 0.0501416554F, 0.0503534363F, 0.0505656468F, 0.0507782867F, 0.0509913559F, 0.0512048542F, 0.0514187815F, 0.0516331376F, 0.0518479225F, 0.0520631358F, 0.0522787775F, 0.0524948475F, 0.0527113455F, 0.0529282715F, 0.0531456252F, 0.0533634066F, 0.0535816154F, 0.0538002515F, 0.0540193148F, 0.0542388051F, 0.0544587222F, 0.0546790660F, 0.0548998364F, 0.0551210331F, 0.0553426561F, 0.0555647051F, 0.0557871801F, 0.0560100807F, 0.0562334070F, 0.0564571587F, 0.0566813357F, 0.0569059378F, 0.0571309649F, 0.0573564168F, 0.0575822933F, 0.0578085942F, 0.0580353195F, 0.0582624689F, 0.0584900423F, 0.0587180396F, 0.0589464605F, 0.0591753049F, 0.0594045726F, 0.0596342635F, 0.0598643774F, 0.0600949141F, 0.0603258735F, 0.0605572555F, 0.0607890597F, 0.0610212862F, 0.0612539346F, 0.0614870049F, 0.0617204968F, 0.0619544103F, 0.0621887451F, 0.0624235010F, 0.0626586780F, 0.0628942758F, 0.0631302942F, 0.0633667331F, 0.0636035923F, 0.0638408717F, 0.0640785710F, 0.0643166901F, 0.0645552288F, 0.0647941870F, 0.0650335645F, 0.0652733610F, 0.0655135765F, 0.0657542108F, 0.0659952636F, 0.0662367348F, 0.0664786242F, 0.0667209316F, 0.0669636570F, 0.0672068000F, 0.0674503605F, 0.0676943384F, 0.0679387334F, 0.0681835454F, 0.0684287742F, 0.0686744196F, 0.0689204814F, 0.0691669595F, 0.0694138536F, 0.0696611637F, 0.0699088894F, 0.0701570307F, 0.0704055873F, 0.0706545590F, 0.0709039458F, 0.0711537473F, 0.0714039634F, 0.0716545939F, 0.0719056387F, 0.0721570975F, 0.0724089702F, 0.0726612565F, 0.0729139563F, 0.0731670694F, 0.0734205956F, 0.0736745347F, 0.0739288866F, 0.0741836510F, 0.0744388277F, 0.0746944166F, 0.0749504175F, 0.0752068301F, 0.0754636543F, 0.0757208899F, 0.0759785367F, 0.0762365946F, 0.0764950632F, 0.0767539424F, 0.0770132320F, 0.0772729319F, 0.0775330418F, 0.0777935616F, 0.0780544909F, 0.0783158298F, 0.0785775778F, 0.0788397349F, 0.0791023009F, 0.0793652755F, 0.0796286585F, 0.0798924498F, 0.0801566492F, 0.0804212564F, 0.0806862712F, 0.0809516935F, 0.0812175231F, 0.0814837597F, 0.0817504031F, 0.0820174532F, 0.0822849097F, 0.0825527724F, 0.0828210412F, 0.0830897158F, 0.0833587960F, 0.0836282816F, 0.0838981724F, 0.0841684682F, 0.0844391688F, 0.0847102740F, 0.0849817835F, 0.0852536973F, 0.0855260150F, 0.0857987364F, 0.0860718614F, 0.0863453897F, 0.0866193211F, 0.0868936554F, 0.0871683924F, 0.0874435319F, 0.0877190737F, 0.0879950175F, 0.0882713632F, 0.0885481105F, 0.0888252592F, 0.0891028091F, 0.0893807600F, 0.0896591117F, 0.0899378639F, 0.0902170165F, 0.0904965692F, 0.0907765218F, 0.0910568740F, 0.0913376258F, 0.0916187767F, 0.0919003268F, 0.0921822756F, 0.0924646230F, 0.0927473687F, 0.0930305126F, 0.0933140545F, 0.0935979940F, 0.0938823310F, 0.0941670653F, 0.0944521966F, 0.0947377247F, 0.0950236494F, 0.0953099704F, 0.0955966876F, 0.0958838007F, 0.0961713094F, 0.0964592136F, 0.0967475131F, 0.0970362075F, 0.0973252967F, 0.0976147805F, 0.0979046585F, 0.0981949307F, 0.0984855967F, 0.0987766563F, 0.0990681093F, 0.0993599555F, 0.0996521945F, 0.0999448263F, 0.1002378506F, 0.1005312671F, 0.1008250755F, 0.1011192757F, 0.1014138675F, 0.1017088505F, 0.1020042246F, 0.1022999895F, 0.1025961450F, 0.1028926909F, 0.1031896268F, 0.1034869526F, 0.1037846680F, 0.1040827729F, 0.1043812668F, 0.1046801497F, 0.1049794213F, 0.1052790813F, 0.1055791294F, 0.1058795656F, 0.1061803894F, 0.1064816006F, 0.1067831991F, 0.1070851846F, 0.1073875568F, 0.1076903155F, 0.1079934604F, 0.1082969913F, 0.1086009079F, 0.1089052101F, 0.1092098975F, 0.1095149699F, 0.1098204270F, 0.1101262687F, 0.1104324946F, 0.1107391045F, 0.1110460982F, 0.1113534754F, 0.1116612359F, 0.1119693793F, 0.1122779055F, 0.1125868142F, 0.1128961052F, 0.1132057781F, 0.1135158328F, 0.1138262690F, 0.1141370863F, 0.1144482847F, 0.1147598638F, 0.1150718233F, 0.1153841631F, 0.1156968828F, 0.1160099822F, 0.1163234610F, 0.1166373190F, 0.1169515559F, 0.1172661714F, 0.1175811654F, 0.1178965374F, 0.1182122874F, 0.1185284149F, 0.1188449198F, 0.1191618018F, 0.1194790606F, 0.1197966960F, 0.1201147076F, 0.1204330953F, 0.1207518587F, 0.1210709976F, 0.1213905118F, 0.1217104009F, 0.1220306647F, 0.1223513029F, 0.1226723153F, 0.1229937016F, 0.1233154615F, 0.1236375948F, 0.1239601011F, 0.1242829803F, 0.1246062319F, 0.1249298559F, 0.1252538518F, 0.1255782195F, 0.1259029586F, 0.1262280689F, 0.1265535501F, 0.1268794019F, 0.1272056241F, 0.1275322163F, 0.1278591784F, 0.1281865099F, 0.1285142108F, 0.1288422805F, 0.1291707190F, 0.1294995259F, 0.1298287009F, 0.1301582437F, 0.1304881542F, 0.1308184319F, 0.1311490766F, 0.1314800881F, 0.1318114660F, 0.1321432100F, 0.1324753200F, 0.1328077955F, 0.1331406364F, 0.1334738422F, 0.1338074129F, 0.1341413479F, 0.1344756472F, 0.1348103103F, 0.1351453370F, 0.1354807270F, 0.1358164801F, 0.1361525959F, 0.1364890741F, 0.1368259145F, 0.1371631167F, 0.1375006805F, 0.1378386056F, 0.1381768917F, 0.1385155384F, 0.1388545456F, 0.1391939129F, 0.1395336400F, 0.1398737266F, 0.1402141724F, 0.1405549772F, 0.1408961406F, 0.1412376623F, 0.1415795421F, 0.1419217797F, 0.1422643746F, 0.1426073268F, 0.1429506358F, 0.1432943013F, 0.1436383231F, 0.1439827008F, 0.1443274342F, 0.1446725229F, 0.1450179667F, 0.1453637652F, 0.1457099181F, 0.1460564252F, 0.1464032861F, 0.1467505006F, 0.1470980682F, 0.1474459888F, 0.1477942620F, 0.1481428875F, 0.1484918651F, 0.1488411942F, 0.1491908748F, 0.1495409065F, 0.1498912889F, 0.1502420218F, 0.1505931048F, 0.1509445376F, 0.1512963200F, 0.1516484516F, 0.1520009321F, 0.1523537612F, 0.1527069385F, 0.1530604638F, 0.1534143368F, 0.1537685571F, 0.1541231244F, 0.1544780384F, 0.1548332987F, 0.1551889052F, 0.1555448574F, 0.1559011550F, 0.1562577978F, 0.1566147853F, 0.1569721173F, 0.1573297935F, 0.1576878135F, 0.1580461771F, 0.1584048838F, 0.1587639334F, 0.1591233255F, 0.1594830599F, 0.1598431361F, 0.1602035540F, 0.1605643131F, 0.1609254131F, 0.1612868537F, 0.1616486346F, 0.1620107555F, 0.1623732160F, 0.1627360158F, 0.1630991545F, 0.1634626319F, 0.1638264476F, 0.1641906013F, 0.1645550926F, 0.1649199212F, 0.1652850869F, 0.1656505892F, 0.1660164278F, 0.1663826024F, 0.1667491127F, 0.1671159583F, 0.1674831388F, 0.1678506541F, 0.1682185036F, 0.1685866872F, 0.1689552044F, 0.1693240549F, 0.1696932384F, 0.1700627545F, 0.1704326029F, 0.1708027833F, 0.1711732952F, 0.1715441385F, 0.1719153127F, 0.1722868175F, 0.1726586526F, 0.1730308176F, 0.1734033121F, 0.1737761359F, 0.1741492886F, 0.1745227698F, 0.1748965792F, 0.1752707164F, 0.1756451812F, 0.1760199731F, 0.1763950918F, 0.1767705370F, 0.1771463083F, 0.1775224054F, 0.1778988279F, 0.1782755754F, 0.1786526477F, 0.1790300444F, 0.1794077651F, 0.1797858094F, 0.1801641771F, 0.1805428677F, 0.1809218810F, 0.1813012165F, 0.1816808739F, 0.1820608528F, 0.1824411530F, 0.1828217739F, 0.1832027154F, 0.1835839770F, 0.1839655584F, 0.1843474592F, 0.1847296790F, 0.1851122175F, 0.1854950744F, 0.1858782492F, 0.1862617417F, 0.1866455514F, 0.1870296780F, 0.1874141211F, 0.1877988804F, 0.1881839555F, 0.1885693461F, 0.1889550517F, 0.1893410721F, 0.1897274068F, 0.1901140555F, 0.1905010178F, 0.1908882933F, 0.1912758818F, 0.1916637828F, 0.1920519959F, 0.1924405208F, 0.1928293571F, 0.1932185044F, 0.1936079625F, 0.1939977308F, 0.1943878091F, 0.1947781969F, 0.1951688939F, 0.1955598998F, 0.1959512141F, 0.1963428364F, 0.1967347665F, 0.1971270038F, 0.1975195482F, 0.1979123990F, 0.1983055561F, 0.1986990190F, 0.1990927873F, 0.1994868607F, 0.1998812388F, 0.2002759212F, 0.2006709075F, 0.2010661974F, 0.2014617904F, 0.2018576862F, 0.2022538844F, 0.2026503847F, 0.2030471865F, 0.2034442897F, 0.2038416937F, 0.2042393982F, 0.2046374028F, 0.2050357071F, 0.2054343107F, 0.2058332133F, 0.2062324145F, 0.2066319138F, 0.2070317110F, 0.2074318055F, 0.2078321970F, 0.2082328852F, 0.2086338696F, 0.2090351498F, 0.2094367255F, 0.2098385962F, 0.2102407617F, 0.2106432213F, 0.2110459749F, 0.2114490220F, 0.2118523621F, 0.2122559950F, 0.2126599202F, 0.2130641373F, 0.2134686459F, 0.2138734456F, 0.2142785361F, 0.2146839168F, 0.2150895875F, 0.2154955478F, 0.2159017972F, 0.2163083353F, 0.2167151617F, 0.2171222761F, 0.2175296780F, 0.2179373670F, 0.2183453428F, 0.2187536049F, 0.2191621529F, 0.2195709864F, 0.2199801051F, 0.2203895085F, 0.2207991961F, 0.2212091677F, 0.2216194228F, 0.2220299610F, 0.2224407818F, 0.2228518850F, 0.2232632699F, 0.2236749364F, 0.2240868839F, 0.2244991121F, 0.2249116204F, 0.2253244086F, 0.2257374763F, 0.2261508229F, 0.2265644481F, 0.2269783514F, 0.2273925326F, 0.2278069911F, 0.2282217265F, 0.2286367384F, 0.2290520265F, 0.2294675902F, 0.2298834292F, 0.2302995431F, 0.2307159314F, 0.2311325937F, 0.2315495297F, 0.2319667388F, 0.2323842207F, 0.2328019749F, 0.2332200011F, 0.2336382988F, 0.2340568675F, 0.2344757070F, 0.2348948166F, 0.2353141961F, 0.2357338450F, 0.2361537629F, 0.2365739493F, 0.2369944038F, 0.2374151261F, 0.2378361156F, 0.2382573720F, 0.2386788948F, 0.2391006836F, 0.2395227380F, 0.2399450575F, 0.2403676417F, 0.2407904902F, 0.2412136026F, 0.2416369783F, 0.2420606171F, 0.2424845185F, 0.2429086820F, 0.2433331072F, 0.2437577936F, 0.2441827409F, 0.2446079486F, 0.2450334163F, 0.2454591435F, 0.2458851298F, 0.2463113747F, 0.2467378779F, 0.2471646389F, 0.2475916573F, 0.2480189325F, 0.2484464643F, 0.2488742521F, 0.2493022955F, 0.2497305940F, 0.2501591473F, 0.2505879549F, 0.2510170163F, 0.2514463311F, 0.2518758989F, 0.2523057193F, 0.2527357916F, 0.2531661157F, 0.2535966909F, 0.2540275169F, 0.2544585931F, 0.2548899193F, 0.2553214948F, 0.2557533193F, 0.2561853924F, 0.2566177135F, 0.2570502822F, 0.2574830981F, 0.2579161608F, 0.2583494697F, 0.2587830245F, 0.2592168246F, 0.2596508697F, 0.2600851593F, 0.2605196929F, 0.2609544701F, 0.2613894904F, 0.2618247534F, 0.2622602586F, 0.2626960055F, 0.2631319938F, 0.2635682230F, 0.2640046925F, 0.2644414021F, 0.2648783511F, 0.2653155391F, 0.2657529657F, 0.2661906305F, 0.2666285329F, 0.2670666725F, 0.2675050489F, 0.2679436616F, 0.2683825101F, 0.2688215940F, 0.2692609127F, 0.2697004660F, 0.2701402532F, 0.2705802739F, 0.2710205278F, 0.2714610142F, 0.2719017327F, 0.2723426830F, 0.2727838644F, 0.2732252766F, 0.2736669191F, 0.2741087914F, 0.2745508930F, 0.2749932235F, 0.2754357824F, 0.2758785693F, 0.2763215837F, 0.2767648251F, 0.2772082930F, 0.2776519870F, 0.2780959066F, 0.2785400513F, 0.2789844207F, 0.2794290143F, 0.2798738316F, 0.2803188722F, 0.2807641355F, 0.2812096211F, 0.2816553286F, 0.2821012574F, 0.2825474071F, 0.2829937773F, 0.2834403673F, 0.2838871768F, 0.2843342053F, 0.2847814523F, 0.2852289174F, 0.2856765999F, 0.2861244996F, 0.2865726159F, 0.2870209482F, 0.2874694962F, 0.2879182594F, 0.2883672372F, 0.2888164293F, 0.2892658350F, 0.2897154540F, 0.2901652858F, 0.2906153298F, 0.2910655856F, 0.2915160527F, 0.2919667306F, 0.2924176189F, 0.2928687171F, 0.2933200246F, 0.2937715409F, 0.2942232657F, 0.2946751984F, 0.2951273386F, 0.2955796856F, 0.2960322391F, 0.2964849986F, 0.2969379636F, 0.2973911335F, 0.2978445080F, 0.2982980864F, 0.2987518684F, 0.2992058534F, 0.2996600409F, 0.3001144305F, 0.3005690217F, 0.3010238139F, 0.3014788067F, 0.3019339995F, 0.3023893920F, 0.3028449835F, 0.3033007736F, 0.3037567618F, 0.3042129477F, 0.3046693306F, 0.3051259102F, 0.3055826859F, 0.3060396572F, 0.3064968236F, 0.3069541847F, 0.3074117399F, 0.3078694887F, 0.3083274307F, 0.3087855653F, 0.3092438920F, 0.3097024104F, 0.3101611199F, 0.3106200200F, 0.3110791103F, 0.3115383902F, 0.3119978592F, 0.3124575169F, 0.3129173627F, 0.3133773961F, 0.3138376166F, 0.3142980238F, 0.3147586170F, 0.3152193959F, 0.3156803598F, 0.3161415084F, 0.3166028410F, 0.3170643573F, 0.3175260566F, 0.3179879384F, 0.3184500023F, 0.3189122478F, 0.3193746743F, 0.3198372814F, 0.3203000685F, 0.3207630351F, 0.3212261807F, 0.3216895048F, 0.3221530069F, 0.3226166865F, 0.3230805430F, 0.3235445760F, 0.3240087849F, 0.3244731693F, 0.3249377285F, 0.3254024622F, 0.3258673698F, 0.3263324507F, 0.3267977045F, 0.3272631306F, 0.3277287286F, 0.3281944978F, 0.3286604379F, 0.3291265482F, 0.3295928284F, 0.3300592777F, 0.3305258958F, 0.3309926821F, 0.3314596361F, 0.3319267573F, 0.3323940451F, 0.3328614990F, 0.3333291186F, 0.3337969033F, 0.3342648525F, 0.3347329658F, 0.3352012427F, 0.3356696825F, 0.3361382849F, 0.3366070492F, 0.3370759749F, 0.3375450616F, 0.3380143087F, 0.3384837156F, 0.3389532819F, 0.3394230071F, 0.3398928905F, 0.3403629317F, 0.3408331302F, 0.3413034854F, 0.3417739967F, 0.3422446638F, 0.3427154860F, 0.3431864628F, 0.3436575938F, 0.3441288782F, 0.3446003158F, 0.3450719058F, 0.3455436478F, 0.3460155412F, 0.3464875856F, 0.3469597804F, 0.3474321250F, 0.3479046189F, 0.3483772617F, 0.3488500527F, 0.3493229914F, 0.3497960774F, 0.3502693100F, 0.3507426887F, 0.3512162131F, 0.3516898825F, 0.3521636965F, 0.3526376545F, 0.3531117559F, 0.3535860003F, 0.3540603870F, 0.3545349157F, 0.3550095856F, 0.3554843964F, 0.3559593474F, 0.3564344381F, 0.3569096680F, 0.3573850366F, 0.3578605432F, 0.3583361875F, 0.3588119687F, 0.3592878865F, 0.3597639402F, 0.3602401293F, 0.3607164533F, 0.3611929117F, 0.3616695038F, 0.3621462292F, 0.3626230873F, 0.3631000776F, 0.3635771995F, 0.3640544525F, 0.3645318360F, 0.3650093496F, 0.3654869926F, 0.3659647645F, 0.3664426648F, 0.3669206930F, 0.3673988484F, 0.3678771306F, 0.3683555390F, 0.3688340731F, 0.3693127322F, 0.3697915160F, 0.3702704237F, 0.3707494549F, 0.3712286091F, 0.3717078857F, 0.3721872840F, 0.3726668037F, 0.3731464441F, 0.3736262047F, 0.3741060850F, 0.3745860843F, 0.3750662023F, 0.3755464382F, 0.3760267915F, 0.3765072618F, 0.3769878484F, 0.3774685509F, 0.3779493686F, 0.3784303010F, 0.3789113475F, 0.3793925076F, 0.3798737809F, 0.3803551666F, 0.3808366642F, 0.3813182733F, 0.3817999932F, 0.3822818234F, 0.3827637633F, 0.3832458124F, 0.3837279702F, 0.3842102360F, 0.3846926093F, 0.3851750897F, 0.3856576764F, 0.3861403690F, 0.3866231670F, 0.3871060696F, 0.3875890765F, 0.3880721870F, 0.3885554007F, 0.3890387168F, 0.3895221349F, 0.3900056544F, 0.3904892748F, 0.3909729955F, 0.3914568160F, 0.3919407356F, 0.3924247539F, 0.3929088702F, 0.3933930841F, 0.3938773949F, 0.3943618021F, 0.3948463052F, 0.3953309035F, 0.3958155966F, 0.3963003838F, 0.3967852646F, 0.3972702385F, 0.3977553048F, 0.3982404631F, 0.3987257127F, 0.3992110531F, 0.3996964838F, 0.4001820041F, 0.4006676136F, 0.4011533116F, 0.4016390976F, 0.4021249710F, 0.4026109313F, 0.4030969779F, 0.4035831102F, 0.4040693277F, 0.4045556299F, 0.4050420160F, 0.4055284857F, 0.4060150383F, 0.4065016732F, 0.4069883899F, 0.4074751879F, 0.4079620665F, 0.4084490252F, 0.4089360635F, 0.4094231807F, 0.4099103763F, 0.4103976498F, 0.4108850005F, 0.4113724280F, 0.4118599315F, 0.4123475107F, 0.4128351648F, 0.4133228934F, 0.4138106959F, 0.4142985716F, 0.4147865201F, 0.4152745408F, 0.4157626330F, 0.4162507963F, 0.4167390301F, 0.4172273337F, 0.4177157067F, 0.4182041484F, 0.4186926583F, 0.4191812359F, 0.4196698805F, 0.4201585915F, 0.4206473685F, 0.4211362108F, 0.4216251179F, 0.4221140892F, 0.4226031241F, 0.4230922221F, 0.4235813826F, 0.4240706050F, 0.4245598887F, 0.4250492332F, 0.4255386379F, 0.4260281022F, 0.4265176256F, 0.4270072075F, 0.4274968473F, 0.4279865445F, 0.4284762984F, 0.4289661086F, 0.4294559743F, 0.4299458951F, 0.4304358704F, 0.4309258996F, 0.4314159822F, 0.4319061175F, 0.4323963050F, 0.4328865441F, 0.4333768342F, 0.4338671749F, 0.4343575654F, 0.4348480052F, 0.4353384938F, 0.4358290306F, 0.4363196149F, 0.4368102463F, 0.4373009241F, 0.4377916478F, 0.4382824168F, 0.4387732305F, 0.4392640884F, 0.4397549899F, 0.4402459343F, 0.4407369212F, 0.4412279499F, 0.4417190198F, 0.4422101305F, 0.4427012813F, 0.4431924717F, 0.4436837010F, 0.4441749686F, 0.4446662742F, 0.4451576169F, 0.4456489963F, 0.4461404118F, 0.4466318628F, 0.4471233487F, 0.4476148690F, 0.4481064230F, 0.4485980103F, 0.4490896302F, 0.4495812821F, 0.4500729654F, 0.4505646797F, 0.4510564243F, 0.4515481986F, 0.4520400021F, 0.4525318341F, 0.4530236942F, 0.4535155816F, 0.4540074959F, 0.4544994365F, 0.4549914028F, 0.4554833941F, 0.4559754100F, 0.4564674499F, 0.4569595131F, 0.4574515991F, 0.4579437074F, 0.4584358372F, 0.4589279881F, 0.4594201595F, 0.4599123508F, 0.4604045615F, 0.4608967908F, 0.4613890383F, 0.4618813034F, 0.4623735855F, 0.4628658841F, 0.4633581984F, 0.4638505281F, 0.4643428724F, 0.4648352308F, 0.4653276028F, 0.4658199877F, 0.4663123849F, 0.4668047940F, 0.4672972143F, 0.4677896451F, 0.4682820861F, 0.4687745365F, 0.4692669958F, 0.4697594634F, 0.4702519387F, 0.4707444211F, 0.4712369102F, 0.4717294052F, 0.4722219056F, 0.4727144109F, 0.4732069204F, 0.4736994336F, 0.4741919498F, 0.4746844686F, 0.4751769893F, 0.4756695113F, 0.4761620341F, 0.4766545571F, 0.4771470797F, 0.4776396013F, 0.4781321213F, 0.4786246392F, 0.4791171544F, 0.4796096663F, 0.4801021744F, 0.4805946779F, 0.4810871765F, 0.4815796694F, 0.4820721561F, 0.4825646360F, 0.4830571086F, 0.4835495732F, 0.4840420293F, 0.4845344763F, 0.4850269136F, 0.4855193407F, 0.4860117569F, 0.4865041617F, 0.4869965545F, 0.4874889347F, 0.4879813018F, 0.4884736551F, 0.4889659941F, 0.4894583182F, 0.4899506268F, 0.4904429193F, 0.4909351952F, 0.4914274538F, 0.4919196947F, 0.4924119172F, 0.4929041207F, 0.4933963046F, 0.4938884685F, 0.4943806116F, 0.4948727335F, 0.4953648335F, 0.4958569110F, 0.4963489656F, 0.4968409965F, 0.4973330032F, 0.4978249852F, 0.4983169419F, 0.4988088726F, 0.4993007768F, 0.4997926539F, 0.5002845034F, 0.5007763247F, 0.5012681171F, 0.5017598801F, 0.5022516132F, 0.5027433157F, 0.5032349871F, 0.5037266268F, 0.5042182341F, 0.5047098086F, 0.5052013497F, 0.5056928567F, 0.5061843292F, 0.5066757664F, 0.5071671679F, 0.5076585330F, 0.5081498613F, 0.5086411520F, 0.5091324047F, 0.5096236187F, 0.5101147934F, 0.5106059284F, 0.5110970230F, 0.5115880766F, 0.5120790887F, 0.5125700587F, 0.5130609860F, 0.5135518700F, 0.5140427102F, 0.5145335059F, 0.5150242566F, 0.5155149618F, 0.5160056208F, 0.5164962331F, 0.5169867980F, 0.5174773151F, 0.5179677837F, 0.5184582033F, 0.5189485733F, 0.5194388931F, 0.5199291621F, 0.5204193798F, 0.5209095455F, 0.5213996588F, 0.5218897190F, 0.5223797256F, 0.5228696779F, 0.5233595755F, 0.5238494177F, 0.5243392039F, 0.5248289337F, 0.5253186063F, 0.5258082213F, 0.5262977781F, 0.5267872760F, 0.5272767146F, 0.5277660932F, 0.5282554112F, 0.5287446682F, 0.5292338635F, 0.5297229965F, 0.5302120667F, 0.5307010736F, 0.5311900164F, 0.5316788947F, 0.5321677079F, 0.5326564554F, 0.5331451366F, 0.5336337511F, 0.5341222981F, 0.5346107771F, 0.5350991876F, 0.5355875290F, 0.5360758007F, 0.5365640021F, 0.5370521327F, 0.5375401920F, 0.5380281792F, 0.5385160939F, 0.5390039355F, 0.5394917034F, 0.5399793971F, 0.5404670159F, 0.5409545594F, 0.5414420269F, 0.5419294179F, 0.5424167318F, 0.5429039680F, 0.5433911261F, 0.5438782053F, 0.5443652051F, 0.5448521250F, 0.5453389644F, 0.5458257228F, 0.5463123995F, 0.5467989940F, 0.5472855057F, 0.5477719341F, 0.5482582786F, 0.5487445387F, 0.5492307137F, 0.5497168031F, 0.5502028063F, 0.5506887228F, 0.5511745520F, 0.5516602934F, 0.5521459463F, 0.5526315103F, 0.5531169847F, 0.5536023690F, 0.5540876626F, 0.5545728649F, 0.5550579755F, 0.5555429937F, 0.5560279189F, 0.5565127507F, 0.5569974884F, 0.5574821315F, 0.5579666794F, 0.5584511316F, 0.5589354875F, 0.5594197465F, 0.5599039080F, 0.5603879716F, 0.5608719367F, 0.5613558026F, 0.5618395689F, 0.5623232350F, 0.5628068002F, 0.5632902642F, 0.5637736262F, 0.5642568858F, 0.5647400423F, 0.5652230953F, 0.5657060442F, 0.5661888883F, 0.5666716272F, 0.5671542603F, 0.5676367870F, 0.5681192069F, 0.5686015192F, 0.5690837235F, 0.5695658192F, 0.5700478058F, 0.5705296827F, 0.5710114494F, 0.5714931052F, 0.5719746497F, 0.5724560822F, 0.5729374023F, 0.5734186094F, 0.5738997029F, 0.5743806823F, 0.5748615470F, 0.5753422965F, 0.5758229301F, 0.5763034475F, 0.5767838480F, 0.5772641310F, 0.5777442960F, 0.5782243426F, 0.5787042700F, 0.5791840778F, 0.5796637654F, 0.5801433322F, 0.5806227778F, 0.5811021016F, 0.5815813029F, 0.5820603814F, 0.5825393363F, 0.5830181673F, 0.5834968737F, 0.5839754549F, 0.5844539105F, 0.5849322399F, 0.5854104425F, 0.5858885179F, 0.5863664653F, 0.5868442844F, 0.5873219746F, 0.5877995353F, 0.5882769660F, 0.5887542661F, 0.5892314351F, 0.5897084724F, 0.5901853776F, 0.5906621500F, 0.5911387892F, 0.5916152945F, 0.5920916655F, 0.5925679016F, 0.5930440022F, 0.5935199669F, 0.5939957950F, 0.5944714861F, 0.5949470396F, 0.5954224550F, 0.5958977317F, 0.5963728692F, 0.5968478669F, 0.5973227244F, 0.5977974411F, 0.5982720163F, 0.5987464497F, 0.5992207407F, 0.5996948887F, 0.6001688932F, 0.6006427537F, 0.6011164696F, 0.6015900405F, 0.6020634657F, 0.6025367447F, 0.6030098770F, 0.6034828621F, 0.6039556995F, 0.6044283885F, 0.6049009288F, 0.6053733196F, 0.6058455606F, 0.6063176512F, 0.6067895909F, 0.6072613790F, 0.6077330152F, 0.6082044989F, 0.6086758295F, 0.6091470065F, 0.6096180294F, 0.6100888977F, 0.6105596108F, 0.6110301682F, 0.6115005694F, 0.6119708139F, 0.6124409011F, 0.6129108305F, 0.6133806017F, 0.6138502139F, 0.6143196669F, 0.6147889599F, 0.6152580926F, 0.6157270643F, 0.6161958746F, 0.6166645230F, 0.6171330088F, 0.6176013317F, 0.6180694910F, 0.6185374863F, 0.6190053171F, 0.6194729827F, 0.6199404828F, 0.6204078167F, 0.6208749841F, 0.6213419842F, 0.6218088168F, 0.6222754811F, 0.6227419768F, 0.6232083032F, 0.6236744600F, 0.6241404465F, 0.6246062622F, 0.6250719067F, 0.6255373795F, 0.6260026799F, 0.6264678076F, 0.6269327619F, 0.6273975425F, 0.6278621487F, 0.6283265800F, 0.6287908361F, 0.6292549163F, 0.6297188201F, 0.6301825471F, 0.6306460966F, 0.6311094683F, 0.6315726617F, 0.6320356761F, 0.6324985111F, 0.6329611662F, 0.6334236410F, 0.6338859348F, 0.6343480472F, 0.6348099777F, 0.6352717257F, 0.6357332909F, 0.6361946726F, 0.6366558704F, 0.6371168837F, 0.6375777122F, 0.6380383552F, 0.6384988123F, 0.6389590830F, 0.6394191668F, 0.6398790631F, 0.6403387716F, 0.6407982916F, 0.6412576228F, 0.6417167645F, 0.6421757163F, 0.6426344778F, 0.6430930483F, 0.6435514275F, 0.6440096149F, 0.6444676098F, 0.6449254119F, 0.6453830207F, 0.6458404356F, 0.6462976562F, 0.6467546820F, 0.6472115125F, 0.6476681472F, 0.6481245856F, 0.6485808273F, 0.6490368717F, 0.6494927183F, 0.6499483667F, 0.6504038164F, 0.6508590670F, 0.6513141178F, 0.6517689684F, 0.6522236185F, 0.6526780673F, 0.6531323146F, 0.6535863598F, 0.6540402024F, 0.6544938419F, 0.6549472779F, 0.6554005099F, 0.6558535373F, 0.6563063598F, 0.6567589769F, 0.6572113880F, 0.6576635927F, 0.6581155906F, 0.6585673810F, 0.6590189637F, 0.6594703380F, 0.6599215035F, 0.6603724598F, 0.6608232064F, 0.6612737427F, 0.6617240684F, 0.6621741829F, 0.6626240859F, 0.6630737767F, 0.6635232550F, 0.6639725202F, 0.6644215720F, 0.6648704098F, 0.6653190332F, 0.6657674417F, 0.6662156348F, 0.6666636121F, 0.6671113731F, 0.6675589174F, 0.6680062445F, 0.6684533538F, 0.6689002450F, 0.6693469177F, 0.6697933712F, 0.6702396052F, 0.6706856193F, 0.6711314129F, 0.6715769855F, 0.6720223369F, 0.6724674664F, 0.6729123736F, 0.6733570581F, 0.6738015194F, 0.6742457570F, 0.6746897706F, 0.6751335596F, 0.6755771236F, 0.6760204621F, 0.6764635747F, 0.6769064609F, 0.6773491204F, 0.6777915525F, 0.6782337570F, 0.6786757332F, 0.6791174809F, 0.6795589995F, 0.6800002886F, 0.6804413477F, 0.6808821765F, 0.6813227743F, 0.6817631409F, 0.6822032758F, 0.6826431785F, 0.6830828485F, 0.6835222855F, 0.6839614890F, 0.6844004585F, 0.6848391936F, 0.6852776939F, 0.6857159589F, 0.6861539883F, 0.6865917815F, 0.6870293381F, 0.6874666576F, 0.6879037398F, 0.6883405840F, 0.6887771899F, 0.6892135571F, 0.6896496850F, 0.6900855733F, 0.6905212216F, 0.6909566294F, 0.6913917963F, 0.6918267218F, 0.6922614055F, 0.6926958471F, 0.6931300459F, 0.6935640018F, 0.6939977141F, 0.6944311825F, 0.6948644066F, 0.6952973859F, 0.6957301200F, 0.6961626085F, 0.6965948510F, 0.6970268470F, 0.6974585961F, 0.6978900980F, 0.6983213521F, 0.6987523580F, 0.6991831154F, 0.6996136238F, 0.7000438828F, 0.7004738921F, 0.7009036510F, 0.7013331594F, 0.7017624166F, 0.7021914224F, 0.7026201763F, 0.7030486779F, 0.7034769268F, 0.7039049226F, 0.7043326648F, 0.7047601531F, 0.7051873870F, 0.7056143662F, 0.7060410902F, 0.7064675586F, 0.7068937711F, 0.7073197271F, 0.7077454264F, 0.7081708684F, 0.7085960529F, 0.7090209793F, 0.7094456474F, 0.7098700566F, 0.7102942066F, 0.7107180970F, 0.7111417274F, 0.7115650974F, 0.7119882066F, 0.7124110545F, 0.7128336409F, 0.7132559653F, 0.7136780272F, 0.7140998264F, 0.7145213624F, 0.7149426348F, 0.7153636433F, 0.7157843874F, 0.7162048668F, 0.7166250810F, 0.7170450296F, 0.7174647124F, 0.7178841289F, 0.7183032786F, 0.7187221613F, 0.7191407765F, 0.7195591239F, 0.7199772030F, 0.7203950135F, 0.7208125550F, 0.7212298271F, 0.7216468294F, 0.7220635616F, 0.7224800233F, 0.7228962140F, 0.7233121335F, 0.7237277813F, 0.7241431571F, 0.7245582604F, 0.7249730910F, 0.7253876484F, 0.7258019322F, 0.7262159422F, 0.7266296778F, 0.7270431388F, 0.7274563247F, 0.7278692353F, 0.7282818700F, 0.7286942287F, 0.7291063108F, 0.7295181160F, 0.7299296440F, 0.7303408944F, 0.7307518669F, 0.7311625609F, 0.7315729763F, 0.7319831126F, 0.7323929695F, 0.7328025466F, 0.7332118435F, 0.7336208600F, 0.7340295955F, 0.7344380499F, 0.7348462226F, 0.7352541134F, 0.7356617220F, 0.7360690478F, 0.7364760907F, 0.7368828502F, 0.7372893259F, 0.7376955176F, 0.7381014249F, 0.7385070475F, 0.7389123849F, 0.7393174368F, 0.7397222029F, 0.7401266829F, 0.7405308763F, 0.7409347829F, 0.7413384023F, 0.7417417341F, 0.7421447780F, 0.7425475338F, 0.7429500009F, 0.7433521791F, 0.7437540681F, 0.7441556674F, 0.7445569769F, 0.7449579960F, 0.7453587245F, 0.7457591621F, 0.7461593084F, 0.7465591631F, 0.7469587259F, 0.7473579963F, 0.7477569741F, 0.7481556590F, 0.7485540506F, 0.7489521486F, 0.7493499526F, 0.7497474623F, 0.7501446775F, 0.7505415977F, 0.7509382227F, 0.7513345521F, 0.7517305856F, 0.7521263229F, 0.7525217636F, 0.7529169074F, 0.7533117541F, 0.7537063032F, 0.7541005545F, 0.7544945076F, 0.7548881623F, 0.7552815182F, 0.7556745749F, 0.7560673323F, 0.7564597899F, 0.7568519474F, 0.7572438046F, 0.7576353611F, 0.7580266166F, 0.7584175708F, 0.7588082235F, 0.7591985741F, 0.7595886226F, 0.7599783685F, 0.7603678116F, 0.7607569515F, 0.7611457879F, 0.7615343206F, 0.7619225493F, 0.7623104735F, 0.7626980931F, 0.7630854078F, 0.7634724171F, 0.7638591209F, 0.7642455188F, 0.7646316106F, 0.7650173959F, 0.7654028744F, 0.7657880459F, 0.7661729100F, 0.7665574664F, 0.7669417150F, 0.7673256553F, 0.7677092871F, 0.7680926100F, 0.7684756239F, 0.7688583284F, 0.7692407232F, 0.7696228080F, 0.7700045826F, 0.7703860467F, 0.7707671999F, 0.7711480420F, 0.7715285728F, 0.7719087918F, 0.7722886989F, 0.7726682938F, 0.7730475762F, 0.7734265458F, 0.7738052023F, 0.7741835454F, 0.7745615750F, 0.7749392906F, 0.7753166921F, 0.7756937791F, 0.7760705514F, 0.7764470087F, 0.7768231508F, 0.7771989773F, 0.7775744880F, 0.7779496827F, 0.7783245610F, 0.7786991227F, 0.7790733676F, 0.7794472953F, 0.7798209056F, 0.7801941982F, 0.7805671729F, 0.7809398294F, 0.7813121675F, 0.7816841869F, 0.7820558873F, 0.7824272684F, 0.7827983301F, 0.7831690720F, 0.7835394940F, 0.7839095957F, 0.7842793768F, 0.7846488373F, 0.7850179767F, 0.7853867948F, 0.7857552914F, 0.7861234663F, 0.7864913191F, 0.7868588497F, 0.7872260578F, 0.7875929431F, 0.7879595055F, 0.7883257445F, 0.7886916601F, 0.7890572520F, 0.7894225198F, 0.7897874635F, 0.7901520827F, 0.7905163772F, 0.7908803468F, 0.7912439912F, 0.7916073102F, 0.7919703035F, 0.7923329710F, 0.7926953124F, 0.7930573274F, 0.7934190158F, 0.7937803774F, 0.7941414120F, 0.7945021193F, 0.7948624991F, 0.7952225511F, 0.7955822752F, 0.7959416711F, 0.7963007387F, 0.7966594775F, 0.7970178875F, 0.7973759685F, 0.7977337201F, 0.7980911422F, 0.7984482346F, 0.7988049970F, 0.7991614292F, 0.7995175310F, 0.7998733022F, 0.8002287426F, 0.8005838519F, 0.8009386299F, 0.8012930765F, 0.8016471914F, 0.8020009744F, 0.8023544253F, 0.8027075438F, 0.8030603298F, 0.8034127831F, 0.8037649035F, 0.8041166906F, 0.8044681445F, 0.8048192647F, 0.8051700512F, 0.8055205038F, 0.8058706222F, 0.8062204062F, 0.8065698556F, 0.8069189702F, 0.8072677499F, 0.8076161944F, 0.8079643036F, 0.8083120772F, 0.8086595151F, 0.8090066170F, 0.8093533827F, 0.8096998122F, 0.8100459051F, 0.8103916613F, 0.8107370806F, 0.8110821628F, 0.8114269077F, 0.8117713151F, 0.8121153849F, 0.8124591169F, 0.8128025108F, 0.8131455666F, 0.8134882839F, 0.8138306627F, 0.8141727027F, 0.8145144038F, 0.8148557658F, 0.8151967886F, 0.8155374718F, 0.8158778154F, 0.8162178192F, 0.8165574830F, 0.8168968067F, 0.8172357900F, 0.8175744328F, 0.8179127349F, 0.8182506962F, 0.8185883164F, 0.8189255955F, 0.8192625332F, 0.8195991295F, 0.8199353840F, 0.8202712967F, 0.8206068673F, 0.8209420958F, 0.8212769820F, 0.8216115256F, 0.8219457266F, 0.8222795848F, 0.8226131000F, 0.8229462721F, 0.8232791009F, 0.8236115863F, 0.8239437280F, 0.8242755260F, 0.8246069801F, 0.8249380901F, 0.8252688559F, 0.8255992774F, 0.8259293544F, 0.8262590867F, 0.8265884741F, 0.8269175167F, 0.8272462141F, 0.8275745663F, 0.8279025732F, 0.8282302344F, 0.8285575501F, 0.8288845199F, 0.8292111437F, 0.8295374215F, 0.8298633530F, 0.8301889382F, 0.8305141768F, 0.8308390688F, 0.8311636141F, 0.8314878124F, 0.8318116637F, 0.8321351678F, 0.8324583246F, 0.8327811340F, 0.8331035957F, 0.8334257098F, 0.8337474761F, 0.8340688944F, 0.8343899647F, 0.8347106867F, 0.8350310605F, 0.8353510857F, 0.8356707624F, 0.8359900904F, 0.8363090696F, 0.8366276999F, 0.8369459811F, 0.8372639131F, 0.8375814958F, 0.8378987292F, 0.8382156130F, 0.8385321472F, 0.8388483316F, 0.8391641662F, 0.8394796508F, 0.8397947853F, 0.8401095697F, 0.8404240037F, 0.8407380873F, 0.8410518204F, 0.8413652029F, 0.8416782347F, 0.8419909156F, 0.8423032456F, 0.8426152245F, 0.8429268523F, 0.8432381289F, 0.8435490541F, 0.8438596279F, 0.8441698502F, 0.8444797208F, 0.8447892396F, 0.8450984067F, 0.8454072218F, 0.8457156849F, 0.8460237959F, 0.8463315547F, 0.8466389612F, 0.8469460154F, 0.8472527170F, 0.8475590661F, 0.8478650625F, 0.8481707063F, 0.8484759971F, 0.8487809351F, 0.8490855201F, 0.8493897521F, 0.8496936308F, 0.8499971564F, 0.8503003286F, 0.8506031474F, 0.8509056128F, 0.8512077246F, 0.8515094828F, 0.8518108872F, 0.8521119379F, 0.8524126348F, 0.8527129777F, 0.8530129666F, 0.8533126015F, 0.8536118822F, 0.8539108087F, 0.8542093809F, 0.8545075988F, 0.8548054623F, 0.8551029712F, 0.8554001257F, 0.8556969255F, 0.8559933707F, 0.8562894611F, 0.8565851968F, 0.8568805775F, 0.8571756034F, 0.8574702743F, 0.8577645902F, 0.8580585509F, 0.8583521566F, 0.8586454070F, 0.8589383021F, 0.8592308420F, 0.8595230265F, 0.8598148556F, 0.8601063292F, 0.8603974473F, 0.8606882098F, 0.8609786167F, 0.8612686680F, 0.8615583636F, 0.8618477034F, 0.8621366874F, 0.8624253156F, 0.8627135878F, 0.8630015042F, 0.8632890646F, 0.8635762690F, 0.8638631173F, 0.8641496096F, 0.8644357457F, 0.8647215257F, 0.8650069495F, 0.8652920171F, 0.8655767283F, 0.8658610833F, 0.8661450820F, 0.8664287243F, 0.8667120102F, 0.8669949397F, 0.8672775127F, 0.8675597293F, 0.8678415894F, 0.8681230929F, 0.8684042398F, 0.8686850302F, 0.8689654640F, 0.8692455412F, 0.8695252617F, 0.8698046255F, 0.8700836327F, 0.8703622831F, 0.8706405768F, 0.8709185138F, 0.8711960940F, 0.8714733174F, 0.8717501840F, 0.8720266939F, 0.8723028469F, 0.8725786430F, 0.8728540824F, 0.8731291648F, 0.8734038905F, 0.8736782592F, 0.8739522711F, 0.8742259261F, 0.8744992242F, 0.8747721653F, 0.8750447496F, 0.8753169770F, 0.8755888475F, 0.8758603611F, 0.8761315177F, 0.8764023175F, 0.8766727603F, 0.8769428462F, 0.8772125752F, 0.8774819474F, 0.8777509626F, 0.8780196209F, 0.8782879224F, 0.8785558669F, 0.8788234546F, 0.8790906854F, 0.8793575594F, 0.8796240765F, 0.8798902368F, 0.8801560403F, 0.8804214870F, 0.8806865768F, 0.8809513099F, 0.8812156863F, 0.8814797059F, 0.8817433687F, 0.8820066749F, 0.8822696243F, 0.8825322171F, 0.8827944532F, 0.8830563327F, 0.8833178556F, 0.8835790219F, 0.8838398316F, 0.8841002848F, 0.8843603815F, 0.8846201217F, 0.8848795054F, 0.8851385327F, 0.8853972036F, 0.8856555182F, 0.8859134764F, 0.8861710783F, 0.8864283239F, 0.8866852133F, 0.8869417464F, 0.8871979234F, 0.8874537443F, 0.8877092090F, 0.8879643177F, 0.8882190704F, 0.8884734671F, 0.8887275078F, 0.8889811927F, 0.8892345216F, 0.8894874948F, 0.8897401122F, 0.8899923738F, 0.8902442798F, 0.8904958301F, 0.8907470248F, 0.8909978640F, 0.8912483477F, 0.8914984759F, 0.8917482487F, 0.8919976662F, 0.8922467284F, 0.8924954353F, 0.8927437871F, 0.8929917837F, 0.8932394252F, 0.8934867118F, 0.8937336433F, 0.8939802199F, 0.8942264417F, 0.8944723087F, 0.8947178210F, 0.8949629785F, 0.8952077815F, 0.8954522299F, 0.8956963239F, 0.8959400634F, 0.8961834486F, 0.8964264795F, 0.8966691561F, 0.8969114786F, 0.8971534470F, 0.8973950614F, 0.8976363219F, 0.8978772284F, 0.8981177812F, 0.8983579802F, 0.8985978256F, 0.8988373174F, 0.8990764556F, 0.8993152405F, 0.8995536720F, 0.8997917502F, 0.9000294751F, 0.9002668470F, 0.9005038658F, 0.9007405317F, 0.9009768446F, 0.9012128048F, 0.9014484123F, 0.9016836671F, 0.9019185693F, 0.9021531191F, 0.9023873165F, 0.9026211616F, 0.9028546546F, 0.9030877954F, 0.9033205841F, 0.9035530210F, 0.9037851059F, 0.9040168392F, 0.9042482207F, 0.9044792507F, 0.9047099293F, 0.9049402564F, 0.9051702323F, 0.9053998569F, 0.9056291305F, 0.9058580531F, 0.9060866248F, 0.9063148457F, 0.9065427159F, 0.9067702355F, 0.9069974046F, 0.9072242233F, 0.9074506917F, 0.9076768100F, 0.9079025782F, 0.9081279964F, 0.9083530647F, 0.9085777833F, 0.9088021523F, 0.9090261717F, 0.9092498417F, 0.9094731623F, 0.9096961338F, 0.9099187561F, 0.9101410295F, 0.9103629540F, 0.9105845297F, 0.9108057568F, 0.9110266354F, 0.9112471656F, 0.9114673475F, 0.9116871812F, 0.9119066668F, 0.9121258046F, 0.9123445945F, 0.9125630367F, 0.9127811314F, 0.9129988786F, 0.9132162785F, 0.9134333312F, 0.9136500368F, 0.9138663954F, 0.9140824073F, 0.9142980724F, 0.9145133910F, 0.9147283632F, 0.9149429890F, 0.9151572687F, 0.9153712023F, 0.9155847900F, 0.9157980319F, 0.9160109282F, 0.9162234790F, 0.9164356844F, 0.9166475445F, 0.9168590595F, 0.9170702296F, 0.9172810548F, 0.9174915354F, 0.9177016714F, 0.9179114629F, 0.9181209102F, 0.9183300134F, 0.9185387726F, 0.9187471879F, 0.9189552595F, 0.9191629876F, 0.9193703723F, 0.9195774136F, 0.9197841119F, 0.9199904672F, 0.9201964797F, 0.9204021495F, 0.9206074767F, 0.9208124616F, 0.9210171043F, 0.9212214049F, 0.9214253636F, 0.9216289805F, 0.9218322558F, 0.9220351896F, 0.9222377821F, 0.9224400335F, 0.9226419439F, 0.9228435134F, 0.9230447423F, 0.9232456307F, 0.9234461787F, 0.9236463865F, 0.9238462543F, 0.9240457822F, 0.9242449704F, 0.9244438190F, 0.9246423282F, 0.9248404983F, 0.9250383293F, 0.9252358214F, 0.9254329747F, 0.9256297896F, 0.9258262660F, 0.9260224042F, 0.9262182044F, 0.9264136667F, 0.9266087913F, 0.9268035783F, 0.9269980280F, 0.9271921405F, 0.9273859160F, 0.9275793546F, 0.9277724566F, 0.9279652221F, 0.9281576513F, 0.9283497443F, 0.9285415014F, 0.9287329227F, 0.9289240084F, 0.9291147586F, 0.9293051737F, 0.9294952536F, 0.9296849987F, 0.9298744091F, 0.9300634850F, 0.9302522266F, 0.9304406340F, 0.9306287074F, 0.9308164471F, 0.9310038532F, 0.9311909259F, 0.9313776654F, 0.9315640719F, 0.9317501455F, 0.9319358865F, 0.9321212951F, 0.9323063713F, 0.9324911155F, 0.9326755279F, 0.9328596085F, 0.9330433577F, 0.9332267756F, 0.9334098623F, 0.9335926182F, 0.9337750434F, 0.9339571380F, 0.9341389023F, 0.9343203366F, 0.9345014409F, 0.9346822155F, 0.9348626606F, 0.9350427763F, 0.9352225630F, 0.9354020207F, 0.9355811498F, 0.9357599503F, 0.9359384226F, 0.9361165667F, 0.9362943830F, 0.9364718716F, 0.9366490327F, 0.9368258666F, 0.9370023733F, 0.9371785533F, 0.9373544066F, 0.9375299335F, 0.9377051341F, 0.9378800087F, 0.9380545576F, 0.9382287809F, 0.9384026787F, 0.9385762515F, 0.9387494993F, 0.9389224223F, 0.9390950209F, 0.9392672951F, 0.9394392453F, 0.9396108716F, 0.9397821743F, 0.9399531536F, 0.9401238096F, 0.9402941427F, 0.9404641530F, 0.9406338407F, 0.9408032061F, 0.9409722495F, 0.9411409709F, 0.9413093707F, 0.9414774491F, 0.9416452062F, 0.9418126424F, 0.9419797579F, 0.9421465528F, 0.9423130274F, 0.9424791819F, 0.9426450166F, 0.9428105317F, 0.9429757274F, 0.9431406039F, 0.9433051616F, 0.9434694005F, 0.9436333209F, 0.9437969232F, 0.9439602074F, 0.9441231739F, 0.9442858229F, 0.9444481545F, 0.9446101691F, 0.9447718669F, 0.9449332481F, 0.9450943129F, 0.9452550617F, 0.9454154945F, 0.9455756118F, 0.9457354136F, 0.9458949003F, 0.9460540721F, 0.9462129292F, 0.9463714719F, 0.9465297003F, 0.9466876149F, 0.9468452157F, 0.9470025031F, 0.9471594772F, 0.9473161384F, 0.9474724869F, 0.9476285229F, 0.9477842466F, 0.9479396584F, 0.9480947585F, 0.9482495470F, 0.9484040243F, 0.9485581906F, 0.9487120462F, 0.9488655913F, 0.9490188262F, 0.9491717511F, 0.9493243662F, 0.9494766718F, 0.9496286683F, 0.9497803557F, 0.9499317345F, 0.9500828047F, 0.9502335668F, 0.9503840209F, 0.9505341673F, 0.9506840062F, 0.9508335380F, 0.9509827629F, 0.9511316810F, 0.9512802928F, 0.9514285984F, 0.9515765982F, 0.9517242923F, 0.9518716810F, 0.9520187646F, 0.9521655434F, 0.9523120176F, 0.9524581875F, 0.9526040534F, 0.9527496154F, 0.9528948739F, 0.9530398292F, 0.9531844814F, 0.9533288310F, 0.9534728780F, 0.9536166229F, 0.9537600659F, 0.9539032071F, 0.9540460470F, 0.9541885858F, 0.9543308237F, 0.9544727611F, 0.9546143981F, 0.9547557351F, 0.9548967723F, 0.9550375100F, 0.9551779485F, 0.9553180881F, 0.9554579290F, 0.9555974714F, 0.9557367158F, 0.9558756623F, 0.9560143112F, 0.9561526628F, 0.9562907174F, 0.9564284752F, 0.9565659366F, 0.9567031017F, 0.9568399710F, 0.9569765446F, 0.9571128229F, 0.9572488061F, 0.9573844944F, 0.9575198883F, 0.9576549879F, 0.9577897936F, 0.9579243056F, 0.9580585242F, 0.9581924497F, 0.9583260824F, 0.9584594226F, 0.9585924705F, 0.9587252264F, 0.9588576906F, 0.9589898634F, 0.9591217452F, 0.9592533360F, 0.9593846364F, 0.9595156465F, 0.9596463666F, 0.9597767971F, 0.9599069382F, 0.9600367901F, 0.9601663533F, 0.9602956279F, 0.9604246143F, 0.9605533128F, 0.9606817236F, 0.9608098471F, 0.9609376835F, 0.9610652332F, 0.9611924963F, 0.9613194733F, 0.9614461644F, 0.9615725699F, 0.9616986901F, 0.9618245253F, 0.9619500757F, 0.9620753418F, 0.9622003238F, 0.9623250219F, 0.9624494365F, 0.9625735679F, 0.9626974163F, 0.9628209821F, 0.9629442656F, 0.9630672671F, 0.9631899868F, 0.9633124251F, 0.9634345822F, 0.9635564585F, 0.9636780543F, 0.9637993699F, 0.9639204056F, 0.9640411616F, 0.9641616383F, 0.9642818359F, 0.9644017549F, 0.9645213955F, 0.9646407579F, 0.9647598426F, 0.9648786497F, 0.9649971797F, 0.9651154328F, 0.9652334092F, 0.9653511095F, 0.9654685337F, 0.9655856823F, 0.9657025556F, 0.9658191538F, 0.9659354773F, 0.9660515263F, 0.9661673013F, 0.9662828024F, 0.9663980300F, 0.9665129845F, 0.9666276660F, 0.9667420750F, 0.9668562118F, 0.9669700766F, 0.9670836698F, 0.9671969917F, 0.9673100425F, 0.9674228227F, 0.9675353325F, 0.9676475722F, 0.9677595422F, 0.9678712428F, 0.9679826742F, 0.9680938368F, 0.9682047309F, 0.9683153569F, 0.9684257150F, 0.9685358056F, 0.9686456289F, 0.9687551853F, 0.9688644752F, 0.9689734987F, 0.9690822564F, 0.9691907483F, 0.9692989750F, 0.9694069367F, 0.9695146337F, 0.9696220663F, 0.9697292349F, 0.9698361398F, 0.9699427813F, 0.9700491597F, 0.9701552754F, 0.9702611286F, 0.9703667197F, 0.9704720490F, 0.9705771169F, 0.9706819236F, 0.9707864695F, 0.9708907549F, 0.9709947802F, 0.9710985456F, 0.9712020514F, 0.9713052981F, 0.9714082859F, 0.9715110151F, 0.9716134862F, 0.9717156993F, 0.9718176549F, 0.9719193532F, 0.9720207946F, 0.9721219794F, 0.9722229080F, 0.9723235806F, 0.9724239976F, 0.9725241593F, 0.9726240661F, 0.9727237183F, 0.9728231161F, 0.9729222601F, 0.9730211503F, 0.9731197873F, 0.9732181713F, 0.9733163027F, 0.9734141817F, 0.9735118088F, 0.9736091842F, 0.9737063083F, 0.9738031814F, 0.9738998039F, 0.9739961760F, 0.9740922981F, 0.9741881706F, 0.9742837938F, 0.9743791680F, 0.9744742935F, 0.9745691707F, 0.9746637999F, 0.9747581814F, 0.9748523157F, 0.9749462029F, 0.9750398435F, 0.9751332378F, 0.9752263861F, 0.9753192887F, 0.9754119461F, 0.9755043585F, 0.9755965262F, 0.9756884496F, 0.9757801291F, 0.9758715650F, 0.9759627575F, 0.9760537071F, 0.9761444141F, 0.9762348789F, 0.9763251016F, 0.9764150828F, 0.9765048228F, 0.9765943218F, 0.9766835802F, 0.9767725984F, 0.9768613767F, 0.9769499154F, 0.9770382149F, 0.9771262755F, 0.9772140976F, 0.9773016815F, 0.9773890275F, 0.9774761360F, 0.9775630073F, 0.9776496418F, 0.9777360398F, 0.9778222016F, 0.9779081277F, 0.9779938182F, 0.9780792736F, 0.9781644943F, 0.9782494805F, 0.9783342326F, 0.9784187509F, 0.9785030359F, 0.9785870877F, 0.9786709069F, 0.9787544936F, 0.9788378484F, 0.9789209714F, 0.9790038631F, 0.9790865238F, 0.9791689538F, 0.9792511535F, 0.9793331232F, 0.9794148633F, 0.9794963742F, 0.9795776561F, 0.9796587094F, 0.9797395345F, 0.9798201316F, 0.9799005013F, 0.9799806437F, 0.9800605593F, 0.9801402483F, 0.9802197112F, 0.9802989483F, 0.9803779600F, 0.9804567465F, 0.9805353082F, 0.9806136455F, 0.9806917587F, 0.9807696482F, 0.9808473143F, 0.9809247574F, 0.9810019778F, 0.9810789759F, 0.9811557519F, 0.9812323064F, 0.9813086395F, 0.9813847517F, 0.9814606433F, 0.9815363147F, 0.9816117662F, 0.9816869981F, 0.9817620108F, 0.9818368047F, 0.9819113801F, 0.9819857374F, 0.9820598769F, 0.9821337989F, 0.9822075038F, 0.9822809920F, 0.9823542638F, 0.9824273195F, 0.9825001596F, 0.9825727843F, 0.9826451940F, 0.9827173891F, 0.9827893700F, 0.9828611368F, 0.9829326901F, 0.9830040302F, 0.9830751574F, 0.9831460720F, 0.9832167745F, 0.9832872652F, 0.9833575444F, 0.9834276124F, 0.9834974697F, 0.9835671166F, 0.9836365535F, 0.9837057806F, 0.9837747983F, 0.9838436071F, 0.9839122072F, 0.9839805990F, 0.9840487829F, 0.9841167591F, 0.9841845282F, 0.9842520903F, 0.9843194459F, 0.9843865953F, 0.9844535389F, 0.9845202771F, 0.9845868101F, 0.9846531383F, 0.9847192622F, 0.9847851820F, 0.9848508980F, 0.9849164108F, 0.9849817205F, 0.9850468276F, 0.9851117324F, 0.9851764352F, 0.9852409365F, 0.9853052366F, 0.9853693358F, 0.9854332344F, 0.9854969330F, 0.9855604317F, 0.9856237309F, 0.9856868310F, 0.9857497325F, 0.9858124355F, 0.9858749404F, 0.9859372477F, 0.9859993577F, 0.9860612707F, 0.9861229871F, 0.9861845072F, 0.9862458315F, 0.9863069601F, 0.9863678936F, 0.9864286322F, 0.9864891764F, 0.9865495264F, 0.9866096826F, 0.9866696454F, 0.9867294152F, 0.9867889922F, 0.9868483769F, 0.9869075695F, 0.9869665706F, 0.9870253803F, 0.9870839991F, 0.9871424273F, 0.9872006653F, 0.9872587135F, 0.9873165721F, 0.9873742415F, 0.9874317222F, 0.9874890144F, 0.9875461185F, 0.9876030348F, 0.9876597638F, 0.9877163057F, 0.9877726610F, 0.9878288300F, 0.9878848130F, 0.9879406104F, 0.9879962225F, 0.9880516497F, 0.9881068924F, 0.9881619509F, 0.9882168256F, 0.9882715168F, 0.9883260249F, 0.9883803502F, 0.9884344931F, 0.9884884539F, 0.9885422331F, 0.9885958309F, 0.9886492477F, 0.9887024838F, 0.9887555397F, 0.9888084157F, 0.9888611120F, 0.9889136292F, 0.9889659675F, 0.9890181273F, 0.9890701089F, 0.9891219128F, 0.9891735392F, 0.9892249885F, 0.9892762610F, 0.9893273572F, 0.9893782774F, 0.9894290219F, 0.9894795911F, 0.9895299853F, 0.9895802049F, 0.9896302502F, 0.9896801217F, 0.9897298196F, 0.9897793443F, 0.9898286961F, 0.9898778755F, 0.9899268828F, 0.9899757183F, 0.9900243823F, 0.9900728753F, 0.9901211976F, 0.9901693495F, 0.9902173314F, 0.9902651436F, 0.9903127865F, 0.9903602605F, 0.9904075659F, 0.9904547031F, 0.9905016723F, 0.9905484740F, 0.9905951086F, 0.9906415763F, 0.9906878775F, 0.9907340126F, 0.9907799819F, 0.9908257858F, 0.9908714247F, 0.9909168988F, 0.9909622086F, 0.9910073543F, 0.9910523364F, 0.9910971552F, 0.9911418110F, 0.9911863042F, 0.9912306351F, 0.9912748042F, 0.9913188117F, 0.9913626580F, 0.9914063435F, 0.9914498684F, 0.9914932333F, 0.9915364383F, 0.9915794839F, 0.9916223703F, 0.9916650981F, 0.9917076674F, 0.9917500787F, 0.9917923323F, 0.9918344286F, 0.9918763679F, 0.9919181505F, 0.9919597769F, 0.9920012473F, 0.9920425621F, 0.9920837217F, 0.9921247263F, 0.9921655765F, 0.9922062724F, 0.9922468145F, 0.9922872030F, 0.9923274385F, 0.9923675211F, 0.9924074513F, 0.9924472294F, 0.9924868557F, 0.9925263306F, 0.9925656544F, 0.9926048275F, 0.9926438503F, 0.9926827230F, 0.9927214461F, 0.9927600199F, 0.9927984446F, 0.9928367208F, 0.9928748486F, 0.9929128285F, 0.9929506608F, 0.9929883459F, 0.9930258841F, 0.9930632757F, 0.9931005211F, 0.9931376207F, 0.9931745747F, 0.9932113836F, 0.9932480476F, 0.9932845671F, 0.9933209425F, 0.9933571742F, 0.9933932623F, 0.9934292074F, 0.9934650097F, 0.9935006696F, 0.9935361874F, 0.9935715635F, 0.9936067982F, 0.9936418919F, 0.9936768448F, 0.9937116574F, 0.9937463300F, 0.9937808629F, 0.9938152565F, 0.9938495111F, 0.9938836271F, 0.9939176047F, 0.9939514444F, 0.9939851465F, 0.9940187112F, 0.9940521391F, 0.9940854303F, 0.9941185853F, 0.9941516044F, 0.9941844879F, 0.9942172361F, 0.9942498495F, 0.9942823283F, 0.9943146729F, 0.9943468836F, 0.9943789608F, 0.9944109047F, 0.9944427158F, 0.9944743944F, 0.9945059408F, 0.9945373553F, 0.9945686384F, 0.9945997902F, 0.9946308112F, 0.9946617017F, 0.9946924621F, 0.9947230926F, 0.9947535937F, 0.9947839656F, 0.9948142086F, 0.9948443232F, 0.9948743097F, 0.9949041683F, 0.9949338995F, 0.9949635035F, 0.9949929807F, 0.9950223315F, 0.9950515561F, 0.9950806549F, 0.9951096282F, 0.9951384764F, 0.9951671998F, 0.9951957987F, 0.9952242735F, 0.9952526245F, 0.9952808520F, 0.9953089564F, 0.9953369380F, 0.9953647971F, 0.9953925340F, 0.9954201491F, 0.9954476428F, 0.9954750153F, 0.9955022670F, 0.9955293981F, 0.9955564092F, 0.9955833003F, 0.9956100720F, 0.9956367245F, 0.9956632582F, 0.9956896733F, 0.9957159703F, 0.9957421494F, 0.9957682110F, 0.9957941553F, 0.9958199828F, 0.9958456937F, 0.9958712884F, 0.9958967672F, 0.9959221305F, 0.9959473784F, 0.9959725115F, 0.9959975300F, 0.9960224342F, 0.9960472244F, 0.9960719011F, 0.9960964644F, 0.9961209148F, 0.9961452525F, 0.9961694779F, 0.9961935913F, 0.9962175930F, 0.9962414834F, 0.9962652627F, 0.9962889313F, 0.9963124895F, 0.9963359377F, 0.9963592761F, 0.9963825051F, 0.9964056250F, 0.9964286361F, 0.9964515387F, 0.9964743332F, 0.9964970198F, 0.9965195990F, 0.9965420709F, 0.9965644360F, 0.9965866946F, 0.9966088469F, 0.9966308932F, 0.9966528340F, 0.9966746695F, 0.9966964001F, 0.9967180260F, 0.9967395475F, 0.9967609651F, 0.9967822789F, 0.9968034894F, 0.9968245968F, 0.9968456014F, 0.9968665036F, 0.9968873037F, 0.9969080019F, 0.9969285987F, 0.9969490942F, 0.9969694889F, 0.9969897830F, 0.9970099769F, 0.9970300708F, 0.9970500651F, 0.9970699601F, 0.9970897561F, 0.9971094533F, 0.9971290522F, 0.9971485531F, 0.9971679561F, 0.9971872617F, 0.9972064702F, 0.9972255818F, 0.9972445968F, 0.9972635157F, 0.9972823386F, 0.9973010659F, 0.9973196980F, 0.9973382350F, 0.9973566773F, 0.9973750253F, 0.9973932791F, 0.9974114392F, 0.9974295059F, 0.9974474793F, 0.9974653599F, 0.9974831480F, 0.9975008438F, 0.9975184476F, 0.9975359598F, 0.9975533806F, 0.9975707104F, 0.9975879495F, 0.9976050981F, 0.9976221566F, 0.9976391252F, 0.9976560043F, 0.9976727941F, 0.9976894950F, 0.9977061073F, 0.9977226312F, 0.9977390671F, 0.9977554152F, 0.9977716759F, 0.9977878495F, 0.9978039361F, 0.9978199363F, 0.9978358501F, 0.9978516780F, 0.9978674202F, 0.9978830771F, 0.9978986488F, 0.9979141358F, 0.9979295383F, 0.9979448566F, 0.9979600909F, 0.9979752417F, 0.9979903091F, 0.9980052936F, 0.9980201952F, 0.9980350145F, 0.9980497515F, 0.9980644067F, 0.9980789804F, 0.9980934727F, 0.9981078841F, 0.9981222147F, 0.9981364649F, 0.9981506350F, 0.9981647253F, 0.9981787360F, 0.9981926674F, 0.9982065199F, 0.9982202936F, 0.9982339890F, 0.9982476062F, 0.9982611456F, 0.9982746074F, 0.9982879920F, 0.9983012996F, 0.9983145304F, 0.9983276849F, 0.9983407632F, 0.9983537657F, 0.9983666926F, 0.9983795442F, 0.9983923208F, 0.9984050226F, 0.9984176501F, 0.9984302033F, 0.9984426827F, 0.9984550884F, 0.9984674208F, 0.9984796802F, 0.9984918667F, 0.9985039808F, 0.9985160227F, 0.9985279926F, 0.9985398909F, 0.9985517177F, 0.9985634734F, 0.9985751583F, 0.9985867727F, 0.9985983167F, 0.9986097907F, 0.9986211949F, 0.9986325297F, 0.9986437953F, 0.9986549919F, 0.9986661199F, 0.9986771795F, 0.9986881710F, 0.9986990946F, 0.9987099507F, 0.9987207394F, 0.9987314611F, 0.9987421161F, 0.9987527045F, 0.9987632267F, 0.9987736829F, 0.9987840734F, 0.9987943985F, 0.9988046584F, 0.9988148534F, 0.9988249838F, 0.9988350498F, 0.9988450516F, 0.9988549897F, 0.9988648641F, 0.9988746753F, 0.9988844233F, 0.9988941086F, 0.9989037313F, 0.9989132918F, 0.9989227902F, 0.9989322269F, 0.9989416021F, 0.9989509160F, 0.9989601690F, 0.9989693613F, 0.9989784931F, 0.9989875647F, 0.9989965763F, 0.9990055283F, 0.9990144208F, 0.9990232541F, 0.9990320286F, 0.9990407443F, 0.9990494016F, 0.9990580008F, 0.9990665421F, 0.9990750257F, 0.9990834519F, 0.9990918209F, 0.9991001331F, 0.9991083886F, 0.9991165877F, 0.9991247307F, 0.9991328177F, 0.9991408491F, 0.9991488251F, 0.9991567460F, 0.9991646119F, 0.9991724232F, 0.9991801801F, 0.9991878828F, 0.9991955316F, 0.9992031267F, 0.9992106684F, 0.9992181569F, 0.9992255925F, 0.9992329753F, 0.9992403057F, 0.9992475839F, 0.9992548101F, 0.9992619846F, 0.9992691076F, 0.9992761793F, 0.9992832001F, 0.9992901701F, 0.9992970895F, 0.9993039587F, 0.9993107777F, 0.9993175470F, 0.9993242667F, 0.9993309371F, 0.9993375583F, 0.9993441307F, 0.9993506545F, 0.9993571298F, 0.9993635570F, 0.9993699362F, 0.9993762678F, 0.9993825519F, 0.9993887887F, 0.9993949785F, 0.9994011216F, 0.9994072181F, 0.9994132683F, 0.9994192725F, 0.9994252307F, 0.9994311434F, 0.9994370107F, 0.9994428327F, 0.9994486099F, 0.9994543423F, 0.9994600303F, 0.9994656739F, 0.9994712736F, 0.9994768294F, 0.9994823417F, 0.9994878105F, 0.9994932363F, 0.9994986191F, 0.9995039592F, 0.9995092568F, 0.9995145122F, 0.9995197256F, 0.9995248971F, 0.9995300270F, 0.9995351156F, 0.9995401630F, 0.9995451695F, 0.9995501352F, 0.9995550604F, 0.9995599454F, 0.9995647903F, 0.9995695953F, 0.9995743607F, 0.9995790866F, 0.9995837734F, 0.9995884211F, 0.9995930300F, 0.9995976004F, 0.9996021324F, 0.9996066263F, 0.9996110822F, 0.9996155004F, 0.9996198810F, 0.9996242244F, 0.9996285306F, 0.9996327999F, 0.9996370326F, 0.9996412287F, 0.9996453886F, 0.9996495125F, 0.9996536004F, 0.9996576527F, 0.9996616696F, 0.9996656512F, 0.9996695977F, 0.9996735094F, 0.9996773865F, 0.9996812291F, 0.9996850374F, 0.9996888118F, 0.9996925523F, 0.9996962591F, 0.9996999325F, 0.9997035727F, 0.9997071798F, 0.9997107541F, 0.9997142957F, 0.9997178049F, 0.9997212818F, 0.9997247266F, 0.9997281396F, 0.9997315209F, 0.9997348708F, 0.9997381893F, 0.9997414767F, 0.9997447333F, 0.9997479591F, 0.9997511544F, 0.9997543194F, 0.9997574542F, 0.9997605591F, 0.9997636342F, 0.9997666797F, 0.9997696958F, 0.9997726828F, 0.9997756407F, 0.9997785698F, 0.9997814703F, 0.9997843423F, 0.9997871860F, 0.9997900016F, 0.9997927894F, 0.9997955494F, 0.9997982818F, 0.9998009869F, 0.9998036648F, 0.9998063157F, 0.9998089398F, 0.9998115373F, 0.9998141082F, 0.9998166529F, 0.9998191715F, 0.9998216642F, 0.9998241311F, 0.9998265724F, 0.9998289884F, 0.9998313790F, 0.9998337447F, 0.9998360854F, 0.9998384015F, 0.9998406930F, 0.9998429602F, 0.9998452031F, 0.9998474221F, 0.9998496171F, 0.9998517885F, 0.9998539364F, 0.9998560610F, 0.9998581624F, 0.9998602407F, 0.9998622962F, 0.9998643291F, 0.9998663394F, 0.9998683274F, 0.9998702932F, 0.9998722370F, 0.9998741589F, 0.9998760591F, 0.9998779378F, 0.9998797952F, 0.9998816313F, 0.9998834464F, 0.9998852406F, 0.9998870141F, 0.9998887670F, 0.9998904995F, 0.9998922117F, 0.9998939039F, 0.9998955761F, 0.9998972285F, 0.9998988613F, 0.9999004746F, 0.9999020686F, 0.9999036434F, 0.9999051992F, 0.9999067362F, 0.9999082544F, 0.9999097541F, 0.9999112354F, 0.9999126984F, 0.9999141433F, 0.9999155703F, 0.9999169794F, 0.9999183709F, 0.9999197449F, 0.9999211014F, 0.9999224408F, 0.9999237631F, 0.9999250684F, 0.9999263570F, 0.9999276289F, 0.9999288843F, 0.9999301233F, 0.9999313461F, 0.9999325529F, 0.9999337437F, 0.9999349187F, 0.9999360780F, 0.9999372218F, 0.9999383503F, 0.9999394635F, 0.9999405616F, 0.9999416447F, 0.9999427129F, 0.9999437665F, 0.9999448055F, 0.9999458301F, 0.9999468404F, 0.9999478365F, 0.9999488185F, 0.9999497867F, 0.9999507411F, 0.9999516819F, 0.9999526091F, 0.9999535230F, 0.9999544236F, 0.9999553111F, 0.9999561856F, 0.9999570472F, 0.9999578960F, 0.9999587323F, 0.9999595560F, 0.9999603674F, 0.9999611666F, 0.9999619536F, 0.9999627286F, 0.9999634917F, 0.9999642431F, 0.9999649828F, 0.9999657110F, 0.9999664278F, 0.9999671334F, 0.9999678278F, 0.9999685111F, 0.9999691835F, 0.9999698451F, 0.9999704960F, 0.9999711364F, 0.9999717662F, 0.9999723858F, 0.9999729950F, 0.9999735942F, 0.9999741834F, 0.9999747626F, 0.9999753321F, 0.9999758919F, 0.9999764421F, 0.9999769828F, 0.9999775143F, 0.9999780364F, 0.9999785495F, 0.9999790535F, 0.9999795485F, 0.9999800348F, 0.9999805124F, 0.9999809813F, 0.9999814417F, 0.9999818938F, 0.9999823375F, 0.9999827731F, 0.9999832005F, 0.9999836200F, 0.9999840316F, 0.9999844353F, 0.9999848314F, 0.9999852199F, 0.9999856008F, 0.9999859744F, 0.9999863407F, 0.9999866997F, 0.9999870516F, 0.9999873965F, 0.9999877345F, 0.9999880656F, 0.9999883900F, 0.9999887078F, 0.9999890190F, 0.9999893237F, 0.9999896220F, 0.9999899140F, 0.9999901999F, 0.9999904796F, 0.9999907533F, 0.9999910211F, 0.9999912830F, 0.9999915391F, 0.9999917896F, 0.9999920345F, 0.9999922738F, 0.9999925077F, 0.9999927363F, 0.9999929596F, 0.9999931777F, 0.9999933907F, 0.9999935987F, 0.9999938018F, 0.9999940000F, 0.9999941934F, 0.9999943820F, 0.9999945661F, 0.9999947456F, 0.9999949206F, 0.9999950912F, 0.9999952575F, 0.9999954195F, 0.9999955773F, 0.9999957311F, 0.9999958807F, 0.9999960265F, 0.9999961683F, 0.9999963063F, 0.9999964405F, 0.9999965710F, 0.9999966979F, 0.9999968213F, 0.9999969412F, 0.9999970576F, 0.9999971707F, 0.9999972805F, 0.9999973871F, 0.9999974905F, 0.9999975909F, 0.9999976881F, 0.9999977824F, 0.9999978738F, 0.9999979624F, 0.9999980481F, 0.9999981311F, 0.9999982115F, 0.9999982892F, 0.9999983644F, 0.9999984370F, 0.9999985072F, 0.9999985750F, 0.9999986405F, 0.9999987037F, 0.9999987647F, 0.9999988235F, 0.9999988802F, 0.9999989348F, 0.9999989873F, 0.9999990379F, 0.9999990866F, 0.9999991334F, 0.9999991784F, 0.9999992217F, 0.9999992632F, 0.9999993030F, 0.9999993411F, 0.9999993777F, 0.9999994128F, 0.9999994463F, 0.9999994784F, 0.9999995091F, 0.9999995384F, 0.9999995663F, 0.9999995930F, 0.9999996184F, 0.9999996426F, 0.9999996657F, 0.9999996876F, 0.9999997084F, 0.9999997282F, 0.9999997469F, 0.9999997647F, 0.9999997815F, 0.9999997973F, 0.9999998123F, 0.9999998265F, 0.9999998398F, 0.9999998524F, 0.9999998642F, 0.9999998753F, 0.9999998857F, 0.9999998954F, 0.9999999045F, 0.9999999130F, 0.9999999209F, 0.9999999282F, 0.9999999351F, 0.9999999414F, 0.9999999472F, 0.9999999526F, 0.9999999576F, 0.9999999622F, 0.9999999664F, 0.9999999702F, 0.9999999737F, 0.9999999769F, 0.9999999798F, 0.9999999824F, 0.9999999847F, 0.9999999868F, 0.9999999887F, 0.9999999904F, 0.9999999919F, 0.9999999932F, 0.9999999943F, 0.9999999953F, 0.9999999961F, 0.9999999969F, 0.9999999975F, 0.9999999980F, 0.9999999985F, 0.9999999988F, 0.9999999991F, 0.9999999993F, 0.9999999995F, 0.9999999997F, 0.9999999998F, 0.9999999999F, 0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F, 1.0000000000F, 1.0000000000F, 1.0000000000F, 1.0000000000F, }; static float *vwin[8] = { vwin64, vwin128, vwin256, vwin512, vwin1024, vwin2048, vwin4096, vwin8192, }; float *_vorbis_window_get(int n){ return vwin[n]; } void _vorbis_apply_window(float *d,int *winno,long *blocksizes, int lW,int W,int nW){ lW=(W?lW:0); nW=(W?nW:0); { float *windowLW=vwin[winno[lW]]; float *windowNW=vwin[winno[nW]]; long n=blocksizes[W]; long ln=blocksizes[lW]; long rn=blocksizes[nW]; long leftbegin=n/4-ln/4; long leftend=leftbegin+ln/2; long rightbegin=n/2+n/4-rn/4; long rightend=rightbegin+rn/2; int i,p; for(i=0;i This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #include "qdevicechangeevent.h" //const QEvent::Type QDeviceChangeEvent::EventType = static_cast(QEvent::registerEventType()); QDeviceChangeEvent::QDeviceChangeEvent(Action action, const QString &device) : QEvent(registeredType()) { m_action = action; m_device = device; } ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicechangeevent.h ================================================ /****************************************************************************** QDeviceChangeEvent: Device change event Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #ifndef QDEVICECHANGEEVENT_H #define QDEVICECHANGEEVENT_H #include #include #include "qdevicewatcher_global.h" class Q_DLL_EXPORT QDeviceChangeEvent : public QEvent { Q_ENUMS(Action) public: enum Action { Add, Remove, Change}; //static const Type EventType; //VC link error explicit QDeviceChangeEvent(Action action, const QString& device); Action action() const {return m_action;} QString device() const {return m_device;} static Type registeredType() { static Type EventType = static_cast(registerEventType()); return EventType; } private: Action m_action; QString m_device; }; #endif // QDEVICECHANGEEVENT_H ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher.cpp ================================================ /****************************************************************************** QDeviceWatcher: Device watcher class Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #include "qdevicewatcher.h" #include "qdevicewatcher_p.h" QDeviceWatcher::QDeviceWatcher(QObject* parent) :QObject(parent),running(false),d_ptr(new QDeviceWatcherPrivate) { Q_D(QDeviceWatcher); d->setWatcher(this); } QDeviceWatcher::~QDeviceWatcher() { if (d_ptr) { delete d_ptr; d_ptr = NULL; } } bool QDeviceWatcher::start() { Q_D(QDeviceWatcher); if (!d->start()) { stop(); running = false; } running = true; return running; } bool QDeviceWatcher::stop() { Q_D(QDeviceWatcher); running = !d->stop(); return !running; } bool QDeviceWatcher::isRunning() const { return running; } void QDeviceWatcher::appendEventReceiver(QObject *receiver) { Q_D(QDeviceWatcher); d->event_receivers.append(receiver); } void QDeviceWatcherPrivate::emitDeviceAdded(const QString &dev) { if (!QMetaObject::invokeMethod(watcher, "deviceAdded", Q_ARG(QString, dev))) qWarning("invoke deviceAdded failed"); } void QDeviceWatcherPrivate::emitDeviceChanged(const QString &dev) { if (!QMetaObject::invokeMethod(watcher, "deviceChanged", Q_ARG(QString, dev))) qWarning("invoke deviceChanged failed"); } void QDeviceWatcherPrivate::emitDeviceRemoved(const QString &dev) { if (!QMetaObject::invokeMethod(watcher, "deviceRemoved", Q_ARG(QString, dev))) qWarning("invoke deviceRemoved failed"); } void QDeviceWatcherPrivate::emitDeviceAction(const QString &dev, const QString &action) { QString a(action.toLower()); if (a == QLatin1String("add")) emitDeviceAdded(dev); else if (a == QLatin1String("remove")) emitDeviceRemoved(dev); else if (a == QLatin1String("change")) emitDeviceChanged(dev); } ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher.h ================================================ /****************************************************************************** QDeviceWatcher: Device watcher class Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #ifndef QUSBWATCHER_H #define QUSBWATCHER_H #include #include "qdevicewatcher_global.h" class QDeviceWatcherPrivate; class Q_DLL_EXPORT QDeviceWatcher : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeviceWatcher) public: explicit QDeviceWatcher(QObject *parent = 0); ~QDeviceWatcher(); bool start(); bool stop(); bool isRunning() const; void appendEventReceiver(QObject* receiver); signals: void deviceAdded(const QString& dev); void deviceChanged(const QString& dev); //when umounting the device void deviceRemoved(const QString& dev); protected: bool running; QDeviceWatcherPrivate *d_ptr; }; #endif // QUSBWATCHER_H ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher_global.h ================================================ /****************************************************************************** qdevicewatcher_global.h: description Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #ifndef QDEVICEWATCHER_GLOBAL_H #define QDEVICEWATCHER_GLOBAL_H #if defined(Q_DLL_LIBRARY) # undef Q_DLL_EXPORT # define Q_DLL_EXPORT Q_DECL_EXPORT #else # undef Q_DLL_EXPORT # define Q_DLL_EXPORT //Q_DECL_IMPORT //only for vc? #endif #endif // QDEVICEWATCHER_GLOBAL_H ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher_linux.cpp ================================================ /****************************************************************************** QDeviceWatcherPrivate: watching depends on platform Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #include "qdevicewatcher_p.h" #ifdef Q_OS_LINUX #include #include #include #include #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) #else #endif #include #include #include #include #include #include #include #include #include #if CONFIG_SOCKETNOTIFIER #include #elif CONFIG_TCPSOCKET #include #endif #include "qdevicechangeevent.h" #define UEVENT_BUFFER_SIZE 2048 enum udev_monitor_netlink_group { UDEV_MONITOR_NONE, UDEV_MONITOR_KERNEL, UDEV_MONITOR_UDEV }; QDeviceWatcherPrivate::~QDeviceWatcherPrivate() { stop(); close(netlink_socket); netlink_socket = -1; } bool QDeviceWatcherPrivate::start() { if (!init()) return false; #if CONFIG_SOCKETNOTIFIER socket_notifier->setEnabled(true); #elif CONFIG_TCPSOCKET connect(tcp_socket, SIGNAL(readyRead()), SLOT(parseDeviceInfo())); #else this->QThread::start(); #endif return true; } bool QDeviceWatcherPrivate::stop() { if (netlink_socket!=-1) { #if CONFIG_SOCKETNOTIFIER socket_notifier->setEnabled(false); #elif CONFIG_TCPSOCKET //tcp_socket->close(); //how to restart? disconnect(this, SLOT(parseDeviceInfo())); #else this->quit(); #endif close(netlink_socket); netlink_socket = -1; } return true; } void QDeviceWatcherPrivate::parseDeviceInfo() {//zDebug("%s active", qPrintable(QTime::currentTime().toString())); QByteArray data; #if CONFIG_SOCKETNOTIFIER //socket_notifier->setEnabled(false); //for win data.resize(UEVENT_BUFFER_SIZE*2); data.fill(0); size_t len = read(socket_notifier->socket(), data.data(), UEVENT_BUFFER_SIZE*2); zDebug("read fro socket %d bytes", len); data.resize(len); //socket_notifier->setEnabled(true); //for win #elif CONFIG_TCPSOCKET data = tcp_socket->readAll(); #endif data = data.replace(0, '\n').trimmed(); //In the original line each information is seperated by 0 if (buffer.isOpen()) buffer.close(); buffer.setBuffer(&data); buffer.open(QIODevice::ReadOnly); while(!buffer.atEnd()) { //buffer.canReadLine() always false? parseLine(buffer.readLine().trimmed()); } buffer.close(); } #if CONFIG_THREAD //another thread void QDeviceWatcherPrivate::run() { QByteArray data; //loop only when event happens. because of recv() block the function? while (1) { //char buf[UEVENT_BUFFER_SIZE*2] = {0}; //recv(d->netlink_socket, &buf, sizeof(buf), 0); data.resize(UEVENT_BUFFER_SIZE*2); data.fill(0); size_t len = recv(netlink_socket, data.data(), data.size(), 0); zDebug("read fro socket %d bytes", len); data.resize(len); data = data.replace(0, '\n').trimmed(); if (buffer.isOpen()) buffer.close(); buffer.setBuffer(&data); buffer.open(QIODevice::ReadOnly); QByteArray line = buffer.readLine(); while(!line.isNull()) { parseLine(line.trimmed()); line = buffer.readLine(); } buffer.close(); } } #endif //CONFIG_THREAD /** * Create new udev monitor and connect to a specified event * source. Valid sources identifiers are "udev" and "kernel". * * Applications should usually not connect directly to the * "kernel" events, because the devices might not be useable * at that time, before udev has configured them, and created * device nodes. * * Accessing devices at the same time as udev, might result * in unpredictable behavior. * * The "udev" events are sent out after udev has finished its * event processing, all rules have been processed, and needed * device nodes are created. **/ bool QDeviceWatcherPrivate::init() { struct sockaddr_nl snl; const int buffersize = 16 * 1024 * 1024; int retval; memset(&snl, 0x00, sizeof(struct sockaddr_nl)); snl.nl_family = AF_NETLINK; snl.nl_pid = getpid(); snl.nl_groups = UDEV_MONITOR_KERNEL; netlink_socket = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); //netlink_socket = socket(PF_NETLINK, SOCK_DGRAM|SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT); //SOCK_CLOEXEC may be not available if (netlink_socket == -1) { qWarning("error getting socket: %s", strerror(errno)); return false; } /* set receive buffersize */ setsockopt(netlink_socket, SOL_SOCKET, SO_RCVBUFFORCE, &buffersize, sizeof(buffersize)); retval = bind(netlink_socket, (struct sockaddr*) &snl, sizeof(struct sockaddr_nl)); if (retval < 0) { qWarning("bind failed: %s", strerror(errno)); close(netlink_socket); netlink_socket = -1; return false; } else if (retval == 0) { //from libudev-monitor.c struct sockaddr_nl _snl; socklen_t _addrlen; /* * get the address the kernel has assigned us * it is usually, but not necessarily the pid */ _addrlen = sizeof(struct sockaddr_nl); retval = getsockname(netlink_socket, (struct sockaddr *)&_snl, &_addrlen); if (retval == 0) snl.nl_pid = _snl.nl_pid; } #if CONFIG_SOCKETNOTIFIER socket_notifier = new QSocketNotifier(netlink_socket, QSocketNotifier::Read, this); connect(socket_notifier, SIGNAL(activated(int)), SLOT(parseDeviceInfo())); //will always active socket_notifier->setEnabled(false); #elif CONFIG_TCPSOCKET //QAbstractSocket *socket = new QAbstractSocket(QAbstractSocket::UnknownSocketType, this); //will not detect "remove", why? tcp_socket = new QTcpSocket(this); //works too if (!tcp_socket->setSocketDescriptor(netlink_socket, QAbstractSocket::ConnectedState)) { qWarning("Failed to assign native socket to QAbstractSocket: %s", qPrintable(tcp_socket->errorString())); delete tcp_socket; return false; } #endif return true; } void QDeviceWatcherPrivate::parseLine(const QByteArray &line) { zDebug("%s", line.constData()); #define USE_REGEXP 0 #if USE_REGEXP QRegExp rx("(\\w+)(?:@/.*/block/.*/)(\\w+)\\W*"); //QRegExp rx("(add|remove|change)@/.*/block/.*/(\\w+)\\W*"); if (rx.indexIn(line) == -1) return; QString action_str = rx.cap(1).toLower(); QString dev = "/dev/" + rx.cap(2); #else if (!line.contains("/block/")) //hotplug return; QString action_str = line.left(line.indexOf('@')).toLower(); QString dev = "/dev/" + line.right(line.length() - line.lastIndexOf('/') - 1); #endif //USE_REGEXP QDeviceChangeEvent *event = 0; if (action_str==QLatin1String("add")) { emitDeviceAdded(dev); event = new QDeviceChangeEvent(QDeviceChangeEvent::Add, dev); } else if (action_str==QLatin1String("remove")) { emitDeviceRemoved(dev); event = new QDeviceChangeEvent(QDeviceChangeEvent::Remove, dev); } else if (action_str==QLatin1String("change")) { emitDeviceChanged(dev); event = new QDeviceChangeEvent(QDeviceChangeEvent::Change, dev); } zDebug("%s %s", qPrintable(action_str), qPrintable(dev)); if (event != 0 && !event_receivers.isEmpty()) { foreach(QObject* obj, event_receivers) { QCoreApplication::postEvent(obj, event, Qt::HighEventPriority); } } } #endif //Q_OS_LINUX ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher_p.h ================================================ /****************************************************************************** QDeviceWatcherPrivate: watching depends on platform Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #ifndef QDEVICEWATCHER_P_H #define QDEVICEWATCHER_P_H /*! Usually we use CONFIG_SOCKETNOTIFIER. CONFIG_TCPSOCKET and CONFIG_THREAD are test case */ #include #define CONFIG_SOCKETNOTIFIER 1 #define CONFIG_TCPSOCKET 0 //QtNetwork #if defined(Q_OS_WINCE) #define CONFIG_THREAD 1 #elif defined(Q_OS_LINUX) #define CONFIG_THREAD (!CONFIG_SOCKETNOTIFIER && !CONFIG_TCPSOCKET) #else #define CONFIG_THREAD 0 #endif //#define QT_NO_DEBUG_OUTPUT 0 #define CONFIG_DEBUG 1 #if CONFIG_DEBUG #define zDebug(fmt, ...) qDebug("%s: "#fmt, __FUNCTION__, ##__VA_ARGS__) #else #define zDebug(fmt, ...) #endif //CONFIG_DEBUG #ifdef Q_OS_WIN #include #else #include #endif //Q_OS_WIN #include #include class QDeviceWatcher; class QDeviceWatcherPrivate #if CONFIG_THREAD : public QThread #else : public QObject #endif //CONFIG_THREAD { Q_OBJECT public: QDeviceWatcherPrivate(QObject *parent = 0) : #if CONFIG_THREAD QThread(parent) #else QObject(parent) #endif //CONFIG_THREAD { //init(); } ~QDeviceWatcherPrivate(); void setWatcher(QDeviceWatcher *w) {watcher=w;} bool start(); bool stop(); //Do not use Qt::DirectConnection. this thread is not watcher's thread! void emitDeviceAdded(const QString& dev); void emitDeviceChanged(const QString& dev); //Linux: when umounting the device void emitDeviceRemoved(const QString& dev); void emitDeviceAction(const QString& dev, const QString& action); QList event_receivers; private slots: void parseDeviceInfo(); private: QDeviceWatcher *watcher; bool init(); #if CONFIG_THREAD virtual void run(); #endif //CONFIG_THREAD #if defined(Q_OS_LINUX) QBuffer buffer; void parseLine(const QByteArray& line); # if CONFIG_TCPSOCKET class QTcpSocket *tcp_socket; # elif CONFIG_SOCKETNOTIFIER class QSocketNotifier *socket_notifier; # endif QString bus_name; int netlink_socket; #elif defined(Q_OS_WIN32) HWND hwnd; #elif defined(Q_OS_WINCE) HANDLE mQueueHandle; HANDLE mNotificationHandle; #endif }; #endif // QDEVICEWATCHER_P_H ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher_win32.cpp ================================================ /****************************************************************************** QDeviceWatcherPrivate: watching depends on platform Copyright (C) 2011 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ #include "qdevicewatcher_p.h" //TODO: If wince works, use Q_OS_WIN #ifdef Q_OS_WIN32 #include #include #include "qdevicechangeevent.h" #undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #include #ifndef DBT_CUSTOMEVENT # define DBT_CUSTOMEVENT 0x8006 #endif #define CONFIG_NOTIFICATION 0 /* *http://www.codeproject.com/Articles/14500/Detecting-Hardware-Insertion-and-or-Removal *http://blog.csdn.net/sxbluebird/article/details/2445145 */ #if CONFIG_NOTIFICATION static HDEVNOTIFY hDevNotify = 0; #define HID_CLASSGUID {0x4d1e55b2, 0xf16f, 0x11cf,{ 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30}} static const GUID WceusbshGUID = { 0x25dbce51, 0x6c8f, 0x4a72, 0x8a,0x6d,0xb5,0x4c,0x2b,0x4f,0xc8,0x35 }; static const GUID GUID_DEVINTERFACE_USBSTOR = { 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } }; static const GUID InterfaceClassGuid = GUID_DEVINTERFACE_USBSTOR;//(GUID)HID_CLASSGUID; //GUID_DEVINTERFACE_USBSTOR #endif //CONFIG_NOTIFICATION Q_CORE_EXPORT HINSTANCE qWinAppInst(); static inline QStringList drivesFromMask(quint32 driveBits) //driveBits ->unitmask { QStringList ret; #if 1 //a disk with multiple partitions removed char driveName[] = "A:/"; driveBits &= 0x3ffffff; while (driveBits) { if (driveBits & 0x1) ret.append(QString::fromLatin1(driveName)); ++driveName[0]; driveBits >>= 1; } return ret; #else char i = 0; for (; i<26; ++i) { if (driveBits & 0x1) break; driveBits >>= 1; } QChar c(i + 'A'); return ret << QString(c) + ":"; #endif } void static UpdateDevice(PDEV_BROADCAST_DEVICEINTERFACE pDevInf, WPARAM wParam) { /* // dbcc_name: // \\?\USB#Vid_04e8&Pid_503b#0002F9A9828E0F06#{a5dcbf10-6530-11d2-901f-00c04fb951ed} // convert to // USB\Vid_04e8&Pid_503b\0002F9A9828E0F06 ASSERT(lstrlen(pDevInf->dbcc_name) > 4); wchar_t *szDevId = pDevInf->dbcc_name+4; int idx = szDevId.ReverseFind(_T('#')); ASSERT( -1 != idx ); szDevId.Truncate(idx); szDevId.Replace(_T('#'), _T('\\')); szDevId.MakeUpper(); CString szClass; idx = szDevId.Find(_T('\\')); ASSERT(-1 != idx ); szClass = szDevId.Left(idx); // if we are adding device, we only need present devices // otherwise, we need all devices DWORD dwFlag = DBT_DEVICEARRIVAL != wParam ? DIGCF_ALLCLASSES : (DIGCF_ALLCLASSES | DIGCF_PRESENT); HDEVINFO hDevInfo = SetupDiGetClassDevs(NULL, szClass, NULL, dwFlag); if( INVALID_HANDLE_VALUE == hDevInfo ) { zDebug("SetupDiGetClassDevs(): " + _com_error(GetLastError()).ErrorMessage()); return; } SP_DEVINFO_DATA* pspDevInfoData = (SP_DEVINFO_DATA*)HeapAlloc(GetProcessHeap(), 0, sizeof(SP_DEVINFO_DATA)); pspDevInfoData->cbSize = sizeof(SP_DEVINFO_DATA); for(int i=0; SetupDiEnumDeviceInfo(hDevInfo,i,pspDevInfoData); ++i) { DWORD DataT ; DWORD nSize=0 ; TCHAR buf[MAX_PATH]; if (!SetupDiGetDeviceInstanceId(hDevInfo, pspDevInfoData, buf, sizeof(buf), &nSize)) { zDebug("SetupDiGetDeviceInstanceId(): " + _com_error(GetLastError()).ErrorMessage()); break; } if (szDevId == buf) { // device found if (SetupDiGetDeviceRegistryProperty(hDevInfo, pspDevInfoData, SPDRP_FRIENDLYNAME, &DataT, (PBYTE)buf, sizeof(buf), &nSize)) { // do nothing } else if (SetupDiGetDeviceRegistryProperty(hDevInfo, pspDevInfoData, SPDRP_DEVICEDESC, &DataT, (PBYTE)buf, sizeof(buf), &nSize)) { // do nothing } else { lstrcpy(buf, _T("Unknown")); } // update UI break; } } if (pspDevInfoData) HeapFree(GetProcessHeap(), 0, pspDevInfoData); SetupDiDestroyDeviceInfoList(hDevInfo); */ } /* http://msdn.microsoft.com/en-us/library/windows/desktop/aa363246%28v=vs.85%29.aspx typedef struct _DEV_BROADCAST_HDR { DWORD dbch_size; DWORD dbch_devicetype; DWORD dbch_reserved; } DEV_BROADCAST_HDR, *PDEV_BROADCAST_HDR; dbch_size: The size of this structure, in bytes. If this is a user-defined event, this member must be the size of this header, plus the size of the variable-length data in the _DEV_BROADCAST_USERDEFINED structure. dbch_devicetype: The device type, which determines the event-specific information that follows the first three members. This member can be one of the following values. Value Meaning DBT_DEVTYP_DEVICEINTERFACE 0x00000005 Class of devices. This structure is a DEV_BROADCAST_DEVICEINTERFACE structure. DBT_DEVTYP_HANDLE 0x00000006 File system handle. This structure is a DEV_BROADCAST_HANDLE structure. DBT_DEVTYP_OEM 0x00000000 OEM- or IHV-defined device type. This structure is a DEV_BROADCAST_OEM structure. DBT_DEVTYP_PORT 0x00000003 Port device (serial or parallel). This structure is a DEV_BROADCAST_PORT structure. DBT_DEVTYP_VOLUME 0x00000002 Logical volume. This structure is a DEV_BROADCAST_VOLUME structure. dbch_reserved: Reserved; do not use. WM_DEVICECHANGE限制: 1 只有顶层窗体的程序才能收到这个消息 2 仅仅串口、磁盘发生改变,才对每个程序广播这个消息 */ LRESULT CALLBACK dw_internal_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { if (message == WM_DEVICECHANGE) { DEV_BROADCAST_HDR *lpdb = (DEV_BROADCAST_HDR *)lParam; zDebug("Device type address: %#x", lpdb); if (lpdb) { if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME) { zDebug("DBT_DEVTYP_VOLUME"); } else if (lpdb->dbch_devicetype == DBT_DEVTYP_PORT) { zDebug("DBT_DEVTYP_PORT"); } else if (lpdb->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { zDebug("DBT_DEVTYP_DEVICEINTERFACE"); } else if (lpdb->dbch_devicetype == DBT_DEVTYP_OEM) { zDebug("DBT_DEVTYP_OEM"); } else { zDebug("Unknow device type"); } } switch (wParam) { case DBT_DEVNODES_CHANGED: zDebug("DBT_DEVNODES_CHANGED message received, no extended info."); break; case DBT_QUERYCHANGECONFIG: zDebug("DBT_QUERYCHANGECONFIG message received, no extended info."); break; case DBT_CONFIGCHANGED: zDebug("DBT_CONFIGCHANGED message received, no extended info."); break; case DBT_CONFIGCHANGECANCELED: zDebug("DBT_CONFIGCHANGECANCELED message received, no extended info."); break; case DBT_DEVICEARRIVAL: case DBT_DEVICEQUERYREMOVE: case DBT_DEVICEQUERYREMOVEFAILED: case DBT_DEVICEREMOVEPENDING: case DBT_DEVICEREMOVECOMPLETE: if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME) { DEV_BROADCAST_VOLUME *db_volume = (DEV_BROADCAST_VOLUME *)lpdb; QStringList drives = drivesFromMask(db_volume->dbcv_unitmask); #ifdef GWLP_USERDATA QDeviceWatcherPrivate *watcher = (QDeviceWatcherPrivate *)GetWindowLongPtr(hwnd, GWLP_USERDATA); #else QDeviceWatcherPrivate *watcher = (QDeviceWatcherPrivate *)GetWindowLong(hwnd, GWL_USERDATA); #endif QList events; QString action_str("add"); QDeviceChangeEvent::Action action = QDeviceChangeEvent::Add; if (wParam == DBT_DEVICEARRIVAL) { } else if (wParam == DBT_DEVICEQUERYREMOVE) { } else if (wParam == DBT_DEVICEQUERYREMOVEFAILED) { } else if (wParam == DBT_DEVICEREMOVEPENDING) { } else if (wParam == DBT_DEVICEREMOVECOMPLETE) { action_str = "remove"; action = QDeviceChangeEvent::Remove; } foreach (const QString &drive, drives) { if (db_volume->dbcv_flags & DBTF_MEDIA) zDebug("Drive %c: Media has been removed.", drive.at(0).toAscii()); else if (db_volume->dbcv_flags & DBTF_NET) zDebug("Drive %c: Network share has been removed.", drive.at(0).toAscii()); else zDebug("Drive %c: Device has been removed.", drive.at(0).toAscii()); watcher->emitDeviceAction(drive, action_str); if (!watcher->event_receivers.isEmpty()) events.append(new QDeviceChangeEvent(action, drive)); } if (!events.isEmpty() && !watcher->event_receivers.isEmpty()) { foreach(QObject* obj, watcher->event_receivers) { foreach(QDeviceChangeEvent* event, events) { QCoreApplication::postEvent(obj, event, Qt::HighEventPriority); } } } } else if (lpdb->dbch_devicetype == DBT_DEVTYP_PORT) { zDebug("DBT_DEVTYP_PORT"); PDEV_BROADCAST_PORT pDevPort = (PDEV_BROADCAST_PORT)lpdb; } else if (lpdb->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { //RegisterDeviceNotification() zDebug("DBT_DEVTYP_DEVICEINTERFACE"); PDEV_BROADCAST_DEVICEINTERFACE pDevInf = (PDEV_BROADCAST_DEVICEINTERFACE)lpdb; UpdateDevice(pDevInf, wParam); } else if (lpdb->dbch_devicetype == DBT_DEVTYP_OEM) { zDebug("DBT_DEVTYP_OEM"); DEV_BROADCAST_OEM *pDevOem = (DEV_BROADCAST_OEM*)lpdb; } else if (lpdb->dbch_devicetype == DBT_DEVTYP_HANDLE) { zDebug("DBT_DEVTYP_HANDLE"); PDEV_BROADCAST_HANDLE pDevHnd = (PDEV_BROADCAST_HANDLE)lpdb; } break; case DBT_DEVICETYPESPECIFIC: zDebug("DBT_DEVICETYPESPECIFIC message received, may contain an extended info."); break; case DBT_CUSTOMEVENT: zDebug("DBT_CUSTOMEVENT message received, contains an extended info."); break; case DBT_USERDEFINED: zDebug("WM_DEVICECHANGE user defined message received, can not handle."); break; default: qWarning("WM_DEVICECHANGE message received, unhandled value %d.", wParam); break; } } return DefWindowProc(hwnd, message, wParam, lParam); } static inline QString className() { return QLatin1String("QDeviceWatcherPrivateWin32_Internal_Widget") + QString::number(quintptr(dw_internal_proc)); } static inline HWND dw_create_internal_window(const void* userData) { QString className = ::className(); HINSTANCE hi = qWinAppInst(); WNDCLASS wc; wc.style = 0; wc.lpfnWndProc = dw_internal_proc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hi; wc.hIcon = 0; wc.hCursor = 0; wc.hbrBackground = 0; wc.lpszMenuName = NULL; wc.lpszClassName = reinterpret_cast(className.utf16()); RegisterClass(&wc); HWND hwnd = CreateWindow(wc.lpszClassName, // classname wc.lpszClassName, // window name 0, // style 0, 0, 0, 0, // geometry 0, // parent 0, // menu handle hi, // application 0); // windows creation data. if (!hwnd) { qWarning("QDeviceWatcherPrivate: Failed to create internal window: %d", (int)GetLastError()); #if CONFIG_NOTIFICATION } else { DEV_BROADCAST_DEVICEINTERFACE NotificationFilter ; ZeroMemory(&NotificationFilter, sizeof(NotificationFilter)) ; NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE); NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; NotificationFilter.dbcc_classguid = InterfaceClassGuid; //3rd param with DEVICE_NOTIFY_ALL_INTERFACE_CLASSES and dbcc_classguid will be ignored //http://msdn.microsoft.com/en-us/library/windows/desktop/aa363431(v=vs.85).aspx hDevNotify = RegisterDeviceNotification(hwnd, &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE); if (!hDevNotify) { zDebug(""); } } #else } else if (userData) { #ifdef GWLP_USERDATA SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)userData); #else SetWindowLong(hwnd, GWL_USERDATA, (LONG)userData); #endif } #endif //CONFIG_NOTIFICATION return hwnd; } static inline void dw_destroy_internal_window(HWND hwnd) { if (hwnd) DestroyWindow(hwnd); #if CONFIG_NOTIFICATION UnregisterDeviceNotification(hDevNotify); #endif UnregisterClass(reinterpret_cast(className().utf16()), qWinAppInst()); } QDeviceWatcherPrivate::~QDeviceWatcherPrivate() { stop(); } bool QDeviceWatcherPrivate::start() { init(); hwnd = dw_create_internal_window(this); if (!hwnd) { dw_destroy_internal_window(hwnd); } return hwnd; } bool QDeviceWatcherPrivate::stop() { dw_destroy_internal_window(hwnd); return true; } bool QDeviceWatcherPrivate::init() { return true; } void QDeviceWatcherPrivate::parseDeviceInfo() { } #endif //Q_OS_WIN32 ================================================ FILE: 3rdParty/qdeviceWatcher/include/qdevicewatcher_wince.cpp ================================================ /****************************************************************************** qdevicewatcher_wince.cpp: for wince. TO BE TESTED Copyright (C) 2012 Wang Bin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ******************************************************************************/ /*! * http://msdn.microsoft.com/en-us/library/aa447466.aspx */ #include "qdevicewatcher_p.h" #ifdef Q_OS_WINCE #include #include #include //BLOCK_DRIVER_GUID #include #include "qdevicechangeevent.h" #ifdef UNICODE # if QT_VERSION >= 0x040000 # define TCHAR2QString(x) QString::fromUtf16(x) # else # define TCHAR2QString(x) QString::fromUcs2(x) # endif #else # define TCHAR2QString(x) QString::fromLocal8Bit((x)) #endif //UNICODE typedef union { DEVDETAIL d; char pad[sizeof(DEVDETAIL)+MAX_DEVCLASS_NAMELEN]; //BYTE pad[sizeof(DEVDETAIL) + (MAX_PATH * sizeof(TCHAR))]; } Q_DEVDETAIL; QDeviceWatcherPrivate::~QDeviceWatcherPrivate() { } bool QDeviceWatcherPrivate::start() { if (!init()) return false; this->QThread::start(); return true; } bool QDeviceWatcherPrivate::stop() { quit(); if (!StopDeviceNotifications(mNotificationHandle)) { qWarning("StopDeviceNotifications() error: %d", GetLastError()); return false; } if (!CloseMsgQueue(mQueueHandle)) { qWarning("CloseMsgQueue() error: %d", GetLastError()); return false; } return true; } bool QDeviceWatcherPrivate::init() { MSGQUEUEOPTIONS msgopts; msgopts.dwSize = sizeof(MSGQUEUEOPTIONS); msgopts.dwFlags = 0; //MSGQUEUE_VARIABLESIZE | MSGQUEUE_MSGSIZE; /*msdn*/ //MSGQUEUE_NOPRECOMMIT | MSGQUEUE_ALLOW_BROKEN msgopts.dwMaxMessages = 0; msgopts.cbMaxMessage = sizeof(Q_DEVDETAIL); msgopts.bReadAccess = TRUE; msgopts.dwMaxMessages = 0; //? //msgopts.cbMaxMsgQueue = 0; //? //msgopts.dwDesiredAccess = GENERIC_READ; //msgopts.dwShareMode = 0; //msgopts.dwCreationDisposition = CREATE_NEW; mQueueHandle = CreateMsgQueue(NULL, &msgopts); if (mQueueHandle == NULL) { qWarning("CreateMsgQueue() error: %d", GetLastError()); return false; } mNotificationHandle = RequestDeviceNotifications(&BLOCK_DRIVER_GUID, mQueueHandle, TRUE); if (mNotificationHandle == NULL) { qWarning("RequestDeviceNotifications() error: %d", GetLastError()); return false; } return true; } void QDeviceWatcherPrivate::run() { DWORD flags; DWORD size; Q_DEVDETAIL detail; SetLastError(0); //? while (true) { if(WaitForSingleObject(mQueueHandle, 3000) == WAIT_OBJECT_0) { while(ReadMsgQueue(mQueueHandle, &detail, sizeof(detail), &size, 1, &flags)) { QString dev = TCHAR2QString(detail.d.szName); QDeviceChangeEvent *event = 0; if (detail.d.fAttached) { emitDeviceAdded(dev); event = new QDeviceChangeEvent(QDeviceChangeEvent::Add, dev); } else { emitDeviceRemoved(dev); event = new QDeviceChangeEvent(QDeviceChangeEvent::Remove, dev); } if (event != 0 && !event_receivers.isEmpty()) { foreach(QObject* obj, event_receivers) { QCoreApplication::postEvent(obj, event, Qt::HighEventPriority); } } } } } } void QDeviceWatcherPrivate::parseDeviceInfo() { } #endif //Q_OS_WINCE ================================================ FILE: 3rdParty/qtsingleapplication/QtLockedFile ================================================ #include "qtlockedfile.h" ================================================ FILE: 3rdParty/qtsingleapplication/QtSingleApplication ================================================ #include "qtsingleapplication.h" ================================================ FILE: 3rdParty/qtsingleapplication/qtlocalpeer.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtlocalpeer.h" #include #include #if defined(Q_OS_WIN) #include #include typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*); static PProcessIdToSessionId pProcessIdToSessionId = 0; #endif #if defined(Q_OS_UNIX) #include #include #include #endif namespace QtLP_Private { #include "qtlockedfile.cpp" #if defined(Q_OS_WIN) #include "qtlockedfile_win.cpp" #else #include "qtlockedfile_unix.cpp" #endif } const char* QtLocalPeer::ack = "ack"; QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) : QObject(parent), id(appId) { QString prefix = id; if (id.isEmpty()) { id = QCoreApplication::applicationFilePath(); #if defined(Q_OS_WIN) id = id.toLower(); #endif prefix = id.section(QLatin1Char('/'), -1); } prefix.remove(QRegExp("[^a-zA-Z]")); prefix.truncate(6); QByteArray idc = id.toUtf8(); quint16 idNum = qChecksum(idc.constData(), idc.size()); socketName = QLatin1String("qtsingleapp-") + prefix + QLatin1Char('-') + QString::number(idNum, 16); #if defined(Q_OS_WIN) if (!pProcessIdToSessionId) { QLibrary lib("kernel32"); pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId"); } if (pProcessIdToSessionId) { DWORD sessionId = 0; pProcessIdToSessionId(GetCurrentProcessId(), &sessionId); socketName += QLatin1Char('-') + QString::number(sessionId, 16); } #else socketName += QLatin1Char('-') + QString::number(::getuid(), 16); #endif server = new QLocalServer(this); QString lockName = QDir(QDir::tempPath()).absolutePath() + QLatin1Char('/') + socketName + QLatin1String("-lockfile"); lockFile.setFileName(lockName); lockFile.open(QIODevice::ReadWrite); } bool QtLocalPeer::isClient() { if (lockFile.isLocked()) return false; if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) return true; bool res = server->listen(socketName); #if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) // ### Workaround if (!res && server->serverError() == QAbstractSocket::AddressInUseError) { QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName); res = server->listen(socketName); } #endif if (!res) qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString())); QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection())); return false; } bool QtLocalPeer::sendMessage(const QString &message, int timeout) { if (!isClient()) return false; QLocalSocket socket; bool connOk = false; for(int i = 0; i < 2; i++) { // Try twice, in case the other instance is just starting up socket.connectToServer(socketName); connOk = socket.waitForConnected(timeout/2); if (connOk || i) break; int ms = 250; #if defined(Q_OS_WIN) Sleep(DWORD(ms)); #else struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; nanosleep(&ts, NULL); #endif } if (!connOk) return false; QByteArray uMsg(message.toUtf8()); QDataStream ds(&socket); ds.writeBytes(uMsg.constData(), uMsg.size()); bool res = socket.waitForBytesWritten(timeout); if (res) { res &= socket.waitForReadyRead(timeout); // wait for ack if (res) res &= (socket.read(qstrlen(ack)) == ack); } return res; } void QtLocalPeer::receiveConnection() { QLocalSocket* socket = server->nextPendingConnection(); if (!socket) return; while (socket->bytesAvailable() < (int)sizeof(quint32)) socket->waitForReadyRead(); QDataStream ds(socket); QByteArray uMsg; quint32 remaining; ds >> remaining; uMsg.resize(remaining); int got = 0; char* uMsgBuf = uMsg.data(); do { got = ds.readRawData(uMsgBuf, remaining); remaining -= got; uMsgBuf += got; } while (remaining && got >= 0 && socket->waitForReadyRead(2000)); if (got < 0) { qWarning("QtLocalPeer: Message reception failed %s", socket->errorString().toLatin1().constData()); delete socket; return; } QString message(QString::fromUtf8(uMsg)); socket->write(ack, qstrlen(ack)); socket->waitForBytesWritten(1000); socket->waitForDisconnected(1000); // make sure client reads ack delete socket; emit messageReceived(message); //### (might take a long time to return) } ================================================ FILE: 3rdParty/qtsingleapplication/qtlocalpeer.h ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QTLOCALPEER_H #define QTLOCALPEER_H #include #include #include #include "qtlockedfile.h" class QtLocalPeer : public QObject { Q_OBJECT public: QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); bool isClient(); bool sendMessage(const QString &message, int timeout); QString applicationId() const { return id; } Q_SIGNALS: void messageReceived(const QString &message); protected Q_SLOTS: void receiveConnection(); protected: QString id; QString socketName; QLocalServer* server; QtLP_Private::QtLockedFile lockFile; private: static const char* ack; }; #endif // QTLOCALPEER_H ================================================ FILE: 3rdParty/qtsingleapplication/qtlockedfile.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtlockedfile.h" /*! \class QtLockedFile \brief The QtLockedFile class extends QFile with advisory locking functions. A file may be locked in read or write mode. Multiple instances of \e QtLockedFile, created in multiple processes running on the same machine, may have a file locked in read mode. Exactly one instance may have it locked in write mode. A read and a write lock cannot exist simultaneously on the same file. The file locks are advisory. This means that nothing prevents another process from manipulating a locked file using QFile or file system functions offered by the OS. Serialization is only guaranteed if all processes that access the file use QLockedFile. Also, while holding a lock on a file, a process must not open the same file again (through any API), or locks can be unexpectedly lost. The lock provided by an instance of \e QtLockedFile is released whenever the program terminates. This is true even when the program crashes and no destructors are called. */ /*! \enum QtLockedFile::LockMode This enum describes the available lock modes. \value ReadLock A read lock. \value WriteLock A write lock. \value NoLock Neither a read lock nor a write lock. */ /*! Constructs an unlocked \e QtLockedFile object. This constructor behaves in the same way as \e QFile::QFile(). \sa QFile::QFile() */ QtLockedFile::QtLockedFile() : QFile() { #ifdef Q_OS_WIN wmutex = 0; rmutex = 0; #endif m_lock_mode = NoLock; } /*! Constructs an unlocked QtLockedFile object with file \a name. This constructor behaves in the same way as \e QFile::QFile(const QString&). \sa QFile::QFile() */ QtLockedFile::QtLockedFile(const QString &name) : QFile(name) { #ifdef Q_OS_WIN wmutex = 0; rmutex = 0; #endif m_lock_mode = NoLock; } /*! Opens the file in OpenMode \a mode. This is identical to QFile::open(), with the one exception that the Truncate mode flag is disallowed. Truncation would conflict with the advisory file locking, since the file would be modified before the write lock is obtained. If truncation is required, use resize(0) after obtaining the write lock. Returns true if successful; otherwise false. \sa QFile::open(), QFile::resize() */ bool QtLockedFile::open(OpenMode mode) { if (mode & QIODevice::Truncate) { qWarning("QtLockedFile::open(): Truncate mode not allowed."); return false; } return QFile::open(mode); } /*! Returns \e true if this object has a in read or write lock; otherwise returns \e false. \sa lockMode() */ bool QtLockedFile::isLocked() const { return m_lock_mode != NoLock; } /*! Returns the type of lock currently held by this object, or \e QtLockedFile::NoLock. \sa isLocked() */ QtLockedFile::LockMode QtLockedFile::lockMode() const { return m_lock_mode; } /*! \fn bool QtLockedFile::lock(LockMode mode, bool block = true) Obtains a lock of type \a mode. The file must be opened before it can be locked. If \a block is true, this function will block until the lock is aquired. If \a block is false, this function returns \e false immediately if the lock cannot be aquired. If this object already has a lock of type \a mode, this function returns \e true immediately. If this object has a lock of a different type than \a mode, the lock is first released and then a new lock is obtained. This function returns \e true if, after it executes, the file is locked by this object, and \e false otherwise. \sa unlock(), isLocked(), lockMode() */ /*! \fn bool QtLockedFile::unlock() Releases a lock. If the object has no lock, this function returns immediately. This function returns \e true if, after it executes, the file is not locked by this object, and \e false otherwise. \sa lock(), isLocked(), lockMode() */ /*! \fn QtLockedFile::~QtLockedFile() Destroys the \e QtLockedFile object. If any locks were held, they are released. */ ================================================ FILE: 3rdParty/qtsingleapplication/qtlockedfile.h ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QTLOCKEDFILE_H #define QTLOCKEDFILE_H #include #ifdef Q_OS_WIN #include #endif #if defined(Q_OS_WIN) # if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) # define QT_QTLOCKEDFILE_EXPORT # elif defined(QT_QTLOCKEDFILE_IMPORT) # if defined(QT_QTLOCKEDFILE_EXPORT) # undef QT_QTLOCKEDFILE_EXPORT # endif # define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport) # elif defined(QT_QTLOCKEDFILE_EXPORT) # undef QT_QTLOCKEDFILE_EXPORT # define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport) # endif #else # define QT_QTLOCKEDFILE_EXPORT #endif namespace QtLP_Private { class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile { public: enum LockMode { NoLock = 0, ReadLock, WriteLock }; QtLockedFile(); QtLockedFile(const QString &name); ~QtLockedFile(); bool open(OpenMode mode); bool lock(LockMode mode, bool block = true); bool unlock(); bool isLocked() const; LockMode lockMode() const; private: #ifdef Q_OS_WIN Qt::HANDLE wmutex; Qt::HANDLE rmutex; QVector rmutexes; QString mutexname; Qt::HANDLE getMutexHandle(int idx, bool doCreate); bool waitMutex(Qt::HANDLE mutex, bool doBlock); #endif LockMode m_lock_mode; }; } #endif ================================================ FILE: 3rdParty/qtsingleapplication/qtlockedfile_unix.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include #include #include #include #include "qtlockedfile.h" bool QtLockedFile::lock(LockMode mode, bool block) { if (!isOpen()) { qWarning("QtLockedFile::lock(): file is not opened"); return false; } if (mode == NoLock) return unlock(); if (mode == m_lock_mode) return true; if (m_lock_mode != NoLock) unlock(); struct flock fl; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK; int cmd = block ? F_SETLKW : F_SETLK; int ret = fcntl(handle(), cmd, &fl); if (ret == -1) { if (errno != EINTR && errno != EAGAIN) qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } m_lock_mode = mode; return true; } bool QtLockedFile::unlock() { if (!isOpen()) { qWarning("QtLockedFile::unlock(): file is not opened"); return false; } if (!isLocked()) return true; struct flock fl; fl.l_whence = SEEK_SET; fl.l_start = 0; fl.l_len = 0; fl.l_type = F_UNLCK; int ret = fcntl(handle(), F_SETLKW, &fl); if (ret == -1) { qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno)); return false; } m_lock_mode = NoLock; return true; } QtLockedFile::~QtLockedFile() { if (isOpen()) unlock(); } ================================================ FILE: 3rdParty/qtsingleapplication/qtlockedfile_win.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtlockedfile.h" #include #include #define MUTEX_PREFIX "QtLockedFile mutex " // Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS #define MAX_READERS MAXIMUM_WAIT_OBJECTS #if QT_VERSION >= 0x050000 #define QT_WA(unicode, ansi) unicode #endif Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate) { if (mutexname.isEmpty()) { QFileInfo fi(*this); mutexname = QString::fromLatin1(MUTEX_PREFIX) + fi.absoluteFilePath().toLower(); } QString mname(mutexname); if (idx >= 0) mname += QString::number(idx); Qt::HANDLE mutex; if (doCreate) { QT_WA( { mutex = CreateMutexW(NULL, FALSE, (LPCWSTR)mname.utf16()); }, { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } ); if (!mutex) { qErrnoWarning("QtLockedFile::lock(): CreateMutex failed"); return 0; } } else { QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16()); }, { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } ); if (!mutex) { if (GetLastError() != ERROR_FILE_NOT_FOUND) qErrnoWarning("QtLockedFile::lock(): OpenMutex failed"); return 0; } } return mutex; } bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock) { Q_ASSERT(mutex); DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0); switch (res) { case WAIT_OBJECT_0: case WAIT_ABANDONED: return true; break; case WAIT_TIMEOUT: break; default: qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed"); } return false; } bool QtLockedFile::lock(LockMode mode, bool block) { if (!isOpen()) { qWarning("QtLockedFile::lock(): file is not opened"); return false; } if (mode == NoLock) return unlock(); if (mode == m_lock_mode) return true; if (m_lock_mode != NoLock) unlock(); if (!wmutex && !(wmutex = getMutexHandle(-1, true))) return false; if (!waitMutex(wmutex, block)) return false; if (mode == ReadLock) { int idx = 0; for (; idx < MAX_READERS; idx++) { rmutex = getMutexHandle(idx, false); if (!rmutex || waitMutex(rmutex, false)) break; CloseHandle(rmutex); } bool ok = true; if (idx >= MAX_READERS) { qWarning("QtLockedFile::lock(): too many readers"); rmutex = 0; ok = false; } else if (!rmutex) { rmutex = getMutexHandle(idx, true); if (!rmutex || !waitMutex(rmutex, false)) ok = false; } if (!ok && rmutex) { CloseHandle(rmutex); rmutex = 0; } ReleaseMutex(wmutex); if (!ok) return false; } else { Q_ASSERT(rmutexes.isEmpty()); for (int i = 0; i < MAX_READERS; i++) { Qt::HANDLE mutex = getMutexHandle(i, false); if (mutex) rmutexes.append(mutex); } if (rmutexes.size()) { DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(), TRUE, block ? INFINITE : 0); if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) { if (res != WAIT_TIMEOUT) qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed"); m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky unlock(); return false; } } } m_lock_mode = mode; return true; } bool QtLockedFile::unlock() { if (!isOpen()) { qWarning("QtLockedFile::unlock(): file is not opened"); return false; } if (!isLocked()) return true; if (m_lock_mode == ReadLock) { ReleaseMutex(rmutex); CloseHandle(rmutex); rmutex = 0; } else { foreach(Qt::HANDLE mutex, rmutexes) { ReleaseMutex(mutex); CloseHandle(mutex); } rmutexes.clear(); ReleaseMutex(wmutex); } m_lock_mode = QtLockedFile::NoLock; return true; } QtLockedFile::~QtLockedFile() { if (isOpen()) unlock(); if (wmutex) CloseHandle(wmutex); } ================================================ FILE: 3rdParty/qtsingleapplication/qtsingleapplication.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtsingleapplication.h" #include "qtlocalpeer.h" #include /*! \class QtSingleApplication qtsingleapplication.h \brief The QtSingleApplication class provides an API to detect and communicate with running instances of an application. This class allows you to create applications where only one instance should be running at a time. I.e., if the user tries to launch another instance, the already running instance will be activated instead. Another usecase is a client-server system, where the first started instance will assume the role of server, and the later instances will act as clients of that server. By default, the full path of the executable file is used to determine whether two processes are instances of the same application. You can also provide an explicit identifier string that will be compared instead. The application should create the QtSingleApplication object early in the startup phase, and call isRunning() to find out if another instance of this application is already running. If isRunning() returns false, it means that no other instance is running, and this instance has assumed the role as the running instance. In this case, the application should continue with the initialization of the application user interface before entering the event loop with exec(), as normal. The messageReceived() signal will be emitted when the running application receives messages from another instance of the same application. When a message is received it might be helpful to the user to raise the application so that it becomes visible. To facilitate this, QtSingleApplication provides the setActivationWindow() function and the activateWindow() slot. If isRunning() returns true, another instance is already running. It may be alerted to the fact that another instance has started by using the sendMessage() function. Also data such as startup parameters (e.g. the name of the file the user wanted this new instance to open) can be passed to the running instance with this function. Then, the application should terminate (or enter client mode). If isRunning() returns true, but sendMessage() fails, that is an indication that the running instance is frozen. Here's an example that shows how to convert an existing application to use QtSingleApplication. It is very simple and does not make use of all QtSingleApplication's functionality (see the examples for that). \code // Original int main(int argc, char **argv) { QApplication app(argc, argv); MyMainWidget mmw; mmw.show(); return app.exec(); } // Single instance int main(int argc, char **argv) { QtSingleApplication app(argc, argv); if (app.isRunning()) return !app.sendMessage(someDataString); MyMainWidget mmw; app.setActivationWindow(&mmw); mmw.show(); return app.exec(); } \endcode Once this QtSingleApplication instance is destroyed (normally when the process exits or crashes), when the user next attempts to run the application this instance will not, of course, be encountered. The next instance to call isRunning() or sendMessage() will assume the role as the new running instance. For console (non-GUI) applications, QtSingleCoreApplication may be used instead of this class, to avoid the dependency on the QtGui library. \sa QtSingleCoreApplication */ void QtSingleApplication::sysInit(const QString &appId) { actWin = 0; peer = new QtLocalPeer(this, appId); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a argv, and \a GUIenabled are passed on to the QAppliation constructor. If you are creating a console application (i.e. setting \a GUIenabled to false), you may consider using QtSingleCoreApplication instead. */ QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled) : QApplication(argc, argv, GUIenabled) { sysInit(); } /*! Creates a QtSingleApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the QAppliation constructor. */ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv) : QApplication(argc, argv) { sysInit(appId); } #if QT_VERSION < 0x050000 /*! Creates a QtSingleApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc, \a argv, and \a type are passed on to the QAppliation constructor. */ QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type) : QApplication(argc, argv, type) { sysInit(); } # if defined(Q_WS_X11) /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). \a dpy, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, visual, cmap) { sysInit(); } /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a argv, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, argc, argv, visual, cmap) { sysInit(); } /*! Special constructor for X11, ref. the documentation of QApplication's corresponding constructor. The application identifier will be \a appId. \a dpy, \a argc, \a argv, \a visual, and \a cmap are passed on to the QApplication constructor. */ QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap) : QApplication(dpy, argc, argv, visual, cmap) { sysInit(appId); } # endif // Q_WS_X11 #endif // QT_VERSION < 0x050000 /*! Returns true if another instance of this application is running; otherwise false. This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session). \sa sendMessage() */ bool QtSingleApplication::isRunning() { return peer->isClient(); } /*! Tries to send the text \a message to the currently running instance. The QtSingleApplication object in the running instance will emit the messageReceived() signal when it receives the message. This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within \a timeout milliseconds, this function return false. \sa isRunning(), messageReceived() */ bool QtSingleApplication::sendMessage(const QString &message, int timeout) { return peer->sendMessage(message, timeout); } /*! Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application. */ QString QtSingleApplication::id() const { return peer->applicationId(); } /*! Sets the activation window of this application to \a aw. The activation window is the widget that will be activated by activateWindow(). This is typically the application's main window. If \a activateOnMessage is true (the default), the window will be activated automatically every time a message is received, just prior to the messageReceived() signal being emitted. \sa activateWindow(), messageReceived() */ void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage) { actWin = aw; if (activateOnMessage) connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); else disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow())); } /*! Returns the applications activation window if one has been set by calling setActivationWindow(), otherwise returns 0. \sa setActivationWindow() */ QWidget* QtSingleApplication::activationWindow() const { return actWin; } /*! De-minimizes, raises, and activates this application's activation window. This function does nothing if no activation window has been set. This is a convenience function to show the user that this application instance has been activated when he has tried to start another instance. This function should typically be called in response to the messageReceived() signal. By default, that will happen automatically, if an activation window has been set. \sa setActivationWindow(), messageReceived(), initialize() */ void QtSingleApplication::activateWindow() { if (actWin) { actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized); actWin->raise(); actWin->activateWindow(); } } /*! \fn void QtSingleApplication::messageReceived(const QString& message) This signal is emitted when the current instance receives a \a message from another instance of this application. \sa sendMessage(), setActivationWindow(), activateWindow() */ /*! \fn void QtSingleApplication::initialize(bool dummy = true) \obsolete */ ================================================ FILE: 3rdParty/qtsingleapplication/qtsingleapplication.h ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QTSINGLEAPPLICATION_H #define QTSINGLEAPPLICATION_H #include class QtLocalPeer; #if defined(Q_OS_WIN) # if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT) # define QT_QTSINGLEAPPLICATION_EXPORT # elif defined(QT_QTSINGLEAPPLICATION_IMPORT) # if defined(QT_QTSINGLEAPPLICATION_EXPORT) # undef QT_QTSINGLEAPPLICATION_EXPORT # endif # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport) # elif defined(QT_QTSINGLEAPPLICATION_EXPORT) # undef QT_QTSINGLEAPPLICATION_EXPORT # define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport) # endif #else # define QT_QTSINGLEAPPLICATION_EXPORT #endif class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication { Q_OBJECT public: QtSingleApplication(int &argc, char **argv, bool GUIenabled = true); QtSingleApplication(const QString &id, int &argc, char **argv); #if QT_VERSION < 0x050000 QtSingleApplication(int &argc, char **argv, Type type); # if defined(Q_WS_X11) QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0); QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0); # endif // Q_WS_X11 #endif // QT_VERSION < 0x050000 bool isRunning(); QString id() const; void setActivationWindow(QWidget* aw, bool activateOnMessage = true); QWidget* activationWindow() const; // Obsolete: void initialize(bool dummy = true) { isRunning(); Q_UNUSED(dummy) } public Q_SLOTS: bool sendMessage(const QString &message, int timeout = 5000); void activateWindow(); Q_SIGNALS: void messageReceived(const QString &message); private: void sysInit(const QString &appId = QString()); QtLocalPeer *peer; QWidget *actWin; }; #endif // QTSINGLEAPPLICATION_H ================================================ FILE: 3rdParty/qtsingleapplication/qtsingleapplication.pri ================================================ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD QT *= network greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets qtsingleapplication-uselib:!qtsingleapplication-buildlib { LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME } else { SOURCES += $$PWD/qtsingleapplication.cpp $$PWD/qtlocalpeer.cpp HEADERS += $$PWD/qtsingleapplication.h $$PWD/qtlocalpeer.h } win32 { contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTSINGLEAPPLICATION_EXPORT else:qtsingleapplication-uselib:DEFINES += QT_QTSINGLEAPPLICATION_IMPORT } ================================================ FILE: 3rdParty/qtsingleapplication/qtsinglecoreapplication.cpp ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtsinglecoreapplication.h" #include "qtlocalpeer.h" /*! \class QtSingleCoreApplication qtsinglecoreapplication.h \brief A variant of the QtSingleApplication class for non-GUI applications. This class is a variant of QtSingleApplication suited for use in console (non-GUI) applications. It is an extension of QCoreApplication (instead of QApplication). It does not require the QtGui library. The API and usage is identical to QtSingleApplication, except that functions relating to the "activation window" are not present, for obvious reasons. Please refer to the QtSingleApplication documentation for explanation of the usage. A QtSingleCoreApplication instance can communicate to a QtSingleApplication instance if they share the same application id. Hence, this class can be used to create a light-weight command-line tool that sends commands to a GUI application. \sa QtSingleApplication */ /*! Creates a QtSingleCoreApplication object. The application identifier will be QCoreApplication::applicationFilePath(). \a argc and \a argv are passed on to the QCoreAppliation constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) : QCoreApplication(argc, argv) { peer = new QtLocalPeer(this); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Creates a QtSingleCoreApplication object with the application identifier \a appId. \a argc and \a argv are passed on to the QCoreAppliation constructor. */ QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) : QCoreApplication(argc, argv) { peer = new QtLocalPeer(this, appId); connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&))); } /*! Returns true if another instance of this application is running; otherwise false. This function does not find instances of this application that are being run by a different user (on Windows: that are running in another session). \sa sendMessage() */ bool QtSingleCoreApplication::isRunning() { return peer->isClient(); } /*! Tries to send the text \a message to the currently running instance. The QtSingleCoreApplication object in the running instance will emit the messageReceived() signal when it receives the message. This function returns true if the message has been sent to, and processed by, the current instance. If there is no instance currently running, or if the running instance fails to process the message within \a timeout milliseconds, this function return false. \sa isRunning(), messageReceived() */ bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) { return peer->sendMessage(message, timeout); } /*! Returns the application identifier. Two processes with the same identifier will be regarded as instances of the same application. */ QString QtSingleCoreApplication::id() const { return peer->applicationId(); } /*! \fn void QtSingleCoreApplication::messageReceived(const QString& message) This signal is emitted when the current instance receives a \a message from another instance of this application. \sa sendMessage() */ ================================================ FILE: 3rdParty/qtsingleapplication/qtsinglecoreapplication.h ================================================ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Solutions component. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QTSINGLECOREAPPLICATION_H #define QTSINGLECOREAPPLICATION_H #include class QtLocalPeer; class QtSingleCoreApplication : public QCoreApplication { Q_OBJECT public: QtSingleCoreApplication(int &argc, char **argv); QtSingleCoreApplication(const QString &id, int &argc, char **argv); bool isRunning(); QString id() const; public Q_SLOTS: bool sendMessage(const QString &message, int timeout = 5000); Q_SIGNALS: void messageReceived(const QString &message); private: QtLocalPeer* peer; }; #endif // QTSINGLECOREAPPLICATION_H ================================================ FILE: 3rdParty/qtsingleapplication/qtsinglecoreapplication.pri ================================================ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp QT *= network win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) } ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobal.h ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtCore module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #ifndef QXTGLOBAL_H #define QXTGLOBAL_H #include #define QXT_VERSION 0x000600 #define QXT_VERSION_STR "0.6.0" //--------------------------global macros------------------------------ #ifndef QXT_NO_MACROS #endif // QXT_NO_MACROS //--------------------------export macros------------------------------ #define QXT_DLLEXPORT DO_NOT_USE_THIS_ANYMORE #if !defined(QXT_STATIC) # if defined(BUILD_QXT_CORE) # define QXT_CORE_EXPORT Q_DECL_EXPORT # else # define QXT_CORE_EXPORT Q_DECL_IMPORT # endif #else # define QXT_CORE_EXPORT #endif // BUILD_QXT_CORE #if !defined(QXT_STATIC) # if defined(BUILD_QXT_GUI) # define QXT_GUI_EXPORT Q_DECL_EXPORT # else # define QXT_GUI_EXPORT Q_DECL_IMPORT # endif #else # define QXT_GUI_EXPORT #endif // BUILD_QXT_GUI #if !defined(QXT_STATIC) # if defined(BUILD_QXT_NETWORK) # define QXT_NETWORK_EXPORT Q_DECL_EXPORT # else # define QXT_NETWORK_EXPORT Q_DECL_IMPORT # endif #else # define QXT_NETWORK_EXPORT #endif // BUILD_QXT_NETWORK #if !defined(QXT_STATIC) # if defined(BUILD_QXT_SQL) # define QXT_SQL_EXPORT Q_DECL_EXPORT # else # define QXT_SQL_EXPORT Q_DECL_IMPORT # endif #else # define QXT_SQL_EXPORT #endif // BUILD_QXT_SQL #if !defined(QXT_STATIC) # if defined(BUILD_QXT_WEB) # define QXT_WEB_EXPORT Q_DECL_EXPORT # else # define QXT_WEB_EXPORT Q_DECL_IMPORT # endif #else # define QXT_WEB_EXPORT #endif // BUILD_QXT_WEB #if !defined(QXT_STATIC) # if defined(BUILD_QXT_BERKELEY) # define QXT_BERKELEY_EXPORT Q_DECL_EXPORT # else # define QXT_BERKELEY_EXPORT Q_DECL_IMPORT # endif #else # define QXT_BERKELEY_EXPORT #endif // BUILD_QXT_BERKELEY #if !defined(QXT_STATIC) # if defined(BUILD_QXT_ZEROCONF) # define QXT_ZEROCONF_EXPORT Q_DECL_EXPORT # else # define QXT_ZEROCONF_EXPORT Q_DECL_IMPORT # endif #else # define QXT_ZEROCONF_EXPORT #endif // QXT_ZEROCONF_EXPORT #if defined BUILD_QXT_CORE || defined BUILD_QXT_GUI || defined BUILD_QXT_SQL || defined BUILD_QXT_NETWORK || defined BUILD_QXT_WEB || defined BUILD_QXT_BERKELEY || defined BUILD_QXT_ZEROCONF # define BUILD_QXT #endif QXT_CORE_EXPORT const char* qxtVersion(); #ifndef QT_BEGIN_NAMESPACE #define QT_BEGIN_NAMESPACE #endif #ifndef QT_END_NAMESPACE #define QT_END_NAMESPACE #endif #ifndef QT_FORWARD_DECLARE_CLASS #define QT_FORWARD_DECLARE_CLASS(Class) class Class; #endif /**************************************************************************** ** This file is derived from code bearing the following notice: ** The sole author of this file, Adam Higerd, has explicitly disclaimed all ** copyright interest and protection for the content within. This file has ** been placed in the public domain according to United States copyright ** statute and case law. In jurisdictions where this public domain dedication ** is not legally recognized, anyone who receives a copy of this file is ** permitted to use, modify, duplicate, and redistribute this file, in whole ** or in part, with no restrictions or conditions. In these jurisdictions, ** this file shall be copyright (C) 2006-2008 by Adam Higerd. ****************************************************************************/ #define QXT_DECLARE_PRIVATE(PUB) friend class PUB##Private; QxtPrivateInterface qxt_d; #define QXT_DECLARE_PUBLIC(PUB) friend class PUB; #define QXT_INIT_PRIVATE(PUB) qxt_d.setPublic(this); #define QXT_D(PUB) PUB##Private& d = qxt_d() #define QXT_P(PUB) PUB& p = qxt_p() template class QxtPrivate { public: virtual ~QxtPrivate() {} inline void QXT_setPublic(PUB* pub) { qxt_p_ptr = pub; } protected: inline PUB& qxt_p() { return *qxt_p_ptr; } inline const PUB& qxt_p() const { return *qxt_p_ptr; } private: PUB* qxt_p_ptr; }; template class QxtPrivateInterface { friend class QxtPrivate; public: QxtPrivateInterface() { pvt = new PVT; } ~QxtPrivateInterface() { delete pvt; } inline void setPublic(PUB* pub) { pvt->QXT_setPublic(pub); } inline PVT& operator()() { return *static_cast(pvt); } inline const PVT& operator()() const { return *static_cast(pvt); } private: QxtPrivateInterface(const QxtPrivateInterface&) { } QxtPrivateInterface& operator=(const QxtPrivateInterface&) { } QxtPrivate* pvt; }; #endif // QXT_GLOBAL ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut.cpp ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #include "qxtglobalshortcut.h" #include "qxtglobalshortcut_p.h" #include #include bool QxtGlobalShortcutPrivate::error = false; int QxtGlobalShortcutPrivate::ref = 0; #if(QT_VERSION<0x050000) QAbstractEventDispatcher::EventFilter QxtGlobalShortcutPrivate::prevEventFilter = 0; #endif QHash, QxtGlobalShortcut*> QxtGlobalShortcutPrivate::shortcuts; QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate() : enabled(true), key(Qt::Key(0)), mods(Qt::NoModifier) { if (!ref++){ #if(QT_VERSION<0x050000) prevEventFilter = QAbstractEventDispatcher::instance()->setEventFilter(eventFilter); #else QAbstractEventDispatcher::instance ()->installNativeEventFilter (this); #endif } } QxtGlobalShortcutPrivate::~QxtGlobalShortcutPrivate() { if (!--ref){ #if(QT_VERSION<0x050000) QAbstractEventDispatcher::instance()->setEventFilter(prevEventFilter); #else QAbstractEventDispatcher::instance ()->removeNativeEventFilter (this); #endif } } bool QxtGlobalShortcutPrivate::setShortcut(const QKeySequence& shortcut) { Qt::KeyboardModifiers allMods = Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier; key = shortcut.isEmpty() ? Qt::Key(0) : Qt::Key((shortcut[0] ^ allMods) & shortcut[0]); mods = shortcut.isEmpty() ? Qt::KeyboardModifiers(0) : Qt::KeyboardModifiers(shortcut[0] & allMods); const quint32 nativeKey = nativeKeycode(key); const quint32 nativeMods = nativeModifiers(mods); const bool res = registerShortcut(nativeKey, nativeMods); shortcuts.insert(qMakePair(nativeKey, nativeMods), &qxt_p()); if (!res) qWarning() << "QxtGlobalShortcut failed to register:" << QKeySequence(key + mods).toString(); return res; } bool QxtGlobalShortcutPrivate::unsetShortcut() { const quint32 nativeKey = nativeKeycode(key); const quint32 nativeMods = nativeModifiers(mods); const bool res = unregisterShortcut(nativeKey, nativeMods); shortcuts.remove(qMakePair(nativeKey, nativeMods)); if (!res) qWarning() << "QxtGlobalShortcut failed to unregister:" << QKeySequence(key + mods).toString(); key = Qt::Key(0); mods = Qt::KeyboardModifiers(0); return res; } void QxtGlobalShortcutPrivate::activateShortcut(quint32 nativeKey, quint32 nativeMods) { QxtGlobalShortcut* shortcut = shortcuts.value(qMakePair(nativeKey, nativeMods)); if (shortcut && shortcut->isEnabled()) emit shortcut->activated(); } /*! \class QxtGlobalShortcut \inmodule QxtGui \brief The QxtGlobalShortcut class provides a global shortcut aka "hotkey". A global shortcut triggers even if the application is not active. This makes it easy to implement applications that react to certain shortcuts still if some other application is active or if the application is for example minimized to the system tray. Example usage: \code QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(window); connect(shortcut, SIGNAL(activated()), window, SLOT(toggleVisibility())); shortcut->setShortcut(QKeySequence("Ctrl+Shift+F12")); \endcode \bold {Note:} Since Qxt 0.6 QxtGlobalShortcut no more requires QxtApplication. */ /*! \fn QxtGlobalShortcut::activated() This signal is emitted when the user types the shortcut's key sequence. \sa shortcut */ /*! Constructs a new QxtGlobalShortcut with \a parent. */ QxtGlobalShortcut::QxtGlobalShortcut(QObject* parent) : QObject(parent) { QXT_INIT_PRIVATE(QxtGlobalShortcut); } /*! Constructs a new QxtGlobalShortcut with \a shortcut and \a parent. */ QxtGlobalShortcut::QxtGlobalShortcut(const QKeySequence& shortcut, QObject* parent) : QObject(parent) { QXT_INIT_PRIVATE(QxtGlobalShortcut); setShortcut(shortcut); } /*! Destructs the QxtGlobalShortcut. */ QxtGlobalShortcut::~QxtGlobalShortcut() { if (qxt_d().key != 0) qxt_d().unsetShortcut(); } /*! \property QxtGlobalShortcut::shortcut \brief the shortcut key sequence \bold {Note:} Notice that corresponding key press and release events are not delivered for registered global shortcuts even if they are disabled. Also, comma separated key sequences are not supported. Only the first part is used: \code qxtShortcut->setShortcut(QKeySequence("Ctrl+Alt+A,Ctrl+Alt+B")); Q_ASSERT(qxtShortcut->shortcut() == QKeySequence("Ctrl+Alt+A")); \endcode */ QKeySequence QxtGlobalShortcut::shortcut() const { return QKeySequence(qxt_d().key | qxt_d().mods); } bool QxtGlobalShortcut::setShortcut(const QKeySequence& shortcut) { if (qxt_d().key != 0) qxt_d().unsetShortcut(); return qxt_d().setShortcut(shortcut); } /*! \property QxtGlobalShortcut::enabled \brief whether the shortcut is enabled A disabled shortcut does not get activated. The default value is \c true. \sa setDisabled() */ bool QxtGlobalShortcut::isEnabled() const { return qxt_d().enabled; } void QxtGlobalShortcut::setEnabled(bool enabled) { qxt_d().enabled = enabled; } /*! Sets the shortcut \a disabled. \sa enabled */ void QxtGlobalShortcut::setDisabled(bool disabled) { qxt_d().enabled = !disabled; } ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut.h ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #ifndef QXTGLOBALSHORTCUT_H #define QXTGLOBALSHORTCUT_H #include "qxtglobal.h" #include #include class QxtGlobalShortcutPrivate; class QxtGlobalShortcut : public QObject { Q_OBJECT QXT_DECLARE_PRIVATE(QxtGlobalShortcut) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) public: explicit QxtGlobalShortcut(QObject* parent = 0); explicit QxtGlobalShortcut(const QKeySequence& shortcut, QObject* parent = 0); virtual ~QxtGlobalShortcut(); QKeySequence shortcut() const; bool setShortcut(const QKeySequence& shortcut); bool isEnabled() const; public Q_SLOTS: void setEnabled(bool enabled = true); void setDisabled(bool disabled = true); Q_SIGNALS: void activated(); }; #endif // QXTGLOBALSHORTCUT_H ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut.pri ================================================ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD HEADERS += $$PWD/qxtglobal.h \ $$PWD/qxtglobalshortcut.h \ $$PWD/qxtglobalshortcut_p.h SOURCES += $$PWD/qxtglobalshortcut.cpp win32{ SOURCES += $$PWD/qxtglobalshortcut_win.cpp LIBS += -luser32 } unix:SOURCES += $$PWD/qxtglobalshortcut_x11.cpp mac:SOURCES += $$PWD/qxtglobalshortcut_mac.cpp ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut_mac.cpp ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #include #include "qxtglobalshortcut_p.h" #include #include #include #include typedef QPair Identifier; static QMap keyRefs; static QHash keyIDs; static quint32 hotKeySerial = 0; static bool qxt_mac_handler_installed = false; OSStatus qxt_mac_handle_hot_key(EventHandlerCallRef nextHandler, EventRef event, void* data) { // pass event to the app event filter Q_UNUSED(data); qApp->macEventFilter(nextHandler, event); return noErr; } #if(QT_VERSION<0x050000) bool QxtGlobalShortcutPrivate::eventFilter(void* message) //bool QxtGlobalShortcutPrivate::macEventFilter(EventHandlerCallRef caller, EventRef event) { EventRef event = (EventRef) message; if (GetEventClass(event) == kEventClassKeyboard && GetEventKind(event) == kEventHotKeyPressed) { EventHotKeyID keyID; GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(keyID), NULL, &keyID); Identifier id = keyIDs.key(keyID.id); activateShortcut(id.second, id.first); } return false; } #else bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray &, void *message, long *) { EventRef event = (EventRef) message; if (GetEventClass(event) == kEventClassKeyboard && GetEventKind(event) == kEventHotKeyPressed) { EventHotKeyID keyID; GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(keyID), NULL, &keyID); Identifier id = keyIDs.key(keyID.id); activateShortcut(id.second, id.first); } return false; } #endif quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers) { quint32 native = 0; if (modifiers & Qt::ShiftModifier) native |= shiftKeyBit; if (modifiers & Qt::ControlModifier) native |= cmdKey; if (modifiers & Qt::AltModifier) native |= optionKey; if (modifiers & Qt::MetaModifier) native |= controlKey; if (modifiers & Qt::KeypadModifier) native |= kEventKeyModifierNumLockMask; return native; } quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key key) { UTF16Char ch; // Constants found in NSEvent.h from AppKit.framework if (key == Qt::Key_Up) ch = 0xF700; else if (key == Qt::Key_Down) ch = 0xF701; else if (key == Qt::Key_Left) ch = 0xF702; else if (key == Qt::Key_Right) ch = 0xF703; else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) ch = key - Qt::Key_F1 + 0xF704; else if (key == Qt::Key_Insert) ch = 0xF727; else if (key == Qt::Key_Delete) ch = 0xF728; else if (key == Qt::Key_Home) ch = 0xF729; else if (key == Qt::Key_End) ch = 0xF72B; else if (key == Qt::Key_PageUp) ch = 0xF72C; else if (key == Qt::Key_PageDown) ch = 0xF72D; else if (key == Qt::Key_Print) ch = 0xF72E; else if (key == Qt::Key_ScrollLock) ch = 0xF72F; else if (key == Qt::Key_Pause) ch = 0xF730; else if (key == Qt::Key_SysReq) ch = 0xF731; else if (key == Qt::Key_Stop) ch = 0xF734; else if (key == Qt::Key_Menu) ch = 0xF735; else if (key == Qt::Key_Select) ch = 0xF741; else if (key == Qt::Key_Execute) ch = 0xF742; else if (key == Qt::Key_Help) ch = 0xF746; else if (key == Qt::Key_Mode_switch) ch = 0xF747; else if (key == Qt::Key_Escape) ch = 27; else if (key == Qt::Key_Return) ch = 13; else if (key == Qt::Key_Enter) ch = 3; else if (key == Qt::Key_Tab) ch = 9; else ch = key; KeyboardLayoutRef layout; KeyboardLayoutKind layoutKind; KLGetCurrentKeyboardLayout(&layout); KLGetKeyboardLayoutProperty(layout, kKLKind, const_cast(reinterpret_cast(&layoutKind))); if (layoutKind == kKLKCHRKind) { // no Unicode available if (ch > 255) return 0; char* data; KLGetKeyboardLayoutProperty(layout, kKLKCHRData, const_cast(reinterpret_cast(&data))); int ct = *reinterpret_cast(data + 258); for (int i = 0; i < ct; i++) { char* keyTable = data + 260 + 128 * i; for (int j = 0; j < 128; j++) { if (keyTable[j] == ch) return j; } } return 0; } char* data; KLGetKeyboardLayoutProperty(layout, kKLuchrData, const_cast(reinterpret_cast(&data))); UCKeyboardLayout* header = reinterpret_cast(data); UCKeyboardTypeHeader* table = header->keyboardTypeList; for (quint32 i=0; i < header->keyboardTypeCount; i++) { UCKeyStateRecordsIndex* stateRec = 0; if (table[i].keyStateRecordsIndexOffset != 0) { stateRec = reinterpret_cast(data + table[i].keyStateRecordsIndexOffset); if (stateRec->keyStateRecordsIndexFormat != kUCKeyStateRecordsIndexFormat) stateRec = 0; } UCKeyToCharTableIndex* charTable = reinterpret_cast(data + table[i].keyToCharTableIndexOffset); if (charTable->keyToCharTableIndexFormat != kUCKeyToCharTableIndexFormat) continue; for (quint32 j=0; j < charTable->keyToCharTableCount; j++) { UCKeyOutput* keyToChar = reinterpret_cast(data + charTable->keyToCharTableOffsets[j]); for (quint32 k=0; k < charTable->keyToCharTableSize; k++) { if (keyToChar[k] & kUCKeyOutputTestForIndexMask) { long idx = keyToChar[k] & kUCKeyOutputGetIndexMask; if (stateRec && idx < stateRec->keyStateRecordCount) { UCKeyStateRecord* rec = reinterpret_cast(data + stateRec->keyStateRecordOffsets[idx]); if (rec->stateZeroCharData == ch) return k; } } else if (!(keyToChar[k] & kUCKeyOutputSequenceIndexMask) && keyToChar[k] < 0xFFFE) { if (keyToChar[k] == ch) return k; } } // for k } // for j } // for i return 0; } bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativeMods) { if (!qxt_mac_handler_installed) { EventTypeSpec t; t.eventClass = kEventClassKeyboard; t.eventKind = kEventHotKeyPressed; InstallApplicationEventHandler(&qxt_mac_handle_hot_key, 1, &t, NULL, NULL); } EventHotKeyID keyID; keyID.signature = 'cute'; keyID.id = ++hotKeySerial; EventHotKeyRef ref = 0; bool rv = !RegisterEventHotKey(nativeKey, nativeMods, keyID, GetApplicationEventTarget(), 0, &ref); if (rv) { keyIDs.insert(Identifier(nativeMods, nativeKey), keyID.id); keyRefs.insert(keyID.id, ref); } qDebug() << ref; return rv; } bool QxtGlobalShortcutPrivate::unregisterShortcut(quint32 nativeKey, quint32 nativeMods) { Identifier id(nativeMods, nativeKey); if (!keyIDs.contains(id)) return false; EventHotKeyRef ref = keyRefs.take(keyIDs[id]); keyIDs.remove(id); return !UnregisterEventHotKey(ref); } ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut_p.h ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #ifndef QXTGLOBALSHORTCUT_P_H #define QXTGLOBALSHORTCUT_P_H #include "qxtglobalshortcut.h" #include #include #include #if(QT_VERSION>=0x050000) #include #endif class QxtGlobalShortcutPrivate : public QxtPrivate #if(QT_VERSION>=0x050000) , public QAbstractNativeEventFilter #endif { public: QXT_DECLARE_PUBLIC(QxtGlobalShortcut) QxtGlobalShortcutPrivate(); ~QxtGlobalShortcutPrivate(); bool enabled; Qt::Key key; Qt::KeyboardModifiers mods; bool setShortcut(const QKeySequence& shortcut); bool unsetShortcut(); static bool error; static int ref; #if(QT_VERSION<0x050000) static QAbstractEventDispatcher::EventFilter prevEventFilter; static bool eventFilter(void* message); #else bool nativeEventFilter(const QByteArray &eventType, void *message, long *result); #endif private: static quint32 nativeKeycode(Qt::Key keycode); static quint32 nativeModifiers(Qt::KeyboardModifiers modifiers); static bool registerShortcut(quint32 nativeKey, quint32 nativeMods); static bool unregisterShortcut(quint32 nativeKey, quint32 nativeMods); static void activateShortcut(quint32 nativeKey, quint32 nativeMods); static QHash, QxtGlobalShortcut*> shortcuts; }; #endif // QXTGLOBALSHORTCUT_P_H ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut_win.cpp ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #include "qxtglobalshortcut_p.h" #include #include #if(QT_VERSION<0x050000) bool QxtGlobalShortcutPrivate::eventFilter(void* message) { MSG* msg = static_cast(message); if (msg->message == WM_HOTKEY) { const quint32 keycode = HIWORD(msg->lParam); const quint32 modifiers = LOWORD(msg->lParam); activateShortcut(keycode, modifiers); } return false; } #else bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray &, void *message, long *) { //qDebug()<<"事件类型是:"+eventType; MSG* msg = static_cast(message); if (msg->message == WM_HOTKEY) { const quint32 keycode = HIWORD(msg->lParam); const quint32 modifiers = LOWORD(msg->lParam); activateShortcut(keycode, modifiers); } return false; } #endif quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers) { // MOD_ALT, MOD_CONTROL, (MOD_KEYUP), MOD_SHIFT, MOD_WIN quint32 native = 0; if (modifiers & Qt::ShiftModifier) native |= MOD_SHIFT; if (modifiers & Qt::ControlModifier) native |= MOD_CONTROL; if (modifiers & Qt::AltModifier) native |= MOD_ALT; if (modifiers & Qt::MetaModifier) native |= MOD_WIN; // TODO: resolve these? //if (modifiers & Qt::KeypadModifier) //if (modifiers & Qt::GroupSwitchModifier) return native; } quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key key) { switch (key) { case Qt::Key_Escape: return VK_ESCAPE; case Qt::Key_Tab: case Qt::Key_Backtab: return VK_TAB; case Qt::Key_Backspace: return VK_BACK; case Qt::Key_Return: case Qt::Key_Enter: return VK_RETURN; case Qt::Key_Insert: return VK_INSERT; case Qt::Key_Delete: return VK_DELETE; case Qt::Key_Pause: return VK_PAUSE; case Qt::Key_Print: return VK_PRINT; case Qt::Key_Clear: return VK_CLEAR; case Qt::Key_Home: return VK_HOME; case Qt::Key_End: return VK_END; case Qt::Key_Left: return VK_LEFT; case Qt::Key_Up: return VK_UP; case Qt::Key_Right: return VK_RIGHT; case Qt::Key_Down: return VK_DOWN; case Qt::Key_PageUp: return VK_PRIOR; case Qt::Key_PageDown: return VK_NEXT; case Qt::Key_F1: return VK_F1; case Qt::Key_F2: return VK_F2; case Qt::Key_F3: return VK_F3; case Qt::Key_F4: return VK_F4; case Qt::Key_F5: return VK_F5; case Qt::Key_F6: return VK_F6; case Qt::Key_F7: return VK_F7; case Qt::Key_F8: return VK_F8; case Qt::Key_F9: return VK_F9; case Qt::Key_F10: return VK_F10; case Qt::Key_F11: return VK_F11; case Qt::Key_F12: return VK_F12; case Qt::Key_F13: return VK_F13; case Qt::Key_F14: return VK_F14; case Qt::Key_F15: return VK_F15; case Qt::Key_F16: return VK_F16; case Qt::Key_F17: return VK_F17; case Qt::Key_F18: return VK_F18; case Qt::Key_F19: return VK_F19; case Qt::Key_F20: return VK_F20; case Qt::Key_F21: return VK_F21; case Qt::Key_F22: return VK_F22; case Qt::Key_F23: return VK_F23; case Qt::Key_F24: return VK_F24; case Qt::Key_Space: return VK_SPACE; case Qt::Key_Asterisk: return VK_MULTIPLY; case Qt::Key_Plus: return VK_ADD; case Qt::Key_Comma: return VK_SEPARATOR; case Qt::Key_Minus: return VK_SUBTRACT; case Qt::Key_Slash: return VK_DIVIDE; // numbers case Qt::Key_0: case Qt::Key_1: case Qt::Key_2: case Qt::Key_3: case Qt::Key_4: case Qt::Key_5: case Qt::Key_6: case Qt::Key_7: case Qt::Key_8: case Qt::Key_9: return key; // letters case Qt::Key_A: case Qt::Key_B: case Qt::Key_C: case Qt::Key_D: case Qt::Key_E: case Qt::Key_F: case Qt::Key_G: case Qt::Key_H: case Qt::Key_I: case Qt::Key_J: case Qt::Key_K: case Qt::Key_L: case Qt::Key_M: case Qt::Key_N: case Qt::Key_O: case Qt::Key_P: case Qt::Key_Q: case Qt::Key_R: case Qt::Key_S: case Qt::Key_T: case Qt::Key_U: case Qt::Key_V: case Qt::Key_W: case Qt::Key_X: case Qt::Key_Y: case Qt::Key_Z: return key; default: return 0; } } bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativeMods) { return RegisterHotKey(0, nativeMods ^ nativeKey, nativeMods, nativeKey); } bool QxtGlobalShortcutPrivate::unregisterShortcut(quint32 nativeKey, quint32 nativeMods) { return UnregisterHotKey(0, nativeMods ^ nativeKey); } ================================================ FILE: 3rdParty/qxtglobalshortcut/qxtglobalshortcut_x11.cpp ================================================ /**************************************************************************** ** ** Copyright (C) Qxt Foundation. Some rights reserved. ** ** This file is part of the QxtGui module of the Qxt library. ** ** This library is free software; you can redistribute it and/or modify it ** under the terms of the Common Public License, version 1.0, as published ** by IBM, and/or under the terms of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR ** FITNESS FOR A PARTICULAR PURPOSE. ** ** You should have received a copy of the CPL and the LGPL along with this ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files ** included with the source distribution for more information. ** If you did not receive a copy of the licenses, contact the Qxt Foundation. ** ** ** ****************************************************************************/ #include "qxtglobalshortcut_p.h" #include #include static int (*original_x_errhandler)(Display* display, XErrorEvent* event); static int qxt_x_errhandler(Display* display, XErrorEvent *event) { Q_UNUSED(display); switch (event->error_code) { case BadAccess: case BadValue: case BadWindow: if (event->request_code == 33 /* X_GrabKey */ || event->request_code == 34 /* X_UngrabKey */) { QxtGlobalShortcutPrivate::error = true; //TODO: //char errstr[256]; //XGetErrorText(dpy, err->error_code, errstr, 256); } default: return 0; } } #if(QT_VERSION<0x050000) bool QxtGlobalShortcutPrivate::eventFilter(void* message) { XEvent* event = static_cast(message); if (event->type == KeyPress) { XKeyEvent* key = (XKeyEvent*) event; activateShortcut(key->keycode, // Mod1Mask == Alt, Mod4Mask == Meta key->state & (ShiftMask | ControlMask | Mod1Mask | Mod4Mask)); } return false; } #else bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray &, void *message, long *) { XEvent* event = static_cast(message); if (event->type == KeyPress) { XKeyEvent* key = (XKeyEvent*) event; activateShortcut(key->keycode, // Mod1Mask == Alt, Mod4Mask == Meta key->state & (ShiftMask | ControlMask | Mod1Mask | Mod4Mask)); } return false; } #endif quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers) { // ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask quint32 native = 0; if (modifiers & Qt::ShiftModifier) native |= ShiftMask; if (modifiers & Qt::ControlModifier) native |= ControlMask; if (modifiers & Qt::AltModifier) native |= Mod1Mask; // TODO: resolve these? //if (modifiers & Qt::MetaModifier) //if (modifiers & Qt::KeypadModifier) //if (modifiers & Qt::GroupSwitchModifier) return native; } quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key key) { Display* display = QX11Info::display(); return XKeysymToKeycode(display, XStringToKeysym(QKeySequence(key).toString().toLatin1().data())); } bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativeMods) { Display* display = QX11Info::display(); Window window = QX11Info::appRootWindow(); Bool owner = True; int pointer = GrabModeAsync; int keyboard = GrabModeAsync; error = false; original_x_errhandler = XSetErrorHandler(qxt_x_errhandler); XGrabKey(display, nativeKey, nativeMods, window, owner, pointer, keyboard); XGrabKey(display, nativeKey, nativeMods | Mod2Mask, window, owner, pointer, keyboard); // allow numlock XSync(display, False); XSetErrorHandler(original_x_errhandler); return !error; } bool QxtGlobalShortcutPrivate::unregisterShortcut(quint32 nativeKey, quint32 nativeMods) { Display* display = QX11Info::display(); Window window = QX11Info::appRootWindow(); error = false; original_x_errhandler = XSetErrorHandler(qxt_x_errhandler); XUngrabKey(display, nativeKey, nativeMods, window); XUngrabKey(display, nativeKey, nativeMods | Mod2Mask, window); // allow numlock XSync(display, False); XSetErrorHandler(original_x_errhandler); return !error; } ================================================ FILE: AboutPanel/AboutPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AboutPage.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #include "AboutPage.h" #include "TR.h" #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif AboutPage::AboutPage(QWidget *parent) : QWidget(parent) { m_label = new QLabel(this); m_label->setText(TR("QtĶý岥CZPlayer\nƷչ:" "http://www.qtcn.org/bbs/read-htm-tid-55824.html\n" "Դ:https://github.com/chxuan/CZPlayer.git")); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_label); mainLayout->addStretch(); this->setLayout(mainLayout); } AboutPage::~AboutPage(void) { /*Do nothing.*/ } ================================================ FILE: AboutPanel/AboutPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AboutPage.h * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #ifndef ABOUTPAGE_H #define ABOUTPAGE_H /*! \def ABOUTPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define ABOUTPAGE_VERSION 0x030000 #include class QLabel; /*! ҳ */ class AboutPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ AboutPage(QWidget *parent = NULL); /*! .*/ ~AboutPage(void); QLabel *m_label; /*!< label*/ }; #endif //ABOUTPAGE_H ================================================ FILE: AboutPanel/AboutPanel.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AboutPanel.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #include "AboutPanel.h" #include "AboutPage.h" #include "AuthorPage.h" #include "ThanksPage.h" #include "Global.h" #include "TR.h" #include #include #include #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if ABOUTPAGE_VERSION < 0x030000 #error "AboutPage version error." #endif #if AUTHORPAGE_VERSION < 0x030000 #error "AuthorPage version error." #endif #if THANKSPAGE_VERSION < 0x030000 #error "ThanksPage version error." #endif #if GLOBAL_VERSION < 0x030000 #error "Global version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif AboutPanel::AboutPanel(QWidget *parent) : QDialog(parent), m_aboutPage(NULL), m_authorPage(NULL), m_thanksPage(NULL) { //ôڻ this->resize(530, 535);//ôС this->setMinimumSize(530, 535); this->setWindowTitle(TR("CZPlayer")); m_logoLabel = new QLabel(this); m_logoLabel->setPixmap(QPixmap(ImagesDir + "CZPlayerWhite.png")); //ҳ m_aboutPage = new AboutPage(this); //ҳ m_authorPage = new AuthorPage(this); //лҳ m_thanksPage = new ThanksPage(this); m_tabWidget = new QTabWidget(this); m_tabWidget->addTab(m_aboutPage, TR("")); m_tabWidget->addTab(m_authorPage, TR("")); m_tabWidget->addTab(m_thanksPage, TR("л")); m_okButton = new QPushButton(this); m_okButton->setText(TR("ȷ")); QHBoxLayout *bottomLayout = new QHBoxLayout; bottomLayout->addStretch(); bottomLayout->addWidget(m_okButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_logoLabel); mainLayout->addWidget(m_tabWidget); mainLayout->addLayout(bottomLayout); this->setLayout(mainLayout); connect(m_okButton, SIGNAL(clicked()), this, SLOT(close())); } AboutPanel::~AboutPanel(void) { if (m_aboutPage != NULL) { m_aboutPage->deleteLater(); m_aboutPage = NULL; } /*Else do nothing, and continue.*/ if (m_authorPage != NULL) { m_authorPage->deleteLater(); m_authorPage = NULL; } /*Else do nothing, and continue.*/ if (m_thanksPage != NULL) { m_thanksPage->deleteLater(); m_thanksPage = NULL; } /*Else do nothing, and continue.*/ } void AboutPanel::init() { m_tabWidget->setCurrentIndex(0); } ================================================ FILE: AboutPanel/AboutPanel.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AboutPanel.h * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #ifndef ABOUTPANEL_H #define ABOUTPANEL_H /*! \def ABOUTPANEL_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define ABOUTPANEL_VERSION 0x030000 #include class QLabel; class QPushButton; class QTabWidget; class AboutPage; class AuthorPage; class ThanksPage; /*! */ class AboutPanel : public QDialog { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ AboutPanel(QWidget *parent = NULL); /*! .*/ ~AboutPanel(void); /*! ʼڶԻ. */ void init(); private: QTabWidget *m_tabWidget; /*!< tabҳwidget*/ QPushButton *m_okButton; /*!< ȷť*/ QLabel *m_logoLabel; /*!< logo*/ AboutPage *m_aboutPage; /*!< ҳ*/ AuthorPage *m_authorPage; /*!< ҳ*/ ThanksPage *m_thanksPage; /*!< лҳ*/ }; #endif // ABOUTPANEL_H ================================================ FILE: AboutPanel/AboutPanel.pri ================================================ DEPENDPATH += $$PWD INCLUDEPATH += $$PWD HEADERS += \ $$PWD/AboutPage.h \ $$PWD/AboutPanel.h \ $$PWD/AuthorPage.h \ $$PWD/ThanksPage.h SOURCES += \ $$PWD/AboutPage.cpp \ $$PWD/AboutPanel.cpp \ $$PWD/AuthorPage.cpp \ $$PWD/ThanksPage.cpp ================================================ FILE: AboutPanel/AuthorPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AuthorPage.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #include "AuthorPage.h" #include "TR.h" #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif AuthorPage::AuthorPage(QWidget *parent) : QWidget(parent) { m_mainAuthorLabel = new QLabel; m_mainAuthorLabel->setText(TR("Ŀ\n <787280310@qq.com>")); m_plugAuthorLabel = new QLabel; m_plugAuthorLabel->setText(TR("\n <787280310@qq.com>")); m_artAuthorLabel = new QLabel; m_artAuthorLabel->setText(TR("\n <787280310@qq.com>")); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_mainAuthorLabel); mainLayout->addWidget(m_plugAuthorLabel); mainLayout->addWidget(m_artAuthorLabel); mainLayout->addStretch(); this->setLayout(mainLayout); } AuthorPage::~AuthorPage(void) { /*Do nothing.*/ } ================================================ FILE: AboutPanel/AuthorPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AuthorPage.h * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief ҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #ifndef AUTHORPAGE_H #define AUTHORPAGE_H /*! \def AUTHORPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define AUTHORPAGE_VERSION 0x030000 #include class QLabel; /*! ҳ */ class AuthorPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ AuthorPage(QWidget *parent = NULL); /*! .*/ ~AuthorPage(void); private: QLabel *m_mainAuthorLabel; /*!< Ŀ*/ QLabel *m_plugAuthorLabel; /*!< */ QLabel *m_artAuthorLabel; /*!< */ }; #endif //AUTHORPAGE_H ================================================ FILE: AboutPanel/ThanksPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file ThanksPage.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief лҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #include "ThanksPage.h" #include "TR.h" #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif ThanksPage::ThanksPage(QWidget *parent) : QWidget(parent) { m_thanksLabel = new QLabel(this); m_thanksLabel->setText(TR("л\n <787280310@qq.com>" "\n <787280310@qq.com>")); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_thanksLabel); mainLayout->addStretch(); this->setLayout(mainLayout); } ThanksPage::~ThanksPage(void) { /*Do nothing.*/ } ================================================ FILE: AboutPanel/ThanksPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file ThanksPage.h * \author chengxuan 787280310@qq.com * \date 2014-12-22 * \brief лҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-22 by chengxuan * * \endverbatim * */ #ifndef THANKSPAGE_H #define THANKSPAGE_H /*! \def THANKSPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define THANKSPAGE_VERSION 0x030000 #include class QLabel; /*! лҳ */ class ThanksPage: public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ ThanksPage(QWidget *parent = NULL); /*! .*/ ~ThanksPage(void); QLabel *m_thanksLabel; /*!< лı*/ }; #endif //THANKSPAGE_H ================================================ FILE: CZPlayer.pro ================================================ #------------------------------------------------- # # Project created by QtCreator 2015-02-12T13:54:45 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets DEFINES += CZ_DEBUG #ɵĿִļ· TARGET = ../../CZPlayer/ExecDir/CZPlayer TEMPLATE = app include($$PWD/MainWidget/MainWidget.pri) include($$PWD/MinWidget/MinWidget.pri) include($$PWD/AboutPanel/AboutPanel.pri) include($$PWD/ConfigPanel/ConfigPanel.pri) include($$PWD/Core/Core.pri) include($$PWD/DB/DB.pri) include($$PWD/Engine/Engine.pri) include($$PWD/Entity/Entity.pri) include($$PWD/LrcLabel/LrcLabel.pri) include($$PWD/MusicList/MusicList.pri) include($$PWD/MediaWidget/MediaWidget.pri) include($$PWD/Thread/Thread.pri) #ʹȫȼ include($$PWD/3rdParty/qxtglobalshortcut/qxtglobalshortcut.pri) #ʹõ include($$PWD/3rdParty/qtsingleapplication/qtsingleapplication.pri) SOURCES += main.cpp HEADERS += RESOURCES += \ Resources/CZPlayer.qrc RC_FILE += $$PWD/Resources/CZPlayer.rc ================================================ FILE: ConfigPanel/ConfigDialog.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file ConfigDialog.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȫʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "ConfigDialog.h" #include "GeneralSettingsPage.h" #include "DownloadSettingsPage.h" #include "LrcSettingsPage.h" #include "HotkeysSettingsPage.h" #include "UpdatePage.h" #include "Global.h" #include "TR.h" #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GENERALSETTINGSPAGE_VERSION < 0x030000 #error "GeneralSettingsPage version error." #endif #if DOWNLOADSETTINGSPAGE_VERSION < 0x030000 #error "DownloadSettingsPage version error." #endif #if LRCSETTINGSPAGE_VERSION < 0x030000 #error "LrcSettingsPage version error." #endif #if HOTKEYSSETTINGSPAGE_VERSION < 0x030000 #error "HotkeysSettingsPage version error." #endif #if UPDATEPAGE_VERSION < 0x030000 #error "UpdatePage version error." #endif #if GLOBAL_VERSION < 0x030000 #error "Global version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent), m_generalSettingsPage(NULL), m_downloadSettingsPage(NULL), m_lrcSettingsPage(NULL), m_hotKeysSettingsPage(NULL), m_updatePage(NULL), m_isGeneralSettingsChanged(false), m_isDownloadSettingsChanged(false), m_isLrcSettingsChanged(false), m_isHotKeysSettingsChanged(false) { this->createUI(); this->createConnect(); } ConfigDialog::~ConfigDialog() { // if (m_generalSettingsPage != NULL) { m_generalSettingsPage->deleteLater(); m_generalSettingsPage = NULL; } /*Else do nothing, and continue.*/ // if (m_downloadSettingsPage != NULL) { m_downloadSettingsPage->deleteLater(); m_downloadSettingsPage = NULL; } /*Else do nothing, and continue.*/ // if (m_lrcSettingsPage != NULL) { m_lrcSettingsPage->deleteLater(); m_lrcSettingsPage = NULL; } /*Else do nothing, and continue.*/ //ȼ if (m_hotKeysSettingsPage != NULL) { m_hotKeysSettingsPage->deleteLater(); m_hotKeysSettingsPage = NULL; } /*Else do nothing, and continue.*/ //ҳ if (m_updatePage != NULL) { m_updatePage->deleteLater(); m_updatePage = NULL; } /*Else do nothing, and continue.*/ } //ͼ void ConfigDialog::createIcons() { // QListWidgetItem *generalSettingsItem = new QListWidgetItem(m_contentsWidget); generalSettingsItem->setIcon(QIcon(ImagesDir + "generalSettingsButton.png")); generalSettingsItem->setText(TR("")); generalSettingsItem->setTextAlignment(Qt::AlignCenter); generalSettingsItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); // QListWidgetItem *downloadSettingsItem = new QListWidgetItem(m_contentsWidget); downloadSettingsItem->setIcon(QIcon(ImagesDir + "downloadSettingsButton.png")); downloadSettingsItem->setText(TR("")); downloadSettingsItem->setTextAlignment(Qt::AlignCenter); downloadSettingsItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); // QListWidgetItem *lrcSettingsItem = new QListWidgetItem(m_contentsWidget); lrcSettingsItem->setIcon(QIcon(ImagesDir + "lrcSettingsButton.png")); lrcSettingsItem->setText(TR("")); lrcSettingsItem->setTextAlignment(Qt::AlignCenter); lrcSettingsItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); //ȼ QListWidgetItem *hotKeysSettingsItem = new QListWidgetItem(m_contentsWidget); hotKeysSettingsItem->setIcon(QIcon(ImagesDir + "hotKeysSettingsButton.png")); hotKeysSettingsItem->setText(TR("ȼ")); hotKeysSettingsItem->setTextAlignment(Qt::AlignCenter); hotKeysSettingsItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); //ҳ QListWidgetItem *updateItem = new QListWidgetItem(m_contentsWidget); updateItem->setIcon(QIcon(ImagesDir + "updateButton.png")); updateItem->setText(TR("")); updateItem->setTextAlignment(Qt::AlignCenter); updateItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); } //ıҳ void ConfigDialog::handleChangePage(QListWidgetItem *current, QListWidgetItem *previous) { if (!current) { current = previous; } /*Else do nothing, and continue.*/ m_pagesWidget->setCurrentIndex(m_contentsWidget->row(current)); } void ConfigDialog::handleOkFunc() { this->handleAppFunc(); this->close(); } void ConfigDialog::handleAppFunc() { if (m_isGeneralSettingsChanged) { m_generalSettingsPage->apply(); } /*Else do nothing, and continue.*/ if (m_isDownloadSettingsChanged) { m_downloadSettingsPage->apply(); } /*Else do nothing, and continue.*/ if (m_isLrcSettingsChanged) { m_lrcSettingsPage->apply(); } /*Else do nothing, and continue.*/ if (m_isHotKeysSettingsChanged) { m_hotKeysSettingsPage->apply(); } /*Else do nothing, and continue.*/ m_appButton->setEnabled(false); } void ConfigDialog::init() { m_contentsWidget->setCurrentRow(0); m_generalSettingsPage->init(); m_downloadSettingsPage->init(); m_lrcSettingsPage->init(); m_hotKeysSettingsPage->init(); m_isGeneralSettingsChanged = false; m_isDownloadSettingsChanged = false; m_isLrcSettingsChanged = false; m_isHotKeysSettingsChanged = false; m_appButton->setEnabled(false); } void ConfigDialog::createUI() { //ôڻ this->resize(665, 482);//ôС this->setMinimumSize(665, 482); this->setMaximumSize(665, 482); this->setWindowTitle(TR("CZPlayer ")); //ѡ m_contentsWidget = new QListWidget(this); m_contentsWidget->setViewMode(QListView::ListMode);//IconMode m_contentsWidget->setIconSize(QSize(96, 84)); m_contentsWidget->setMovement(QListView::Static); m_contentsWidget->setMaximumWidth(128); m_contentsWidget->setSpacing(12); this->createIcons(); // if (m_generalSettingsPage == NULL) { m_generalSettingsPage = new GeneralSettingsPage(this); } /*Else do nothing, and continue.*/ // if (m_downloadSettingsPage == NULL) { m_downloadSettingsPage = new DownloadSettingsPage(this); } /*Else do nothing, and continue.*/ // if (m_lrcSettingsPage == NULL) { m_lrcSettingsPage = new LrcSettingsPage(this); } /*Else do nothing, and continue.*/ //ȼ if (m_hotKeysSettingsPage == NULL) { m_hotKeysSettingsPage = new HotKeysSettingsPage(this); } /*Else do nothing, and continue.*/ //ҳ if (m_updatePage == NULL) { m_updatePage = new UpdatePage(this); } /*Else do nothing, and continue.*/ //ҳʾ m_pagesWidget = new QStackedWidget(this); m_pagesWidget->addWidget(m_generalSettingsPage); m_pagesWidget->addWidget(m_downloadSettingsPage); m_pagesWidget->addWidget(m_lrcSettingsPage); m_pagesWidget->addWidget(m_hotKeysSettingsPage); m_pagesWidget->addWidget(m_updatePage); m_contentsWidget->setCurrentRow(0); //ȷť m_okButton = new QPushButton(this); m_okButton->setObjectName(TR("m_okButton")); m_okButton->setText(TR("ȷ")); //ȡť m_cancelButton = new QPushButton(this); m_cancelButton->setObjectName(TR("m_cancelButton")); m_cancelButton->setText(TR("ȡ")); //Ӧðť m_appButton = new QPushButton(this); m_appButton->setObjectName(TR("m_appButton")); m_appButton->setText(TR("Ӧ")); QHBoxLayout *horizontalLayout = new QHBoxLayout; horizontalLayout->addWidget(m_contentsWidget); horizontalLayout->addWidget(m_pagesWidget); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(); buttonsLayout->addWidget(m_okButton); buttonsLayout->addWidget(m_cancelButton); buttonsLayout->addWidget(m_appButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(horizontalLayout); //mainLayout->addStretch(); mainLayout->addLayout(buttonsLayout); this->setLayout(mainLayout); } void ConfigDialog::createConnect() { connect(m_contentsWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(handleChangePage(QListWidgetItem*, QListWidgetItem*))); connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(close())); connect(m_okButton, SIGNAL(clicked()), this, SLOT(handleOkFunc())); connect(m_appButton, SIGNAL(clicked()), this, SLOT(handleAppFunc())); connect(m_generalSettingsPage, SIGNAL(sigGeneralSettingsChanged()), this, SLOT(handleGeneralSettingsChanged())); connect(m_downloadSettingsPage, SIGNAL(sigDownloadSettingsChanged()), this, SLOT(handleDownloadSettingsChanged())); connect(m_hotKeysSettingsPage, SIGNAL(sigHotKeysSettingsChanged()), this, SLOT(handleHotKeysSettingsChanged())); connect(m_lrcSettingsPage, SIGNAL(sigLrcSettingsChanged()), this, SLOT(handleLrcSettingsChanged())); } void ConfigDialog::handleGeneralSettingsChanged() { m_isGeneralSettingsChanged = true; m_appButton->setEnabled(true); } void ConfigDialog::handleDownloadSettingsChanged() { m_isDownloadSettingsChanged = true; m_appButton->setEnabled(true); } void ConfigDialog::handleLrcSettingsChanged() { m_isLrcSettingsChanged = true; m_appButton->setEnabled(true); } void ConfigDialog::handleHotKeysSettingsChanged() { m_isHotKeysSettingsChanged = true; m_appButton->setEnabled(true); } void ConfigDialog::closeEvent(QCloseEvent *event) { emit sigConfigDialogClosed(); QDialog::closeEvent(event); } ================================================ FILE: ConfigPanel/ConfigDialog.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file ConfigDialog.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȫͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef CONFIGDIALOG_H #define CONFIGDIALOG_H /*! \def CONFIGDIALOG_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define CONFIGDIALOG_VERSION 0x030000 #include class GeneralSettingsPage; class DownloadSettingsPage; class LrcSettingsPage; class HotKeysSettingsPage; class UpdatePage; class QListWidget; class QPushButton; class QStackedWidget; class QListWidgetItem; class QCloseEvent; /*! öԻ */ class ConfigDialog : public QDialog { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ ConfigDialog(QWidget *parent = NULL); /*! .*/ ~ConfigDialog(); /*! ʼý */ void init(); protected: /*! 麯ʵcloseEvent * \param event QPaintEvent */ virtual void closeEvent(QCloseEvent *event); signals: /*! öԻر */ void sigConfigDialogClosed(); private slots: /*! ҳı * \param current ǰҳ * \param previous ֮ǰҳ */ void handleChangePage(QListWidgetItem *current, QListWidgetItem *previous); /*! ȷ */ void handleOkFunc(); /*! Ӧ */ void handleAppFunc(); /*! ҳı */ void handleGeneralSettingsChanged(); /*! ҳı */ void handleDownloadSettingsChanged(); /*! ҳı */ void handleLrcSettingsChanged(); /*! ȼҳı */ void handleHotKeysSettingsChanged(); private: /*! */ void createUI(); /*! ͼ */ void createIcons(); /*! ź */ void createConnect(); private: QListWidget *m_contentsWidget; /*!< ͼwidget*/ QStackedWidget *m_pagesWidget; /*!< ҳwidget*/ QPushButton *m_okButton; /*!< ȷť*/ QPushButton *m_cancelButton; /*!< ȡť*/ QPushButton *m_appButton; /*!< Ӧðť*/ GeneralSettingsPage *m_generalSettingsPage; /*!< */ DownloadSettingsPage *m_downloadSettingsPage; /*!< */ LrcSettingsPage *m_lrcSettingsPage; /*!< */ HotKeysSettingsPage *m_hotKeysSettingsPage; /*!< ȼ*/ UpdatePage *m_updatePage; /*!< ҳ*/ bool m_isGeneralSettingsChanged; /*!< Ƿı*/ bool m_isDownloadSettingsChanged; /*!< Ƿı*/ bool m_isLrcSettingsChanged; /*!< Ƿı*/ bool m_isHotKeysSettingsChanged; /*!< ȼǷı*/ }; #endif // CONFIGDIALOG_H ================================================ FILE: ConfigPanel/ConfigPanel.pri ================================================ DEPENDPATH += $$PWD INCLUDEPATH += $$PWD HEADERS += \ $$PWD/ConfigDialog.h \ $$PWD/DownloadSettingsPage.h \ $$PWD/EditHotkeyDialog.h \ $$PWD/GeneralSettingsPage.h \ $$PWD/Global.h \ $$PWD/GlobalConfig.h \ $$PWD/HotkeysSettingsPage.h \ $$PWD/LrcDemo.h \ $$PWD/LrcSettingsPage.h \ $$PWD/UpdatePage.h SOURCES += \ $$PWD/ConfigDialog.cpp \ $$PWD/DownloadSettingsPage.cpp \ $$PWD/EditHotkeyDialog.cpp \ $$PWD/GeneralSettingsPage.cpp \ $$PWD/Global.cpp \ $$PWD/GlobalConfig.cpp \ $$PWD/HotkeysSettingsPage.cpp \ $$PWD/LrcDemo.cpp \ $$PWD/LrcSettingsPage.cpp \ $$PWD/UpdatePage.cpp ================================================ FILE: ConfigPanel/DownloadSettingsPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file DownloadSettingsPage.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "DownloadSettingsPage.h" #include "GlobalConfig.h" #include "TR.h" #include #include #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if DOWNLOADSETTINGSPAGE_VERSION < 0x030000 #error "DownloadSettingsPage version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif DownloadSettingsPage::DownloadSettingsPage(QWidget *parent) : QWidget(parent) { this->createUI(); this->createConnect(); } DownloadSettingsPage::~DownloadSettingsPage() { /*Do nothing.*/ } void DownloadSettingsPage::createUI() { QGroupBox *dirSettingGB = new QGroupBox(TR("Ŀ¼")); //Ŀ¼ m_musicDirLabel = new QLabel(this); m_musicDirLabel->setText(TR("Ŀ¼")); m_musicEdit = new QLineEdit(this); m_musicEdit->setReadOnly(true); m_musicButton = new QPushButton(this); m_musicButton->setText(TR("")); //רĿ¼ m_albumDirLabel = new QLabel(this); m_albumDirLabel->setText(TR("רĿ¼")); m_albumEdit = new QLineEdit(this); m_albumEdit->setReadOnly(true); m_albumEdit->setObjectName("m_albumEdit"); m_albumButton = new QPushButton(this); m_albumButton->setText(TR("")); //Ŀ¼ m_lrcFileLabel = new QLabel(this); m_lrcFileLabel->setText(TR("Ŀ¼")); m_lrcFileEdit = new QLineEdit(this); m_lrcFileEdit->setReadOnly(true); m_lrcFileButton = new QPushButton(this); m_lrcFileButton->setText(TR("")); QHBoxLayout *musicDirLayout = new QHBoxLayout; musicDirLayout->addWidget(m_musicDirLabel); musicDirLayout->addWidget(m_musicEdit); musicDirLayout->addWidget(m_musicButton); QHBoxLayout *albumDirLayout = new QHBoxLayout; albumDirLayout->addWidget(m_albumDirLabel); albumDirLayout->addWidget(m_albumEdit); albumDirLayout->addWidget(m_albumButton); QHBoxLayout *lrcDirLayout = new QHBoxLayout; lrcDirLayout->addWidget(m_lrcFileLabel); lrcDirLayout->addWidget(m_lrcFileEdit); lrcDirLayout->addWidget(m_lrcFileButton); QVBoxLayout *dirSettingLayout = new QVBoxLayout; dirSettingLayout->addLayout(musicDirLayout); dirSettingLayout->addLayout(albumDirLayout); dirSettingLayout->addLayout(lrcDirLayout); dirSettingGB->setLayout(dirSettingLayout); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(dirSettingGB); mainLayout->addStretch(); this->setLayout(mainLayout); } void DownloadSettingsPage::createConnect() { connect(m_musicButton, SIGNAL(clicked()), this, SLOT(handleMusicDirChanged())); connect(m_albumButton, SIGNAL(clicked()), this, SLOT(handleAlbumDirChanged())); connect(m_lrcFileButton, SIGNAL(clicked()), this, SLOT(handleLrcDirChanged())); } void DownloadSettingsPage::init() { GlobalConfig *config = GlobalConfig::instance(); m_musicEdit->setText(config->musicPath()); m_albumEdit->setText(config->albumPath()); m_lrcFileEdit->setText(config->lrcPath()); } void DownloadSettingsPage::apply() { GlobalConfig *config = GlobalConfig::instance(); config->setMusicPath(m_musicEdit->text()); config->setAlbumPath(m_albumEdit->text()); config->setLrcPath(m_lrcFileEdit->text()); if (!config->save()) { QMessageBox::warning(this, TR(""), TR("Ϣʧܣ")); } /*Else do nothing, and contine.*/ } void DownloadSettingsPage::handleMusicDirChanged() { QString path = m_musicEdit->text(); if (path.isEmpty()) { path = QDir::homePath(); } /*Else do nothing, and contine.*/ QString directory = QFileDialog::getExistingDirectory(this, TR("ıĿ¼"), path, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!directory.isEmpty() && directory != m_musicEdit->text()) { m_musicEdit->setText(directory); emit sigDownloadSettingsChanged(); } /*Else do nothing, and contine.*/ } void DownloadSettingsPage::handleAlbumDirChanged() { QString path = m_albumEdit->text(); if (path.isEmpty()) { path = QDir::homePath(); } /*Else do nothing, and contine.*/ QString directory = QFileDialog::getExistingDirectory(this, TR("ıרĿ¼"), path, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!directory.isEmpty() && directory != m_albumEdit->text()) { m_albumEdit->setText(directory); emit sigDownloadSettingsChanged(); } /*Else do nothing, and contine.*/ } void DownloadSettingsPage::handleLrcDirChanged() { QString path = m_lrcFileEdit->text(); if (path.isEmpty()) { path = QDir::homePath(); } /*Else do nothing, and contine.*/ QString directory = QFileDialog::getExistingDirectory(this, TR("ıĿ¼"), path, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (!directory.isEmpty() && directory != m_lrcFileEdit->text()) { m_lrcFileEdit->setText(directory); emit sigDownloadSettingsChanged(); } /*Else do nothing, and contine.*/ } ================================================ FILE: ConfigPanel/DownloadSettingsPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file DownloadSettingsPage.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef DOWNLOADSETTINGSPAGE_H #define DOWNLOADSETTINGSPAGE_H /*! \def DOWNLOADSETTINGSPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define DOWNLOADSETTINGSPAGE_VERSION 0x030000 #include #include class QLabel; class QLineEdit; class QPushButton; /*! ҳ */ class DownloadSettingsPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ DownloadSettingsPage(QWidget *parent = NULL); /*! .*/ ~DownloadSettingsPage(); /*! ʼҳ */ void init(); /*! Ӧøı */ void apply(); signals: /*! ؽϢıʱ͸ź */ void sigDownloadSettingsChanged(); private slots: /*! Ŀ¼ı */ void handleMusicDirChanged(); /*! רĿ¼ı */ void handleAlbumDirChanged(); /*! Ŀ¼ı */ void handleLrcDirChanged(); private: /*! */ void createUI(); /*! ź */ void createConnect(); private: QLabel *m_musicDirLabel; /*!< Ŀ¼*/ QLineEdit *m_musicEdit; /*!< Ŀ¼*/ QPushButton *m_musicButton; /*!< Ŀ¼*/ QLabel *m_albumDirLabel; /*!< רĿ¼*/ QLineEdit *m_albumEdit; /*!< רĿ¼*/ QPushButton *m_albumButton; /*!< רĿ¼*/ QLabel *m_lrcFileLabel; /*!< Ŀ¼*/ QLineEdit *m_lrcFileEdit; /*!< Ŀ¼*/ QPushButton *m_lrcFileButton; /*!< Ŀ¼*/ }; #endif // DOWNLOADSETTINGSPAGE_H ================================================ FILE: ConfigPanel/EditHotkeyDialog.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file EditHotkeyDialog.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼ༭Իʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "EditHotkeyDialog.h" #include "TR.h" #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif EditHotkeyDialog::EditHotkeyDialog(QWidget *parent) : QDialog(parent), m_isHeadKeyPress(false), m_isTailkeyPress(false), m_isHotkeySuccess(false), m_isCtrlKeyPress(false), m_isAltKeyPress(false), m_isShiftKeyPress(false) { this->createUI(); this->createConnect(); } EditHotkeyDialog::~EditHotkeyDialog() { /*Do nothing.*/ } void EditHotkeyDialog::createUI() { this->setWindowTitle(TR("༭ȼ")); //this->setWindowFlags(Qt::Drawer); //ȡԻͼ m_label = new QLabel(this); m_edit = new QLineEdit(this); m_edit->setReadOnly(true); m_edit->installEventFilter(this); QHBoxLayout *edithLayout = new QHBoxLayout; edithLayout->addWidget(m_label); edithLayout->addWidget(m_edit); m_cancelButton = new QPushButton(TR("ȡ"), this); m_okButton = new QPushButton(TR("ȷ"), this); QHBoxLayout *buttonhLayout = new QHBoxLayout; buttonhLayout->addStretch(); buttonhLayout->addWidget(m_cancelButton); buttonhLayout->addWidget(m_okButton); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(edithLayout); mainLayout->addLayout(buttonhLayout); this->setLayout(mainLayout); } void EditHotkeyDialog::createConnect() { connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(close())); connect(m_okButton, SIGNAL(clicked()), this, SLOT(handleEditHotkeyFinished())); } void EditHotkeyDialog::init(const QString ¤tHotKeyName, const QString ¤tHotKey) { m_currentHotKeyName = currentHotKeyName; m_currentHotKey = currentHotKey; m_label->setText(m_currentHotKeyName + TR("")); m_edit->setText(m_currentHotKey); } void EditHotkeyDialog::handleEditHotkeyFinished() { emit sigEditHotkeyFinished(m_currentHotKeyName, m_edit->text()); this->close(); } bool EditHotkeyDialog::eventFilter(QObject *target, QEvent *event) { if (target == m_edit) { if (event->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(event); int key = keyEvent->key(); switch (key) { /*CtrlAltShift*/ case Qt::Key_Control: if (m_isTailkeyPress) { break; } if (m_isAltKeyPress) { m_edit->setText("Ctrl+Alt+"); m_isAltKeyPress = false; } else if (m_isShiftKeyPress) { m_edit->setText("Ctrl+Shift+"); m_isShiftKeyPress = false; } else { m_edit->setText("Ctrl+"); } m_isCtrlKeyPress = true; m_isHeadKeyPress = true; m_isHotkeySuccess = false; m_okButton->setEnabled(false); break; case Qt::Key_Alt: if (m_isTailkeyPress) { break; } if (m_isCtrlKeyPress) { m_edit->setText("Ctrl+Alt+"); m_isCtrlKeyPress = false; } else if (m_isShiftKeyPress) { break; } else { m_edit->setText("Alt+"); } m_isAltKeyPress = true; m_isHeadKeyPress = true; m_isHotkeySuccess = false; m_okButton->setEnabled(false); break; case Qt::Key_Shift: if (m_isTailkeyPress) { break; } if (m_isCtrlKeyPress) { m_edit->setText("Ctrl+Shift+"); m_isCtrlKeyPress = false; } else if (m_isAltKeyPress) { break; } else { m_edit->setText("Shift+"); } m_isShiftKeyPress = true; m_isHeadKeyPress = true; m_isHotkeySuccess = false; m_okButton->setEnabled(false); break; /*ĸ*/ case Qt::Key_A: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "A"); this->hotKeySuccessReset(); } break; case Qt::Key_B: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "B"); this->hotKeySuccessReset(); } break; case Qt::Key_C: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "C"); this->hotKeySuccessReset(); } break; case Qt::Key_D: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "D"); this->hotKeySuccessReset(); } break; case Qt::Key_E: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "E"); this->hotKeySuccessReset(); } break; case Qt::Key_F: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F"); this->hotKeySuccessReset(); } break; case Qt::Key_G: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "G"); this->hotKeySuccessReset(); } break; case Qt::Key_H: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "H"); this->hotKeySuccessReset(); } break; case Qt::Key_I: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "I"); this->hotKeySuccessReset(); } break; case Qt::Key_J: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "J"); this->hotKeySuccessReset(); } break; case Qt::Key_K: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "K"); this->hotKeySuccessReset(); } break; case Qt::Key_L: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "L"); this->hotKeySuccessReset(); } break; case Qt::Key_M: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "M"); this->hotKeySuccessReset(); } break; case Qt::Key_N: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "N"); this->hotKeySuccessReset(); } break; case Qt::Key_O: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "O"); this->hotKeySuccessReset(); } break; case Qt::Key_P: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "P"); this->hotKeySuccessReset(); } break; case Qt::Key_Q: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "Q"); this->hotKeySuccessReset(); } break; case Qt::Key_R: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "R"); this->hotKeySuccessReset(); } break; case Qt::Key_S: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "S"); this->hotKeySuccessReset(); } break; case Qt::Key_T: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "T"); this->hotKeySuccessReset(); } break; case Qt::Key_U: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "U"); this->hotKeySuccessReset(); } break; case Qt::Key_V: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "V"); this->hotKeySuccessReset(); } break; case Qt::Key_W: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "W"); this->hotKeySuccessReset(); } break; case Qt::Key_X: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "X"); this->hotKeySuccessReset(); } break; case Qt::Key_Y: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "Y"); this->hotKeySuccessReset(); } break; case Qt::Key_Z: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "Z"); this->hotKeySuccessReset(); } break; /*F*/ case Qt::Key_F1: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F1"); this->hotKeySuccessReset(); } break; case Qt::Key_F2: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F2"); this->hotKeySuccessReset(); } break; case Qt::Key_F3: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F3"); this->hotKeySuccessReset(); } break; case Qt::Key_F4: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F4"); this->hotKeySuccessReset(); } break; case Qt::Key_F5: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F5"); this->hotKeySuccessReset(); } break; case Qt::Key_F6: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F6"); this->hotKeySuccessReset(); } break; case Qt::Key_F7: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F7"); this->hotKeySuccessReset(); } break; case Qt::Key_F8: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F8"); this->hotKeySuccessReset(); } break; case Qt::Key_F9: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F9"); this->hotKeySuccessReset(); } break; case Qt::Key_F10: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F10"); this->hotKeySuccessReset(); } break; case Qt::Key_F11: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F11"); this->hotKeySuccessReset(); } break; case Qt::Key_F12: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "F12"); this->hotKeySuccessReset(); } break; /*ո*/ case Qt::Key_Space: if (m_isHeadKeyPress) { m_edit->setText(m_edit->text() + "Space"); this->hotKeySuccessReset(); } break; default: break; } return true; } /*Else do nothing, and conintue.*/ if (event->type() == QEvent::KeyRelease) { QKeyEvent *keyEvent = static_cast(event); int key = keyEvent->key(); switch (key) { /*CtrlAltShift*/ case Qt::Key_Control: if (m_isCtrlKeyPress && !m_isHotkeySuccess) { this->keyReleaseReset(); } m_okButton->setEnabled(true); break; case Qt::Key_Alt: if (m_isAltKeyPress && !m_isHotkeySuccess) { this->keyReleaseReset(); } m_okButton->setEnabled(true); break; case Qt::Key_Shift: if (m_isShiftKeyPress && !m_isHotkeySuccess) { this->keyReleaseReset(); } m_okButton->setEnabled(true); break; /*ĸ*/ case Qt::Key_A: case Qt::Key_B: case Qt::Key_C: case Qt::Key_D: case Qt::Key_E: case Qt::Key_F: case Qt::Key_G: case Qt::Key_H: case Qt::Key_I: case Qt::Key_J: case Qt::Key_K: case Qt::Key_L: case Qt::Key_M: case Qt::Key_N: case Qt::Key_O: case Qt::Key_P: case Qt::Key_Q: case Qt::Key_R: case Qt::Key_S: case Qt::Key_T: case Qt::Key_U: case Qt::Key_V: case Qt::Key_W: case Qt::Key_X: case Qt::Key_Y: case Qt::Key_Z: /*F*/ case Qt::Key_F1: case Qt::Key_F2: case Qt::Key_F3: case Qt::Key_F4: case Qt::Key_F5: case Qt::Key_F6: case Qt::Key_F7: case Qt::Key_F8: case Qt::Key_F9: case Qt::Key_F10: case Qt::Key_F11: case Qt::Key_F12: /*ո*/ case Qt::Key_Space: m_isTailkeyPress = false; break; default: break; } return true; } /*Else do nothing, and conintue.*/ } return QWidget::eventFilter(target, event); } void EditHotkeyDialog::hotKeySuccessReset() { m_isCtrlKeyPress = false; m_isAltKeyPress = false; m_isShiftKeyPress = false; m_isHeadKeyPress = false; m_isHotkeySuccess = true; m_isTailkeyPress = true; } void EditHotkeyDialog::keyReleaseReset() { m_edit->setText(m_currentHotKey); m_isCtrlKeyPress = false; m_isAltKeyPress = false; m_isShiftKeyPress = false; m_isHeadKeyPress = false; } ================================================ FILE: ConfigPanel/EditHotkeyDialog.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file EditHotkeyDialog.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼ༭Իͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef EDITHOTKEYDIALOG_H #define EDITHOTKEYDIALOG_H /*! \def EDITHOTKEYDIALOG_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define EDITHOTKEYDIALOG_VERSION 0x030000 #include class QEvent; class QLineEdit; class QLabel; class QPushButton; /*! ȼ༭Ի */ class EditHotkeyDialog : public QDialog { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ EditHotkeyDialog(QWidget *parent = NULL); /*! .*/ ~EditHotkeyDialog(); /*! ʼ * \param currentHotKeyName ǰȼ * \param currentHotKey ǰȼ */ void init(const QString ¤tHotKeyName, const QString ¤tHotKey); protected: /*! 麯ʵeventFilter * \param target QObject * \param event QEvent * \reurn true˸¼ */ virtual bool eventFilter(QObject *target, QEvent *event); signals: /*! ȼ༭ * \param hotKeyName ȼ * \param hotKey ȼ */ void sigEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey); private slots: /*! ȼ༭ */ void handleEditHotkeyFinished(); private: /*! */ void createUI(); /*! ź */ void createConnect(); /*! ȼóɹر */ void hotKeySuccessReset(); /*! ȼͷر */ void keyReleaseReset(); private: QLabel *m_label; /*!< ȼ*/ QLineEdit *m_edit; /*!< ༭ȼ*/ QPushButton *m_okButton; /*!< ȷť*/ QPushButton *m_cancelButton;/*!< ȡť*/ bool m_isHeadKeyPress; /*!< ȼͷǷ*/ bool m_isTailkeyPress; /*!< ȼβǷ*/ bool m_isHotkeySuccess; /*!< ȼǷ*/ bool m_isCtrlKeyPress; /*!< CtrlǷ*/ bool m_isAltKeyPress; /*!< AltǷ*/ bool m_isShiftKeyPress; /*!< ShiftǷ*/ QString m_currentHotKeyName;/*!< ȼ*/ QString m_currentHotKey; /*!< ȼ*/ }; #endif //EDITHOTKEYDIALOG_H ================================================ FILE: ConfigPanel/GeneralSettingsPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GeneralSettingsPage.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief һҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "GeneralSettingsPage.h" #include "GlobalConfig.h" #include "Global.h" #include "TR.h" #include #include #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif #if GLOBAL_VERSION < 0x030000 #error "Global version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif GeneralSettingsPage::GeneralSettingsPage(QWidget *parent) : QWidget(parent) { this->createUI(); this->createConnect(); } GeneralSettingsPage::~GeneralSettingsPage() { /*Do nothing.*/ } void GeneralSettingsPage::createUI() { QGroupBox *startGB = new QGroupBox(TR("ʱ"), this); QString styleSheet = QString("QCheckBox{color:black;}" "QCheckBox::indicator{width:10px;height:10px;border: 1px solid black;border-radius:2px}" "QCheckBox::indicator:checked {image: url(%1checked2.png);}").arg(ImagesDir); //Զ m_autoPlay = new QCheckBox(TR("ԶŸ"), this); m_autoPlay->setStyleSheet(styleSheet); // m_autoRun = new QCheckBox(TR("ʱԶCZPlayer"), this); m_autoRun->setStyleSheet(styleSheet); //Żӭ m_helloCZPlayer = new QCheckBox(TR("š,CZPlayerʺ"), this); m_helloCZPlayer->setStyleSheet(styleSheet); QGroupBox *fileConnect = new QGroupBox(TR("ļ"), this); //ΪĬϲ m_defaultPlayer = new QCheckBox(TR("CZPlayerΪĬϲ"), this); m_defaultPlayer->setStyleSheet(styleSheet); QGridLayout *startGBLayoutG = new QGridLayout; startGBLayoutG->addWidget(m_autoPlay, 0, 0); startGBLayoutG->addWidget(m_autoRun, 0, 1); startGBLayoutG->addWidget(m_helloCZPlayer, 1, 0); startGB->setLayout(startGBLayoutG); QVBoxLayout *fileLayout = new QVBoxLayout; fileLayout->addWidget(m_defaultPlayer); fileConnect->setLayout(fileLayout); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(startGB); mainLayout->addWidget(fileConnect); mainLayout->addStretch(); this->setLayout(mainLayout); } void GeneralSettingsPage::createConnect() { connect(m_autoPlay, SIGNAL(stateChanged(int)), this, SIGNAL(sigGeneralSettingsChanged())); connect(m_autoRun, SIGNAL(stateChanged(int)), this, SIGNAL(sigGeneralSettingsChanged())); connect(m_helloCZPlayer, SIGNAL(stateChanged(int)), this, SIGNAL(sigGeneralSettingsChanged())); connect(m_defaultPlayer, SIGNAL(stateChanged(int)), this, SIGNAL(sigGeneralSettingsChanged())); } void GeneralSettingsPage::init() { GlobalConfig *config = GlobalConfig::instance(); m_autoPlay->setChecked(config->autoPlayMusic()); m_autoRun->setChecked(config->autoRunPlayer()); m_helloCZPlayer->setChecked(config->autoGreetings()); m_defaultPlayer->setChecked(config->defaultPlayer()); } void GeneralSettingsPage::apply() { GlobalConfig *config = GlobalConfig::instance(); config->setAutoPlayMusic(m_autoPlay->checkState() == Qt::CheckState::Checked); config->setAutoRunPlayer(m_autoRun->checkState() == Qt::CheckState::Checked); config->setAutoGreetings(m_helloCZPlayer->checkState() == Qt::CheckState::Checked); config->setDefaultPlayer(m_defaultPlayer->checkState() == Qt::CheckState::Checked); if (!config->save()) { QMessageBox::warning(this, TR(""), TR("泣Ϣʧܣ")); } /*Else do nothing, and contine.*/ } ================================================ FILE: ConfigPanel/GeneralSettingsPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GeneralSettingsPage.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief һҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef GENERALSETTINGSPAGE_H #define GENERALSETTINGSPAGE_H /*! \def GENERALSETTINGSPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define GENERALSETTINGSPAGE_VERSION 0x030000 #include class QCheckBox; /*! һҳ */ class GeneralSettingsPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ GeneralSettingsPage(QWidget *parent = NULL); /*! .*/ ~GeneralSettingsPage(); /*! ʼҳ */ void init(); /*! Ӧøı */ void apply(); signals: /*! Ϣıʱ͸ź */ void sigGeneralSettingsChanged(); private: /*! */ void createUI(); /*! ź */ void createConnect(); private: QCheckBox *m_autoPlay; /*!< Զ*/ QCheckBox *m_autoRun; /*!< */ QCheckBox *m_helloCZPlayer; /*!< Żӭ*/ QCheckBox *m_defaultPlayer; /*!< ΪĬϲ*/ }; #endif // GENERALSETTINGSPAGE_H ================================================ FILE: ConfigPanel/Global.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalConfig.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-18 * \brief ȫʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-18 by chengxuan * * \endverbatim * */ #include "Global.h" const char *StringOrganization = "Highway-9"; const char *StringApplication = "CZPlayer"; const QString ImagesDir = ":/images/"; /*!< ͼƬļ*/ ================================================ FILE: ConfigPanel/Global.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalConfig.h * \author chengxuan 787280310@qq.com * \date 2015-01-18 * \brief ȫͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-18 by chengxuan * * \endverbatim * */ #ifndef GLOBAL_H #define GLOBAL_H /*! \def GLOBAL_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define GLOBAL_VERSION 0x030000 #include /*! ַ֯, QSettings*/ extern const char *StringOrganization; /*! Ӧóַ, QSettings*/ extern const char *StringApplication; extern const QString ImagesDir; /*!< ͼƬļ*/ #endif // GLOBAL_H ================================================ FILE: ConfigPanel/GlobalConfig.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalConfig.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-18 * \brief ȫʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-18 by chengxuan * * \endverbatim * */ #include "GlobalConfig.h" #include "Global.h" #include "TR.h" #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBAL_VERSION < 0x030000 #error "Global version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif /***************************************************************************** ̬Աijʼ *****************************************************************************/ GlobalConfig* GlobalConfig::m_instance = NULL; /***************************************************************************** ȫֱ *****************************************************************************/ /*Ϣע*/ const QString StrGeneralConfig = "GeneralConfig"; const QString StrAutoPlayMusic = "AutoPlayMusic"; const QString StrAutoRunPlayer = "AutoRunPlayer"; const QString StrAutoGreetings = "AutoGreetings"; const QString StrDefaultPlayer = "DefaultPlayer"; /*Ϣע*/ const QString StrDownloadConfig = "DownloadConfig"; const QString StrMusicPath = "MusicPath"; const QString StrAlbumPath = "AlbumPath"; const QString StrLrcPath = "LrcPath"; /*Ϣע*/ const QString StrLrcConfig = "LrcConfig"; const QString StrFontName = "FontName"; const QString StrFontSize = "FontSize"; const QString StrFontType = "FontType"; const QString StrNoPlayShang = "NoPlayShang"; const QString StrNoPlayZhong = "NoPlayZhong"; const QString StrNoPlayXia = "NoPlayXia"; const QString StrPlayedShang = "PlayedShang"; const QString StrPlayedZhong = "PlayedZhong"; const QString StrPlayedXia = "PlayedXia"; const QString StrDefaultChoiceColor = "DefaultChoiceColor"; const QString StrShadow = "Shadow"; /*ȼϢע*/ const QString StrHotkeyConfig = "HotkeyConfig"; const QString StrConfigOptions = "ConfigOptions"; const QString StrShowHideMainWidget = "ShowHideMainWidget"; const QString StrMinMainWidget = "MinMainWidget"; const QString StrOpenMusicFile = "OpenMusicFile"; const QString StrShowHideMediaWidget = "ShowHideMediaWidget"; const QString StrShowHideMusicList = "ShowHideMusicList"; const QString StrShowHideLrc = "ShowHideLrc"; const QString StrPlayPause = "PlayPause"; const QString StrPlayPre = "PlayPre"; const QString StrPlayNext = "PlayNext"; /*ſϢע*/ const QString StrPlayControlConfig = "PlayControlConfig"; const QString StrMute = "Mute"; const QString StrVolume = "Volume"; const QString StrPlayMode = "PlayMode"; /*ϢĬֵ*/ const bool AutoPlayMusic = false; const bool AutoRunPlayer = false; const bool AutoGreetings = false; const bool DefaultPlayer = false; /*ϢĬֵ*/ const QString MusicPath = "CZPlayer"; const QString AlbumPath = "CZPlayer/albumImages"; const QString LrcPath = "CZPlayer/lrc"; /*ϢĬֵ*/ const QString FontName = TR("΢ź"); const QString FontSize = "30"; const QString FontType = TR(""); const QColor NoPlayShang = QColor(14, 179, 255); const QColor NoPlayZhong = QColor(114, 232, 255); const QColor NoPlayXia = QColor(14, 179, 255); const QColor PlayedShang = QColor(222, 54, 4); const QColor PlayedZhong = QColor(255, 72, 16); const QColor PlayedXia = QColor(222, 54, 4); const QString DefaultChoiceColor = ""; const int Shadow = 255; /*ȼϢĬֵ*/ const QString ConfigOptions = "Ctrl+Alt+F1"; const QString ShowHideMainWidget = "Ctrl+Alt+W"; const QString MinMainWidget = "Ctrl+Alt+M"; const QString OpenMusicFile = "Ctrl+Alt+O"; const QString ShowHideMediaWidget = "Ctrl+Alt+D"; const QString ShowHideMusicList = "Ctrl+Alt+L"; const QString ShowHideLrc = "Ctrl+Alt+R"; const QString PlayPause = "Alt+Space"; const QString PlayPre = "Alt+Left"; const QString PlayNext = "Alt+Right"; // const QColor NoPlayWhiteShang = QColor(255, 255, 255); const QColor NoPlayWhiteZhong = QColor(255, 255, 255); const QColor NoPlayWhiteXia = QColor(255, 255, 255); const QColor PlayedWhiteShang = QColor(255, 255, 0); const QColor PlayedWhiteZhong = QColor(255, 255, 0); const QColor PlayedWhiteXia = QColor(255, 255, 0); // const QColor NoPlayBlueShang = QColor(0, 52, 138); const QColor NoPlayBlueZhong = QColor(0, 128, 192); const QColor NoPlayBlueXia = QColor(3, 202, 252); const QColor PlayedBlueShang = QColor(130, 247, 253); const QColor PlayedBlueZhong = QColor(255, 255, 255); const QColor PlayedBlueXia = QColor(3, 233, 252); // const QColor NoPlayRedShang = QColor(255, 172, 0); const QColor NoPlayRedZhong = QColor(255, 0, 0); const QColor NoPlayRedXia = QColor(170, 0, 0); const QColor PlayedRedShang = QColor(255, 255, 164); const QColor PlayedRedZhong = QColor(255, 255, 0); const QColor PlayedRedXia = QColor(255, 100, 26); //ź const QColor NoPlayBlackShang = QColor(225, 225, 225); const QColor NoPlayBlackZhong = QColor(106, 106, 106); const QColor NoPlayBlackXia = QColor(0, 0, 0); const QColor PlayedBlackShang = QColor(255, 255, 255); const QColor PlayedBlackZhong = QColor(0, 255, 255); const QColor PlayedBlackXia = QColor(128, 255, 255); //ɫ const QColor NoPlayYellowShang = QColor(2, 166, 174); const QColor NoPlayYellowZhong = QColor(128, 255, 255); const QColor NoPlayYellowXia = QColor(2, 166, 174); const QColor PlayedYellowShang = QColor(247, 132, 38); const QColor PlayedYellowZhong = QColor(255, 255, 0); const QColor PlayedYellowXia = QColor(255, 128, 0); // const QColor NoPlayPurpleShang = QColor(64, 0, 128); const QColor NoPlayPurpleZhong = QColor(255, 128, 255); const QColor NoPlayPurpleXia = QColor(64, 0, 128); const QColor PlayedPurpleShang = QColor(255, 55, 146); const QColor PlayedPurpleZhong = QColor(255, 243, 134); const QColor PlayedPurpleXia = QColor(255, 55, 146); //Ȼ const QColor NoPlayGreenShang = QColor(147, 255, 38); const QColor NoPlayGreenZhong = QColor(70, 176, 0); const QColor NoPlayGreenXia = QColor(0, 85, 0); const QColor PlayedGreenShang = QColor(255, 255, 255); const QColor PlayedGreenZhong = QColor(154, 255, 17); const QColor PlayedGreenXia = QColor(255, 255, 0); /*ſϢĬֵ*/ const bool Mute = false; const int Volume = 100; enum PlayModeType { RandomPlay = 1, CyclePlay = 2 }; enum PlayModeType PlayMode = RandomPlay; GlobalConfig::GlobalConfig() : m_isReleaseResource(false), m_isGeneralSettingsNeedSave(false), m_isDownloadSettingsNeedSave(false), m_isLrcSettingsNeedSave(false), m_isHotkeySettingsNeedSave(false), m_isPlayControlSettingsNeedSave(false), m_isAutoPlayMusic(false), m_isAutoRunPlayer(false), m_isAutoGrettings(false), m_isDefaultPlayer(false) { /*Do nothing.*/ } GlobalConfig::~GlobalConfig() { /*Do nothing.*/ } GlobalConfig* GlobalConfig::instance() { if (m_instance == NULL) { m_instance = new GlobalConfig; } /*Else do nothing, and continue.*/ return m_instance; } void GlobalConfig::delInstance() { if (m_instance != NULL) { m_instance->deleteLater(); m_instance = NULL; } /*Else do nothing, and continue.*/ } void GlobalConfig::setReleaseResource(bool isReleaseResource) { m_isReleaseResource = isReleaseResource; } bool GlobalConfig::reload() { //Ϣ֮ǰȴע if (!this->createRegedit()) { return false; } /*Else do nothing, and continue.*/ if (!this->reloadGeneralSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->reloadDownloadSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->reloadLrcSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->reloadHotkeySettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->reloadPlayControlSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ return true; } bool GlobalConfig::createRegedit() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ //Ϣ config.beginGroup(StrGeneralConfig); if (config.childKeys().isEmpty()) { config.setValue(StrAutoPlayMusic, AutoPlayMusic); config.setValue(StrAutoRunPlayer, AutoRunPlayer); config.setValue(StrAutoGreetings, AutoGreetings); config.setValue(StrDefaultPlayer, DefaultPlayer); } /*Else do nothing, and continue.*/ config.endGroup(); //ؽϢ config.beginGroup(StrDownloadConfig); if (config.childKeys().isEmpty()) { QString musicPath; QString albumPath; QString lrcPath; bool isFound = false; QFileInfoList fileInfoList = QDir::drives(); if (fileInfoList.size() > 1) { foreach (QFileInfo fileInfo, fileInfoList) { QString driveLetter = fileInfo.absoluteFilePath(); if (!driveLetter.contains('C', Qt::CaseInsensitive)) { if (fileInfo.isWritable()) { musicPath = driveLetter + MusicPath; albumPath = driveLetter + AlbumPath; lrcPath = driveLetter + LrcPath; isFound = true; break; } /*Else do nothing, and continue.*/ } /*Else do nothing, and continue.*/ } if (!isFound) { QString driveLetter = fileInfoList.at(0).absoluteFilePath(); musicPath = driveLetter + MusicPath; albumPath = driveLetter + AlbumPath; lrcPath = driveLetter + LrcPath; } /*Else do nothing, and continue.*/ } else { QString driveLetter = fileInfoList.at(0).absoluteFilePath(); musicPath = driveLetter + MusicPath; albumPath = driveLetter + AlbumPath; lrcPath = driveLetter + LrcPath; } config.setValue(StrMusicPath, musicPath); config.setValue(StrAlbumPath, albumPath); config.setValue(StrLrcPath, lrcPath); } /*Else do nothing, and continue.*/ config.endGroup(); //ʽϢ config.beginGroup(StrLrcConfig); if (config.childKeys().isEmpty()) { config.setValue(StrFontName, FontName); config.setValue(StrFontSize, FontSize); config.setValue(StrFontType, FontType); config.setValue(StrNoPlayShang, NoPlayShang); config.setValue(StrNoPlayZhong, NoPlayZhong); config.setValue(StrNoPlayXia, NoPlayXia); config.setValue(StrPlayedShang, PlayedShang); config.setValue(StrPlayedZhong, PlayedZhong); config.setValue(StrPlayedXia, PlayedXia); config.setValue(StrDefaultChoiceColor, DefaultChoiceColor); config.setValue(StrShadow, Shadow); } /*Else do nothing, and continue.*/ config.endGroup(); //ȼϢ config.beginGroup(StrHotkeyConfig); if (config.childKeys().isEmpty()) { config.setValue(StrConfigOptions, ConfigOptions); config.setValue(StrShowHideMainWidget, ShowHideMainWidget); config.setValue(StrMinMainWidget, MinMainWidget); config.setValue(StrOpenMusicFile, OpenMusicFile); config.setValue(StrShowHideMediaWidget, ShowHideMediaWidget); config.setValue(StrShowHideMusicList, ShowHideMusicList); config.setValue(StrShowHideLrc, ShowHideLrc); config.setValue(StrPlayPause, PlayPause); config.setValue(StrPlayPre, PlayPre); config.setValue(StrPlayNext, PlayNext); } /*Else do nothing, and continue.*/ config.endGroup(); //ſϢ config.beginGroup(StrPlayControlConfig); if (config.childKeys().isEmpty()) { config.setValue(StrMute, Mute); config.setValue(StrVolume, Volume); config.setValue(StrPlayMode, PlayMode); } /*Else do nothing, and continue.*/ config.endGroup(); config.sync(); return (config.status() == QSettings::NoError); } bool GlobalConfig::save() { if (!this->saveGeneralSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->saveDownloadSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->saveHotkeysSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->saveLrcSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ if (!this->savePlayControlSettingsInfo()) { return false; } /*Else do nothing, and continue.*/ return true; } bool GlobalConfig::reloadGeneralSettingsInfo() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if (config.status() != QSettings::NoError) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrGeneralConfig); this->setAutoPlayMusic(config.value(StrAutoPlayMusic, AutoPlayMusic).toBool()); this->setAutoRunPlayer(config.value(StrAutoRunPlayer, AutoRunPlayer).toBool()); this->setAutoGreetings(config.value(StrAutoGreetings, AutoGreetings).toBool()); this->setDefaultPlayer(config.value(StrDefaultPlayer, DefaultPlayer).toBool()); config.endGroup(); m_isGeneralSettingsNeedSave = false; return true; } bool GlobalConfig::reloadDownloadSettingsInfo() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if (config.status() != QSettings::NoError) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrDownloadConfig); this->setMusicPath(config.value(StrMusicPath, MusicPath).toString()); this->setAlbumPath(config.value(StrAlbumPath, AlbumPath).toString()); this->setLrcPath(config.value(StrLrcPath, m_lrcPath).toString()); config.endGroup(); m_isDownloadSettingsNeedSave = false; return true; } bool GlobalConfig::reloadLrcSettingsInfo() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if (config.status() != QSettings::NoError) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrLrcConfig); this->setFontName(config.value(StrFontName, FontName).toString()); this->setFontSize(config.value(StrFontSize, FontSize).toString()); this->setFontType(config.value(StrFontType, FontType).toString()); this->setNoPlayShang(config.value(StrNoPlayShang, NoPlayShang).value()); this->setNoPlayZhong(config.value(StrNoPlayZhong, NoPlayZhong).value()); this->setNoPlayXia(config.value(StrNoPlayXia, NoPlayXia).value()); this->setPlayedShang(config.value(StrPlayedShang, PlayedShang).value()); this->setPlayedZhong(config.value(StrPlayedZhong, PlayedZhong).value()); this->setPlayedXia(config.value(StrPlayedXia, PlayedXia).value()); this->setDefaultChoiceColor(config.value(StrDefaultChoiceColor, DefaultChoiceColor).toString()); bool ok; int shadow = config.value(StrShadow, Shadow).toInt(&ok); if (!ok) { #ifdef CZ_DEBUG qDebug() << "To int error."; qDebug() << __FUNCTION__ << __FUNCTION__ << __LINE__; shadow = Shadow; #endif } /*Else do nothing, and conintue.*/ this->setShadow(shadow); config.endGroup(); m_isLrcSettingsNeedSave = false; return true; } bool GlobalConfig::reloadHotkeySettingsInfo() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if (config.status() != QSettings::NoError) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrHotkeyConfig); this->setSettingsHotKey(config.value(StrConfigOptions, ConfigOptions).toString()); this->setMinToTrayHotKey(config.value(StrShowHideMainWidget, ShowHideMainWidget).toString()); this->setOpenMinWidgetHotKey(config.value(StrMinMainWidget, MinMainWidget).toString()); this->setOpenMusicFileHotKey(config.value(StrOpenMusicFile, OpenMusicFile).toString()); this->setOpenMediaWidgetHotKey(config.value(StrShowHideMediaWidget, ShowHideMediaWidget).toString()); this->setOpenListWidgetHotKey(config.value(StrShowHideMusicList, ShowHideMusicList).toString()); this->setOpenLrcHotKey(config.value(StrShowHideLrc, ShowHideLrc).toString()); this->setPauseHotKey(config.value(StrPlayPause, PlayPause).toString()); this->setLastHotKey(config.value(StrPlayPre, PlayPre).toString()); this->setNextHotKey(config.value(StrPlayNext, PlayNext).toString()); config.endGroup(); m_isHotkeySettingsNeedSave = false; return true; } bool GlobalConfig::reloadPlayControlSettingsInfo() { QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if (config.status() != QSettings::NoError) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrPlayControlConfig); this->setMute(config.value(StrMute, Mute).toBool()); bool ok; int volume = config.value(StrVolume, Volume).toInt(&ok); if (!ok) { #ifdef CZ_DEBUG qDebug() << "To int error."; qDebug() << __FUNCTION__ << __FUNCTION__ << __LINE__; volume = Volume; #endif } /*Else do nothing, and conintue.*/ this->setVolume(volume); int playMode = config.value(StrPlayMode, PlayMode).toInt(&ok); if (!ok) { #ifdef CZ_DEBUG qDebug() << "To int error."; qDebug() << __FUNCTION__ << __FUNCTION__ << __LINE__; playMode = PlayMode; #endif } /*Else do nothing, and conintue.*/ this->setPlayMode((enum PlayModeType)playMode); config.endGroup(); m_isPlayControlSettingsNeedSave = false; return true; } bool GlobalConfig::saveGeneralSettingsInfo() { if (!m_isGeneralSettingsNeedSave) { return true; } /*Else do nothing, and continue.*/ QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrGeneralConfig); config.setValue(StrAutoPlayMusic, m_isAutoPlayMusic); config.setValue(StrAutoRunPlayer, m_isAutoRunPlayer); config.setValue(StrAutoGreetings, m_isAutoGrettings); config.setValue(StrDefaultPlayer, m_isDefaultPlayer); config.endGroup(); config.sync(); m_isGeneralSettingsNeedSave = false; return (config.status() == QSettings::NoError); } bool GlobalConfig::saveDownloadSettingsInfo() { if (!m_isDownloadSettingsNeedSave) { return true; } /*Else do nothing, and continue.*/ QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrDownloadConfig); config.setValue(StrMusicPath, m_musicPath); config.setValue(StrAlbumPath, m_albumPath); config.setValue(StrLrcPath, m_lrcPath); config.endGroup(); config.sync(); m_isDownloadSettingsNeedSave = false; return (config.status() == QSettings::NoError); } bool GlobalConfig::saveHotkeysSettingsInfo() { if (!m_isHotkeySettingsNeedSave) { return true; } /*Else do nothing, and continue.*/ QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrHotkeyConfig); config.setValue(StrConfigOptions, m_settingsHotKey); config.setValue(StrShowHideMainWidget, m_minToTrayHotKey); config.setValue(StrMinMainWidget, m_openMinWidgetHotKey); config.setValue(StrOpenMusicFile, m_openMusicFileHotKey); config.setValue(StrShowHideMediaWidget, m_openMediaWidgetHotKey); config.setValue(StrShowHideMusicList, m_openListWidgetHotKey); config.setValue(StrShowHideLrc, m_openLrcHotKey); config.setValue(StrPlayPause, m_pauseHotKey); config.setValue(StrPlayPre, m_lastHotKey); config.setValue(StrPlayNext, m_nextHotKey); config.endGroup(); config.sync(); m_isHotkeySettingsNeedSave = false; return (config.status() == QSettings::NoError); } bool GlobalConfig::saveLrcSettingsInfo() { if (!m_isLrcSettingsNeedSave) { return true; } /*Else do nothing, and continue.*/ QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrLrcConfig); config.setValue(StrFontName, m_fontName); config.setValue(StrFontSize, m_fontSize); config.setValue(StrFontType, m_fontType); config.setValue(StrNoPlayShang, m_noPlayShang); config.setValue(StrNoPlayZhong, m_noPlayZhong); config.setValue(StrNoPlayXia, m_noPlayXia); config.setValue(StrPlayedShang, m_playedShang); config.setValue(StrPlayedZhong, m_playedZhong); config.setValue(StrPlayedXia, m_playedXia); config.setValue(StrDefaultChoiceColor, m_defaultChoiceColor); config.setValue(StrShadow, m_shadow); config.endGroup(); config.sync(); m_isLrcSettingsNeedSave = false; return (config.status() == QSettings::NoError); } bool GlobalConfig::savePlayControlSettingsInfo() { if (!m_isPlayControlSettingsNeedSave) { return true; } /*Else do nothing, and continue.*/ QSettings config(QSettings::UserScope, StringOrganization, StringApplication); config.sync(); if ((config.status() != QSettings::NoError) || !config.isWritable()) { return false; } /*Else do nothing, and continue.*/ config.beginGroup(StrPlayControlConfig); config.setValue(StrMute, m_isMute); config.setValue(StrVolume, m_volume); config.setValue(StrPlayMode, m_playMode); config.endGroup(); config.sync(); m_isPlayControlSettingsNeedSave = false; return (config.status() == QSettings::NoError); } void GlobalConfig::setAutoPlayMusic(bool isAutoPlayMusic) { if (m_isAutoPlayMusic != isAutoPlayMusic) { m_isAutoPlayMusic = isAutoPlayMusic; m_isGeneralSettingsNeedSave = true; emit sigAutoPlayMusicChanged(m_isAutoPlayMusic); } /*Else do nothing, and continue.*/ } void GlobalConfig::setAutoRunPlayer(bool isAutoRunPlayer) { if (m_isAutoRunPlayer != isAutoRunPlayer) { m_isAutoRunPlayer = isAutoRunPlayer; m_isGeneralSettingsNeedSave = true; emit sigAutoRunPlayerChanged(m_isAutoRunPlayer); } /*Else do nothing, and continue.*/ } void GlobalConfig::setAutoGreetings(bool isAutoGrettings) { if (m_isAutoGrettings != isAutoGrettings) { m_isAutoGrettings = isAutoGrettings; m_isGeneralSettingsNeedSave = true; emit sigAutoGreetingsChanged(m_isAutoGrettings); } /*Else do nothing, and continue.*/ } void GlobalConfig::setDefaultPlayer(bool isDefaultPlayer) { if (m_isDefaultPlayer != isDefaultPlayer) { m_isDefaultPlayer = isDefaultPlayer; m_isGeneralSettingsNeedSave = true; emit sigDefaultPlayerChanged(m_isDefaultPlayer); } /*Else do nothing, and continue.*/ } bool GlobalConfig::autoPlayMusic() const { return m_isAutoPlayMusic; } bool GlobalConfig::autoRunPlayer() const { return m_isAutoRunPlayer; } bool GlobalConfig::autoGreetings() const { return m_isAutoGrettings; } bool GlobalConfig::defaultPlayer() const { return m_isDefaultPlayer; } void GlobalConfig::setMusicPath(const QString &path) { if (m_musicPath != path) { m_musicPath = path; m_isDownloadSettingsNeedSave = true; emit sigMusicPathChanged(m_musicPath); } /*Else do nothing, and continue.*/ } void GlobalConfig::setAlbumPath(const QString &path) { if (m_albumPath != path) { m_albumPath = path; m_isDownloadSettingsNeedSave = true; emit sigAlbumPathChanged(m_albumPath); } /*Else do nothing, and continue.*/ } void GlobalConfig::setLrcPath(const QString &path) { if (m_lrcPath != path) { m_lrcPath = path; m_isDownloadSettingsNeedSave = true; emit sigLrcPathChanged(m_lrcPath); } /*Else do nothing, and continue.*/ } QString GlobalConfig::musicPath() const { return m_musicPath; } QString GlobalConfig::albumPath() const { return m_albumPath; } QString GlobalConfig::lrcPath() const { return m_lrcPath; } void GlobalConfig::setSettingsHotKey(const QString &hotKey) { if (m_settingsHotKey != hotKey) { m_settingsHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigSettingsHotKeyChanged(m_settingsHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setMinToTrayHotKey(const QString &hotKey) { if (m_minToTrayHotKey != hotKey) { m_minToTrayHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigMinToTrayHotKeyChanged(m_minToTrayHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setOpenMinWidgetHotKey(const QString &hotKey) { if (m_openMinWidgetHotKey != hotKey) { m_openMinWidgetHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigOpenMinWidgetHotKeyChanged(m_openMinWidgetHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setOpenMusicFileHotKey(const QString &hotKey) { if (m_openMusicFileHotKey != hotKey) { m_openMusicFileHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigOpenMusicFileHotKeyChanged(m_openMusicFileHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setOpenMediaWidgetHotKey(const QString &hotKey) { if (m_openMediaWidgetHotKey != hotKey) { m_openMediaWidgetHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigOpenMediaWidgetHotKeyChanged(m_openMediaWidgetHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setOpenListWidgetHotKey(const QString &hotKey) { if (m_openListWidgetHotKey != hotKey) { m_openListWidgetHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigOpenListWidgetHotKeyChanged(m_openListWidgetHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setOpenLrcHotKey(const QString &hotKey) { if (m_openLrcHotKey != hotKey) { m_openLrcHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigOpenLrcHotKeyChanged(m_openLrcHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setPauseHotKey(const QString &hotKey) { if (m_pauseHotKey != hotKey) { m_pauseHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigPauseHotKeyChanged(m_pauseHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setLastHotKey(const QString &hotKey) { if (m_lastHotKey != hotKey) { m_lastHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigLastHotKeyChanged(m_lastHotKey); } /*Else do nothing, and continue.*/ } void GlobalConfig::setNextHotKey(const QString &hotKey) { if (m_nextHotKey != hotKey) { m_nextHotKey = hotKey; m_isHotkeySettingsNeedSave = true; emit sigNextHotKeyChanged(m_nextHotKey); } /*Else do nothing, and continue.*/ } QString GlobalConfig::settingsHotKey() const { return m_settingsHotKey; } QString GlobalConfig::minToTrayHotKey() const { return m_minToTrayHotKey; } QString GlobalConfig::openMinWidgetHotKey() const { return m_openMinWidgetHotKey; } QString GlobalConfig::openMusicFileHotKey() const { return m_openMusicFileHotKey; } QString GlobalConfig::openMediaWidgetHotKey() const { return m_openMediaWidgetHotKey; } QString GlobalConfig::openListWidgetHotKey() const { return m_openListWidgetHotKey; } QString GlobalConfig::openLrcHotKey() const { return m_openLrcHotKey; } QString GlobalConfig::pauseHotKey() const { return m_pauseHotKey; } QString GlobalConfig::lastHotKey() const { return m_lastHotKey; } QString GlobalConfig::nextHotKey() const { return m_nextHotKey; } void GlobalConfig::setFontName(const QString &fontName) { if (m_fontName != fontName) { m_fontName = fontName; m_isLrcSettingsNeedSave = true; emit sigFontNameChanged(m_fontName); } /*Else do nothing, and continue.*/ } void GlobalConfig::setFontSize(const QString &fontSize) { if (m_fontSize != fontSize) { m_fontSize = fontSize; m_isLrcSettingsNeedSave = true; emit sigFontSizeChanged(m_fontSize); } /*Else do nothing, and continue.*/ } void GlobalConfig::setFontType(const QString &fontType) { if (m_fontType != fontType) { m_fontType = fontType; m_isLrcSettingsNeedSave = true; emit sigFontTypeChanged(m_fontType); } /*Else do nothing, and continue.*/ } void GlobalConfig::setNoPlayShang(const QColor &color) { if (m_noPlayShang != color) { m_noPlayShang = color; m_isLrcSettingsNeedSave = true; emit sigNoPlayShangChanged(m_noPlayShang); } /*Else do nothing, and continue.*/ } void GlobalConfig::setNoPlayZhong(const QColor &color) { if (m_noPlayZhong != color) { m_noPlayZhong = color; m_isLrcSettingsNeedSave = true; emit sigNoPlayZhongChanged(m_noPlayZhong); } /*Else do nothing, and continue.*/ } void GlobalConfig::setNoPlayXia(const QColor &color) { if (m_noPlayXia != color) { m_noPlayXia = color; m_isLrcSettingsNeedSave = true; emit sigNoPlayXiaChanged(m_noPlayXia); } /*Else do nothing, and continue.*/ } void GlobalConfig::setPlayedShang(const QColor &color) { if (m_playedShang != color) { m_playedShang = color; m_isLrcSettingsNeedSave = true; emit sigPlayedShangChanged(m_playedShang); } /*Else do nothing, and continue.*/ } void GlobalConfig::setPlayedZhong(const QColor &color) { if (m_playedZhong != color) { m_playedZhong = color; m_isLrcSettingsNeedSave = true; emit sigPlayedZhongChanged(m_playedZhong); } /*Else do nothing, and continue.*/ } void GlobalConfig::setPlayedXia(const QColor &color) { if (m_playedXia != color) { m_playedXia = color; m_isLrcSettingsNeedSave = true; emit sigPlayedXiaChanged(m_playedXia); } /*Else do nothing, and continue.*/ } void GlobalConfig::setDefaultChoiceColor(const QString &color) { if (m_defaultChoiceColor != color) { m_defaultChoiceColor = color; m_isLrcSettingsNeedSave = true; emit sigDefaultChoiceColorChanged(m_defaultChoiceColor); } /*Else do nothing, and continue.*/ } void GlobalConfig::setShadow(const int &shadow) { if (m_shadow != shadow) { m_shadow = shadow; m_isLrcSettingsNeedSave = true; emit sigShadowChanged(m_shadow); } /*Else do nothing, and continue.*/ } QString GlobalConfig::fontName() const { return m_fontName; } QString GlobalConfig::fontSize() const { return m_fontSize; } QString GlobalConfig::fontType() const { return m_fontType; } QColor GlobalConfig::noPlayShang() const { return m_noPlayShang; } QColor GlobalConfig::noPlayZhong() const { return m_noPlayZhong; } QColor GlobalConfig::noPlayXia() const { return m_noPlayXia; } QColor GlobalConfig::playedShang() const { return m_playedShang; } QColor GlobalConfig::playedZhong() const { return m_playedZhong; } QColor GlobalConfig::playedXia() const { return m_playedXia; } QString GlobalConfig::defaultChoiceColor() const { return m_defaultChoiceColor; } int GlobalConfig::shadow() const { return m_shadow; } void GlobalConfig::setMute(bool isMute) { m_isMute = isMute; m_isPlayControlSettingsNeedSave = true; if (!m_isReleaseResource) { emit sigMuteChanged(m_isMute); } /*Else do nothing, and continue.*/ } void GlobalConfig::setVolume(const int &volume) { if (m_volume != volume) { m_volume = volume; m_isPlayControlSettingsNeedSave = true; if (!m_isReleaseResource) { emit sigVolumeChanged(m_volume); } /*Else do nothing, and continue.*/ } /*Else do nothing, and continue.*/ } void GlobalConfig::setPlayMode(enum PlayModeType playMode) { if (m_playMode != playMode) { m_playMode = playMode; m_isPlayControlSettingsNeedSave = true; if (!m_isReleaseResource) { emit sigPlayModeChanged(m_playMode); } /*Else do nothing, and continue.*/ } /*Else do nothing, and continue.*/ } bool GlobalConfig::mute() const { return m_isMute; } int GlobalConfig::volume() const { return m_volume; } enum PlayModeType GlobalConfig::playMode() const { return m_playMode; } ================================================ FILE: ConfigPanel/GlobalConfig.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalConfig.h * \author chengxuan 787280310@qq.com * \date 2015-01-18 * \brief ȫͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-18 by chengxuan * * \endverbatim * */ #ifndef GLOBALCONFIG_H #define GLOBALCONFIG_H /*! \def GLOBALCONFIG_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define GLOBALCONFIG_VERSION 0x030000 #include #include #include /*ϢĬֵ*/ extern const QString FontName; extern const QString FontSize; extern const QString FontType; extern const QColor NoPlayShang; extern const QColor NoPlayZhong; extern const QColor NoPlayXia; extern const QColor PlayedShang; extern const QColor PlayedZhong; extern const QColor PlayedXia; extern const QString DefaultChoiceColor; extern const int Shadow; /*ȼϢĬֵ*/ extern const QString ConfigOptions; extern const QString ShowHideMainWidget; extern const QString MinMainWidget; extern const QString OpenMusicFile; extern const QString ShowHideMediaWidget; extern const QString ShowHideMusicList; extern const QString ShowHideLrc; extern const QString PlayPause; extern const QString PlayPre; extern const QString PlayNext; // extern const QColor NoPlayWhiteShang; extern const QColor NoPlayWhiteZhong; extern const QColor NoPlayWhiteXia; extern const QColor PlayedWhiteShang; extern const QColor PlayedWhiteZhong; extern const QColor PlayedWhiteXia; // extern const QColor NoPlayBlueShang; extern const QColor NoPlayBlueZhong; extern const QColor NoPlayBlueXia; extern const QColor PlayedBlueShang; extern const QColor PlayedBlueZhong; extern const QColor PlayedBlueXia; // extern const QColor NoPlayRedShang; extern const QColor NoPlayRedZhong; extern const QColor NoPlayRedXia; extern const QColor PlayedRedShang; extern const QColor PlayedRedZhong; extern const QColor PlayedRedXia; //ź extern const QColor NoPlayBlackShang; extern const QColor NoPlayBlackZhong; extern const QColor NoPlayBlackXia; extern const QColor PlayedBlackShang; extern const QColor PlayedBlackZhong; extern const QColor PlayedBlackXia; //ɫ extern const QColor NoPlayYellowShang; extern const QColor NoPlayYellowZhong; extern const QColor NoPlayYellowXia; extern const QColor PlayedYellowShang; extern const QColor PlayedYellowZhong; extern const QColor PlayedYellowXia; // extern const QColor NoPlayPurpleShang; extern const QColor NoPlayPurpleZhong; extern const QColor NoPlayPurpleXia; extern const QColor PlayedPurpleShang; extern const QColor PlayedPurpleZhong; extern const QColor PlayedPurpleXia; //Ȼ extern const QColor NoPlayGreenShang; extern const QColor NoPlayGreenZhong; extern const QColor NoPlayGreenXia; extern const QColor PlayedGreenShang; extern const QColor PlayedGreenZhong; extern const QColor PlayedGreenXia; Q_DECLARE_METATYPE(enum PlayModeType) /*! ȫ */ class GlobalConfig : public QObject { Q_OBJECT public: /*! ȡȫֶ \return شעϢö */ static GlobalConfig* instance(); /*! ɾȫֶ \note һڳ˳ǰ delInstance() 򽫵³ */ static void delInstance(); /*! ¼Ϣ * \return trueɹʧ */ bool reload(); /*! Ϣ * \return trueɹʧ */ bool save(); /*! Ƿ * \return isReleaseResourceû */ void setReleaseResource(bool isReleaseResource); /***************************************************************************** get/set *****************************************************************************/ /*! ʱǷԶ * \param isAutoPlayMusic trueԶţȡ */ void setAutoPlayMusic(bool isAutoPlayMusic); /*! ÿǷԶв * \param isAutoRunPlayer trueԶУȡ */ void setAutoRunPlayer(bool isAutoRunPlayer); /*! ʱǷԶк * \param isAutoGrettings trueԶкȡ */ void setAutoGreetings(bool isAutoGrettings); /*! ΪĬϲ * \param isDefaultPlayer trueΪĬϲȡ */ void setDefaultPlayer(bool isDefaultPlayer); /*! ǷʱԶ * \return trueԶţ */ bool autoPlayMusic() const; /*! Ƿ񿪻ǷԶв * \return trueԶУ */ bool autoRunPlayer() const; /*! ǷʱǷԶк * \return trueԶк */ bool autoGreetings() const; /*! ǷΪĬϲ * \return trueĬϲ */ bool defaultPlayer() const; /***************************************************************************** get/set *****************************************************************************/ /*! · * \param path · */ void setMusicPath(const QString &path); /*! ר· * \param path ר· */ void setAlbumPath(const QString &path); /*! · * \param path · */ void setLrcPath(const QString &path); /*! õ· * \return · */ QString musicPath() const; /*! õר· * \return ר· */ QString albumPath() const; /*! õ· * \return · */ QString lrcPath() const; /***************************************************************************** ȼget/set *****************************************************************************/ /*! ѡȼ * \param hotKey ѡȼ */ void setSettingsHotKey(const QString &hotKey); /*! ʾ/ȼ * \param hotKey ʾ/ȼ */ void setMinToTrayHotKey(const QString &hotKey); /*! ģʽ/ȼ * \param hotKey ģʽ/ȼ */ void setOpenMinWidgetHotKey(const QString &hotKey); /*! ôļȼ * \param hotKey ļȼ */ void setOpenMusicFileHotKey(const QString &hotKey); /*! ʾ/ýȼ * \param hotKey ʾ/бȼ */ void setOpenMediaWidgetHotKey(const QString &hotKey); /*! ʾ/ظбȼ * \param hotKey ʾ/ظбȼ */ void setOpenListWidgetHotKey(const QString &hotKey); /*! ʾ/ȼ * \param hotKey ʾ/ȼ */ void setOpenLrcHotKey(const QString &hotKey); /*! ò/ͣȼ * \param hotKey /ͣȼ */ void setPauseHotKey(const QString &hotKey); /*! һȼ * \param hotKey һȼ */ void setLastHotKey(const QString &hotKey); /*! һȼ * \param hotKey һȼ */ void setNextHotKey(const QString &hotKey); /*! õѡȼ * \return ѡȼ */ QString settingsHotKey() const; /*! õʾ/ȼ * \return ʾ/ȼ */ QString minToTrayHotKey() const; /*! õģʽ/ȼ * \return ģʽ/ȼ */ QString openMinWidgetHotKey() const; /*! õļȼ * \return ļȼ */ QString openMusicFileHotKey() const; /*! õʾ/ýȼ * \return ʾ/бȼ */ QString openMediaWidgetHotKey() const; /*! õʾ/ظбȼ * \return ʾ/ظбȼ */ QString openListWidgetHotKey() const; /*! õʾ/ȼ * \return ʾ/ȼ */ QString openLrcHotKey() const; /*! õ/ͣȼı * \return /ͣȼ */ QString pauseHotKey() const; /*! õһȼı * \return һȼ */ QString lastHotKey() const; /*! õһȼı * \return һȼ */ QString nextHotKey() const; /***************************************************************************** get/set *****************************************************************************/ /*! ø * \param fontName */ void setFontName(const QString &fontName); /*! øС * \param fontSize С */ void setFontSize(const QString &fontSize); /*! ø * \param fontType */ void setFontType(const QString &fontType); /*! øûвϱԵɫ * \param color ɫ */ void setNoPlayShang(const QColor &color); /*! øûвмɫ * \param color ɫ */ void setNoPlayZhong(const QColor &color); /*! øûв±Եɫ * \param color ɫ */ void setNoPlayXia(const QColor &color); /*! øʲźϱԵɫ * \param color ɫ */ void setPlayedShang(const QColor &color); /*! øʲźмɫ * \param color ɫ */ void setPlayedZhong(const QColor &color); /*! øʲź±Եɫ * \param color ɫ */ void setPlayedXia(const QColor &color); /*! øĬɫɫ * \param color ɫ */ void setDefaultChoiceColor(const QString &color); /*! øʻҶ * \param shadow Ҷ */ void setShadow(const int &shadow); /*! õ * \return */ QString fontName() const; /*! õС * \return С */ QString fontSize() const; /*! õ * \return */ QString fontType() const; /*! õûвϱԵɫ * \return ɫ */ QColor noPlayShang() const; /*! õûвмɫ * \return ɫ */ QColor noPlayZhong() const; /*! õûв±Եɫ * \return ɫ */ QColor noPlayXia() const; /*! õʲźϱԵɫ * \return ɫ */ QColor playedShang() const; /*! õʲźмɫ * \return ɫ */ QColor playedZhong() const; /*! õʲź±Եɫ * \return ɫ */ QColor playedXia() const; /*! õĬɫ * \return ɫ */ QString defaultChoiceColor() const; /*! õʻҶ * \return Ҷ */ int shadow() const; /***************************************************************************** ſget/set *****************************************************************************/ /*! Ƿ * \param isMute true򲻾 */ void setMute(bool isMute); /*! * \param volume */ void setVolume(const int &volume); /*! ģʽ * \param playMode ģʽ */ void setPlayMode(enum PlayModeType playMode); /*! Ƿ * \return true򲻾 */ bool mute() const; /*! õ * \return */ int volume() const; /*! õ * \return */ enum PlayModeType playMode() const; signals: /***************************************************************************** Ϣı䷢͵ź *****************************************************************************/ /*! Զøı * \param isAutoPlayMusic trueԶţȡ */ void sigAutoPlayMusicChanged(bool isAutoPlayMusic); /*! ǷԶвøı * \param isAutoRunPlayer trueԶУȡ */ void sigAutoRunPlayerChanged(bool isAutoRunPlayer); /*! ʱǷԶкøı * \param isAutoGrettings trueԶкȡ */ void sigAutoGreetingsChanged(bool isAutoGrettings); /*! Ĭϲøı * \param isDefaultPlayer trueΪĬϲȡ */ void sigDefaultPlayerChanged(bool isDefaultPlayer); /***************************************************************************** Ϣı䷢͵ź *****************************************************************************/ /*! ·ı * \param path · */ void sigMusicPathChanged(const QString &path); /*! ר·ı * \param path ר· */ void sigAlbumPathChanged(const QString &path); /*! ·ı * \param path · */ void sigLrcPathChanged(const QString &path); /***************************************************************************** ȼϢı䷢͵ź *****************************************************************************/ /*! ѡȼı * \param hotKey ѡȼ */ void sigSettingsHotKeyChanged(const QString &hotKey); /*! ʾ/ȼı * \param hotKey ʾ/ȼ */ void sigMinToTrayHotKeyChanged(const QString &hotKey); /*! ģʽ/ȼı * \param hotKey ģʽ/ȼ */ void sigOpenMinWidgetHotKeyChanged(const QString &hotKey); /*! ļȼı * \param hotKey ļȼ */ void sigOpenMusicFileHotKeyChanged(const QString &hotKey); /*! ʾ/ýȼı * \param hotKey ʾ/бȼ */ void sigOpenMediaWidgetHotKeyChanged(const QString &hotKey); /*! ʾ/ظбȼı * \param hotKey ʾ/ظбȼ */ void sigOpenListWidgetHotKeyChanged(const QString &hotKey); /*! ʾ/ȼı * \param hotKey ʾ/ȼ */ void sigOpenLrcHotKeyChanged(const QString &hotKey); /*! /ͣȼı * \param hotKey /ͣȼ */ void sigPauseHotKeyChanged(const QString &hotKey); /*! һȼı * \param hotKey һȼ */ void sigLastHotKeyChanged(const QString &hotKey); /*! һȼı * \param hotKey һȼ */ void sigNextHotKeyChanged(const QString &hotKey); /***************************************************************************** Ϣı䷢͵ź *****************************************************************************/ /*! ı * \param fontName */ void sigFontNameChanged(const QString &fontName); /*! Сı * \param fontSize С */ void sigFontSizeChanged(const QString &fontSize); /*! ͸ı * \param fontType */ void sigFontTypeChanged(const QString &fontType); /*! ûвϱԵɫı * \param color ɫ */ void sigNoPlayShangChanged(const QColor &color); /*! ûвмɫı * \param color ɫ */ void sigNoPlayZhongChanged(const QColor &color); /*! ûв±Եɫı * \param color ɫ */ void sigNoPlayXiaChanged(const QColor &color); /*! ʲźϱԵɫı * \param color ɫ */ void sigPlayedShangChanged(const QColor &color); /*! ʲźмɫı * \param color ɫ */ void sigPlayedZhongChanged(const QColor &color); /*! ʲź±Եɫı * \param color ɫ */ void sigPlayedXiaChanged(const QColor &color); /*! Ĭɫı * \param color ɫ */ void sigDefaultChoiceColorChanged(const QString &color); /*! ʻҶȸı * \param shadow Ҷ */ void sigShadowChanged(const int &shadow); /***************************************************************************** ſϢı䷢͵ź *****************************************************************************/ /*! Ƿøı * \param isMute true򲻾 */ void sigMuteChanged(bool isMute); /*! Ƿı * \param volume */ void sigVolumeChanged(const int &volume); /*! ͸ı * \param playMode */ void sigPlayModeChanged(enum PlayModeType playMode); private: /*! 캯.*/ GlobalConfig(); /*! .*/ ~GlobalConfig(); /*! ϵͳע * \return trueɹʧ */ bool createRegedit(); /*! 泣Ϣ * \return trueɹʧ */ bool saveGeneralSettingsInfo(); /*! Ϣ * \return trueɹʧ */ bool saveDownloadSettingsInfo(); /*! ȼϢ * \return trueɹʧ */ bool saveHotkeysSettingsInfo(); /*! Ϣ * \return trueɹʧ */ bool saveLrcSettingsInfo(); /*! 沥ſϢ * \return trueɹʧ */ bool savePlayControlSettingsInfo(); /*! ¼سϢ * \return trueɹʧ */ bool reloadGeneralSettingsInfo(); /*! ¼Ϣ * \return trueɹʧ */ bool reloadDownloadSettingsInfo(); /*! ¼ظϢ * \return trueɹʧ */ bool reloadLrcSettingsInfo(); /*! ¼ȼϢ * \return trueɹʧ */ bool reloadHotkeySettingsInfo(); /*! ¼زſϢ * \return trueɹʧ */ bool reloadPlayControlSettingsInfo(); private: static GlobalConfig* m_instance; /*!< ȫֶ*/ bool m_isReleaseResource; /*!< ǷԴ*/ bool m_isGeneralSettingsNeedSave; /*!< ڼǷҪ*/ bool m_isDownloadSettingsNeedSave; /*!< ڼǷҪ*/ bool m_isLrcSettingsNeedSave; /*!< ڼǷҪ*/ bool m_isHotkeySettingsNeedSave; /*!< ڼǷҪ*/ bool m_isPlayControlSettingsNeedSave; /*!< ڼǷҪ*/ bool m_isAutoPlayMusic; /*!< ʱǷԶ*/ bool m_isAutoRunPlayer; /*!< ǷԶв*/ bool m_isAutoGrettings; /*!< ʱǷԶк*/ bool m_isDefaultPlayer; /*!< ǷĬϲ*/ QString m_musicPath; /*!< ·*/ QString m_albumPath; /*!< ר·*/ QString m_lrcPath; /*!< ·*/ QString m_settingsHotKey; /*!< ѡ*/ QString m_minToTrayHotKey; /*!< ʾ/*/ QString m_openMinWidgetHotKey; /*!< ģʽ/*/ QString m_openMusicFileHotKey; /*!< ļ*/ QString m_openMediaWidgetHotKey; /*!< ʾ/ý*/ QString m_openListWidgetHotKey; /*!< ʾ/ظб*/ QString m_openLrcHotKey; /*!< ʾ/*/ QString m_pauseHotKey; /*!< /ͣ*/ QString m_lastHotKey; /*!< һ*/ QString m_nextHotKey; /*!< һ*/ QString m_fontName; /*!< */ QString m_fontSize; /*!< С*/ QString m_fontType; /*!< */ QColor m_noPlayShang; /*!< ûвϱԵɫ*/ QColor m_noPlayZhong; /*!< ûвмɫ*/ QColor m_noPlayXia; /*!< ûв±Եɫ*/ QColor m_playedShang; /*!< ŹϱԵɫ*/ QColor m_playedZhong; /*!< Źмɫ*/ QColor m_playedXia; /*!< ʱԵɫ*/ QString m_defaultChoiceColor; /*!< Ĭɫ*/ int m_shadow; /*!< Ҷ*/ bool m_isMute; /*!< Ƿ*/ int m_volume; /*!< С*/ enum PlayModeType m_playMode; /*!< ģʽ*/ }; #endif // GLOBALCONFIG_H ================================================ FILE: ConfigPanel/HotkeysSettingsPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file HotKeysSettingsPage.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "HotkeysSettingsPage.h" #include "GlobalConfig.h" #include "EditHotkeyDialog.h" #include "NoFocusDelegate.h" #include "TR.h" #include #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif #if EDITHOTKEYDIALOG_VERSION < 0x030000 #error "EditHotkeyDialog version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif HotKeysSettingsPage::HotKeysSettingsPage(QWidget *parent) : QWidget(parent), m_editHotkeyDialog(NULL), m_row(0) { this->createUI(); this->createConnect(); } void HotKeysSettingsPage::handleRecoverDefaultSetting() { if (m_settingsHotKey->text() != ConfigOptions) { m_settingsHotKey->setText(ConfigOptions); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_minToTrayHotKey->text() != ShowHideMainWidget) { m_minToTrayHotKey->setText(ShowHideMainWidget); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_openMinWidgetHotKey->text() != MinMainWidget) { m_openMinWidgetHotKey->setText(MinMainWidget); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_openMusicFileHotKey->text() != OpenMusicFile) { m_openMusicFileHotKey->setText(OpenMusicFile); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_openMediaWidgetHotKey->text() != ShowHideMediaWidget) { m_openMediaWidgetHotKey->setText(ShowHideMediaWidget); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_openListWidgetHotKey->text() != ShowHideMusicList) { m_openListWidgetHotKey->setText(ShowHideMusicList); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_openLrcHotKey->text() != ShowHideLrc) { m_openLrcHotKey->setText(ShowHideLrc); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_pauseHotKey->text() != PlayPause) { m_pauseHotKey->setText(PlayPause); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_lastHotKey->text() != PlayPre) { m_lastHotKey->setText(PlayPre); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ if (m_nextHotKey->text() != PlayNext) { m_nextHotKey->setText(PlayNext); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ } void HotKeysSettingsPage::handleEditHotKeys() { QString currentHotkeyName = m_hotKeysTableWidget->item(m_row, 0)->text(); QString currentHotkey = m_hotKeysTableWidget->item(m_row, 1)->text(); m_editHotkeyDialog->init(currentHotkeyName, currentHotkey); m_editHotkeyDialog->exec(); } void HotKeysSettingsPage::handleTableClicked(const int &index) { m_row = index; } HotKeysSettingsPage::~HotKeysSettingsPage() { if (m_editHotkeyDialog != NULL) { m_editHotkeyDialog->deleteLater(); m_editHotkeyDialog = NULL; } /*Else do nothing, and conintue.*/ } void HotKeysSettingsPage::createUI() { QGroupBox *hotKeysGB = new QGroupBox(TR("ȼ")); //ȼ m_hotKeysTableWidget = new QTableWidget(this); this->setTableWidgetStyle(); //༭ȼԻ if (m_editHotkeyDialog == NULL) { m_editHotkeyDialog = new EditHotkeyDialog(this); } /*Else do nothing, and conintue.*/ //ѡ QTableWidgetItem *settingsAction = new QTableWidgetItem(TR("ѡ")); settingsAction->setTextAlignment(Qt::AlignCenter); m_settingsHotKey = new QTableWidgetItem; m_settingsHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(0);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(0, 0, settingsAction); m_hotKeysTableWidget->setItem(0, 1, m_settingsHotKey); //ʾ/ QTableWidgetItem *minToTrayAction = new QTableWidgetItem(TR("ʾ/")); minToTrayAction->setTextAlignment(Qt::AlignCenter); m_minToTrayHotKey = new QTableWidgetItem; m_minToTrayHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(1);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(1, 0, minToTrayAction); m_hotKeysTableWidget->setItem(1, 1, m_minToTrayHotKey); //ģʽ/ QTableWidgetItem *openMinWidgetAction = new QTableWidgetItem(TR("ģʽ/")); openMinWidgetAction->setTextAlignment(Qt::AlignCenter); m_openMinWidgetHotKey = new QTableWidgetItem; m_openMinWidgetHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(2);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(2, 0, openMinWidgetAction); m_hotKeysTableWidget->setItem(2, 1, m_openMinWidgetHotKey); //ļ QTableWidgetItem *openMusicFileAction = new QTableWidgetItem(TR("ļ")); openMusicFileAction->setTextAlignment(Qt::AlignCenter); m_openMusicFileHotKey = new QTableWidgetItem; m_openMusicFileHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(3);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(3, 0, openMusicFileAction); m_hotKeysTableWidget->setItem(3, 1, m_openMusicFileHotKey); //ʾ/ý QTableWidgetItem *openMediaWidgetAction = new QTableWidgetItem(TR("ʾ/ý")); openMediaWidgetAction->setTextAlignment(Qt::AlignCenter); m_openMediaWidgetHotKey = new QTableWidgetItem; m_openMediaWidgetHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(4);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(4, 0, openMediaWidgetAction); m_hotKeysTableWidget->setItem(4, 1, m_openMediaWidgetHotKey); //ʾ/ظб QTableWidgetItem *openListWidgetAction = new QTableWidgetItem(TR("ʾ/ظб")); openListWidgetAction->setTextAlignment(Qt::AlignCenter); m_openListWidgetHotKey = new QTableWidgetItem; m_openListWidgetHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(5);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(5, 0, openListWidgetAction); m_hotKeysTableWidget->setItem(5, 1, m_openListWidgetHotKey); //ʾ/ QTableWidgetItem *openLrcAction = new QTableWidgetItem(TR("ʾ/")); openLrcAction->setTextAlignment(Qt::AlignCenter); m_openLrcHotKey = new QTableWidgetItem; m_openLrcHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(6);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(6, 0, openLrcAction); m_hotKeysTableWidget->setItem(6, 1, m_openLrcHotKey); ///ͣ QTableWidgetItem *pauseAction = new QTableWidgetItem(TR("/ͣ")); pauseAction->setTextAlignment(Qt::AlignCenter); m_pauseHotKey = new QTableWidgetItem; m_pauseHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(7);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(7, 0, pauseAction); m_hotKeysTableWidget->setItem(7, 1, m_pauseHotKey); //һ QTableWidgetItem *lastAction = new QTableWidgetItem(TR("һ")); lastAction->setTextAlignment(Qt::AlignCenter); m_lastHotKey = new QTableWidgetItem; m_lastHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(8);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(8, 0, lastAction); m_hotKeysTableWidget->setItem(8, 1, m_lastHotKey); //һ QTableWidgetItem *nextAction = new QTableWidgetItem(TR("һ")); nextAction->setTextAlignment(Qt::AlignCenter); m_nextHotKey = new QTableWidgetItem; m_nextHotKey->setTextAlignment(Qt::AlignCenter); m_hotKeysTableWidget->insertRow(9);//Ӳбеĵǰв m_hotKeysTableWidget->setItem(9, 0, nextAction); m_hotKeysTableWidget->setItem(9, 1, m_nextHotKey); //༭ m_editButton = new QPushButton(this); m_editButton->setObjectName("m_editButton"); m_editButton->setText(TR("༭ȼ")); //ָĬ m_recoverDefaultSettingButton = new QPushButton(this); m_recoverDefaultSettingButton->setObjectName("m_recoverDefaultSettingButton"); m_recoverDefaultSettingButton->setText(TR("ָĬȼ")); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addWidget(m_editButton); buttonsLayout->addStretch(); buttonsLayout->addWidget(m_recoverDefaultSettingButton); QVBoxLayout *hotKeysLayout = new QVBoxLayout; hotKeysLayout->addWidget(m_hotKeysTableWidget); hotKeysLayout->addLayout(buttonsLayout); hotKeysGB->setLayout(hotKeysLayout); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(hotKeysGB); this->setLayout(mainLayout); } void HotKeysSettingsPage::createConnect() { connect(m_recoverDefaultSettingButton, SIGNAL(clicked()), this, SLOT(handleRecoverDefaultSetting())); connect(m_editButton, SIGNAL(clicked()), this, SLOT(handleEditHotKeys())); connect(m_hotKeysTableWidget, SIGNAL(cellPressed(int, int)), this, SLOT(handleTableClicked(int))); connect(m_hotKeysTableWidget, SIGNAL(cellDoubleClicked(int, int)), this, SLOT(handleTableDoubleClicked(int, int))); connect(m_editHotkeyDialog, SIGNAL(sigEditHotkeyFinished(QString, QString)), this, SLOT(handleEditHotkeyFinished(QString, QString))); } void HotKeysSettingsPage::setTableWidgetStyle() { //ôڻ m_hotKeysTableWidget->setRowCount(0);//ʼΪ0 m_hotKeysTableWidget->setColumnCount(2);//ʼΪ2 QStringList headList; headList << TR("") << TR("ȫȼ"); m_hotKeysTableWidget->setHorizontalHeaderLabels(headList); //ͷϢ m_hotKeysTableWidget->verticalHeader()->setVisible(false); m_hotKeysTableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); //Զ m_hotKeysTableWidget->horizontalHeader()->setHighlightSections(false); //ʱԱͷйȡ㣩 m_hotKeysTableWidget->horizontalHeader()->setSectionsClickable(false); //Ӧ굥 m_hotKeysTableWidget->setSelectionMode(QAbstractItemView::SingleSelection); //ֻѡе m_hotKeysTableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); //ѡϰΪѡ m_hotKeysTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); //ݲɱ༭ m_hotKeysTableWidget->setShowGrid(false); //òʾ m_hotKeysTableWidget->setItemDelegate(new NoFocusDelegate()); //ȥѡеԪ m_hotKeysTableWidget->setStyleSheet("color: black;"); } void HotKeysSettingsPage::init() { GlobalConfig *config = GlobalConfig::instance(); m_settingsHotKey->setText(config->settingsHotKey()); m_minToTrayHotKey->setText(config->minToTrayHotKey()); m_openMinWidgetHotKey->setText(config->openMinWidgetHotKey()); m_openMusicFileHotKey->setText(config->openMusicFileHotKey()); m_openMediaWidgetHotKey->setText(config->openMediaWidgetHotKey()); m_openListWidgetHotKey->setText(config->openListWidgetHotKey()); m_openLrcHotKey->setText(config->openLrcHotKey()); m_pauseHotKey->setText(config->pauseHotKey()); m_lastHotKey->setText(config->lastHotKey()); m_nextHotKey->setText(config->nextHotKey()); } void HotKeysSettingsPage::apply() { GlobalConfig *config = GlobalConfig::instance(); config->setSettingsHotKey(m_settingsHotKey->text()); config->setMinToTrayHotKey(m_minToTrayHotKey->text()); config->setOpenMinWidgetHotKey(m_openMinWidgetHotKey->text()); config->setOpenMusicFileHotKey(m_openMusicFileHotKey->text()); config->setOpenMediaWidgetHotKey(m_openMediaWidgetHotKey->text()); config->setOpenListWidgetHotKey(m_openListWidgetHotKey->text()); config->setOpenLrcHotKey(m_openLrcHotKey->text()); config->setPauseHotKey(m_pauseHotKey->text()); config->setLastHotKey(m_lastHotKey->text()); config->setNextHotKey(m_nextHotKey->text()); if (!config->save()) { QMessageBox::warning(this, TR(""), TR("ȼϢʧܣ")); } /*Else do nothing, and contine.*/ } void HotKeysSettingsPage::handleEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey) { bool isInvaildHotkey = false; for (int i = 0; i < m_hotKeysTableWidget->rowCount(); ++i) { if (hotKeyName != m_hotKeysTableWidget->item(i, 0)->text() && hotKey == m_hotKeysTableWidget->item(i, 1)->text()) { isInvaildHotkey = true; QMessageBox::information(this, TR("Ϣ"), TR("ȼѾڣ±༭ȼ"), QMessageBox::Yes); break; } /*Else do nothing, and conintue.*/ } if (!isInvaildHotkey) { for (int i = 0; i < m_hotKeysTableWidget->rowCount(); ++i) { if (hotKeyName == m_hotKeysTableWidget->item(i, 0)->text()) { if (hotKey != m_hotKeysTableWidget->item(i, 1)->text()) { m_hotKeysTableWidget->item(i, 1)->setText(hotKey); emit sigHotKeysSettingsChanged(); } /*Else do nothing, and conintue.*/ break; } /*Else do nothing, and conintue.*/ } } } void HotKeysSettingsPage::handleTableDoubleClicked(const int &row, const int &column) { (void)row; (void)column; this->handleEditHotKeys(); } ================================================ FILE: ConfigPanel/HotkeysSettingsPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file HotKeysSettingsPage.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef HOTKEYSSETTINGSPAGE_H #define HOTKEYSSETTINGSPAGE_H /*! \def HOTKEYSSETTINGSPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define HOTKEYSSETTINGSPAGE_VERSION 0x030000 #include #include class QTableWidget; class QPushButton; class QTableWidgetItem; class EditHotkeyDialog; /*! ȼҳ */ class HotKeysSettingsPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ HotKeysSettingsPage(QWidget *parent = NULL); /*! .*/ ~HotKeysSettingsPage(); /*! ʼҳ */ void init(); /*! Ӧøı */ void apply(); signals: /*! ȼϢıʱ͸ź */ void sigHotKeysSettingsChanged(); private slots: /*! ָĬϷ */ void handleRecoverDefaultSetting(); /*! ༭ȼ */ void handleEditHotKeys(); /*! ȡѡ * \param row к */ void handleTableClicked(const int &index); /*! ȼ༭ * \param hotKeyName ȼ * \param hotKey ȼ */ void handleEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey); /*! ˫ȼб༭ȼ * \param row ȼб * \param column ȼб */ void handleTableDoubleClicked(const int &row, const int &column); private: /*! */ void createUI(); /*! ź */ void createConnect(); /*! ñ */ void setTableWidgetStyle(); private: QTableWidget *m_hotKeysTableWidget; /*!< ȼ*/ EditHotkeyDialog *m_editHotkeyDialog; /*!< ȼ༭Ի*/ QPushButton *m_editButton; /*!< ༭ȼ*/ QPushButton *m_recoverDefaultSettingButton; /*!< ָĬ*/ QTableWidgetItem *m_settingsHotKey; /*!< ѡ*/ QTableWidgetItem *m_minToTrayHotKey; /*!< ʾ/*/ QTableWidgetItem *m_openMinWidgetHotKey; /*!< ģʽ/*/ QTableWidgetItem *m_openMusicFileHotKey; /*!< ļ*/ QTableWidgetItem *m_openMediaWidgetHotKey; /*!< ʾ/ý*/ QTableWidgetItem *m_openListWidgetHotKey; /*!< ʾ/ظб*/ QTableWidgetItem *m_openLrcHotKey; /*!< ʾ/*/ QTableWidgetItem *m_pauseHotKey; /*!< /ͣ*/ QTableWidgetItem *m_lastHotKey; /*!< һ*/ QTableWidgetItem *m_nextHotKey; /*!< һ*/ int m_row; /*!< ѡ*/ }; #endif // HOTKEYSSETTINGSPAGE_H ================================================ FILE: ConfigPanel/HotkeysTableWidget.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file HotKeysTableWidget.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "HotkeysTableWidget.h" #include "NoFocusDelegate.h" #include "TR.h" #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif HotKeysTableWidget::HotKeysTableWidget(QWidget *parent) : QTableWidget(parent) { //ôڻ this->setRowCount(0);//ʼΪ0 this->setColumnCount(2);//ʼΪ2 QStringList headList; headList << TR("") << TR("ȫȼ"); this->setHorizontalHeaderLabels(headList); //ͷϢ this->verticalHeader()->setVisible(false); this->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); //Զ this->horizontalHeader()->setHighlightSections(false); //ʱԱͷйȡ㣩 this->horizontalHeader()->setSectionsClickable(false); //Ӧ굥 this->setSelectionMode(QAbstractItemView::SingleSelection); //ֻѡе this->setSelectionBehavior(QAbstractItemView::SelectRows); //ѡϰΪѡ this->setEditTriggers(QAbstractItemView::NoEditTriggers); //ݲɱ༭ this->setShowGrid(false); //òʾ this->setItemDelegate(new NoFocusDelegate()); //ȥѡеԪ this->setStyleSheet("color: black;"); } HotKeysTableWidget::~HotKeysTableWidget() { /*Do nothing.*/ } ================================================ FILE: ConfigPanel/HotkeysTableWidget.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file HotKeysTableWidget.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ȼҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef HOTKEYSTABLEWIDGET_H #define HOTKEYSTABLEWIDGET_H /*! \def HOTKEYSTABLEWIDGET_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define HOTKEYSTABLEWIDGET_VERSION 0x030000 #include /*! ȼҳ */ class HotKeysTableWidget : public QTableWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ HotKeysTableWidget(QWidget *parent = NULL); /*! .*/ ~HotKeysTableWidget(); }; #endif // HOTKEYSTABLEWIDGET_H ================================================ FILE: ConfigPanel/LrcDemo.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file LrcDemo.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ģʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "LrcDemo.h" #include "TR.h" #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif LrcDemo::LrcDemo(QWidget *parent) : QLabel(parent), m_lrcMaskWidth(0), m_shadow(255) { this->setWindowFlags(Qt::FramelessWindowHint); this->setAttribute(Qt::WA_TranslucentBackground); this->resize(500, 60); this->setText(TR("CZPlayer,")); this->setAlignment(Qt::AlignCenter); //ʵԽ m_linearGradient.setStart(0, 10);// //ֵԽ m_maskLinearGradient.setStart(0, 10); m_maskLinearGradient.setFinalStop(0, 40); this->update(); } LrcDemo::~LrcDemo() { /*Do nothing.*/ } void LrcDemo::paintEvent(QPaintEvent *event) { QPainter painter(this); painter.setFont(m_font); //ȻƵײ֣ΪӰʹʾЧҸʸ painter.setPen(QColor(0, 0, 0, m_shadow)); painter.drawText(1, 1, 500, 60, Qt::AlignLeft, text()); //ƽ painter.setPen(QPen(m_linearGradient, 0)); painter.drawText(0, 0, 500, 60, Qt::AlignLeft, text()); //ø painter.setPen(QPen(m_maskLinearGradient, 0)); painter.drawText(0, 0, m_lrcMaskWidth, 60, Qt::AlignLeft, text()); event->accept(); } void LrcDemo::setFontName(const QString &fontName) { m_font.setFamily(fontName); this->update(); } void LrcDemo::setFontSize(const QString &fontSize) { bool ok; int size = fontSize.toInt(&ok); if (ok) { m_font.setPointSize(size); this->setLrcMaskWidth(size * 13 / 2); } else { m_font.setPointSize(30); this->setLrcMaskWidth(30 * 13 / 2); } this->update(); } void LrcDemo::setFontType(const QString &fontType) { if (fontType == TR("")) { m_font.setBold(false); m_font.setItalic(false); } else if (fontType == TR("")) { m_font.setBold(true); m_font.setItalic(false); } else if (fontType == TR("б")) { m_font.setBold(false); m_font.setItalic(true); } else if (fontType == TR(" б")) { m_font.setBold(true); m_font.setItalic(true); } /*Else do nothing, and conintue.*/ this->update(); } void LrcDemo::setLinearGradient(const QColor &color) { m_linearGradient.setColorAt(0.1, color); this->update(); } void LrcDemo::setLinearGradient2(const QColor &color) { m_linearGradient.setColorAt(0.5, color); this->update(); } void LrcDemo::setLinearGradient3(const QColor &color) { m_linearGradient.setColorAt(0.9, color); this->update(); } void LrcDemo::setMaskLinearGradient(const QColor &color) { m_maskLinearGradient.setColorAt(0.1, color); this->update(); } void LrcDemo::setMaskLinearGradient2(const QColor &color) { m_maskLinearGradient.setColorAt(0.5, color); this->update(); } void LrcDemo::setMaskLinearGradient3(const QColor &color) { m_maskLinearGradient.setColorAt(0.9, color); this->update(); } void LrcDemo::setLrcDemoShadow(const int &shadow) { m_shadow = shadow; this->update(); } void LrcDemo::setLrcMaskWidth(const double &maskWidth) { m_lrcMaskWidth = maskWidth; this->update(); } ================================================ FILE: ConfigPanel/LrcDemo.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file LrcDemo.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ģͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef LRCDEMO_H #define LRCDEMO_H /*! \def LRCDEMO_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define LRCDEMO_VERSION 0x030000 #include #include #include #include #include class QPaintEvent; /*! ģ */ class LrcDemo : public QLabel { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ LrcDemo(QWidget *parent = NULL); /*! .*/ ~LrcDemo(); public: /*! ø * \param fontName */ void setFontName(const QString &fontName); /*! øС * \param fontSize С */ void setFontSize(const QString &fontSize); /*! ø * \param fontType */ void setFontType(const QString &fontType); /*! øûвϱԵɫ * \param color ɫ */ void setLinearGradient(const QColor &color); /*! øûвмɫ * \param color ɫ */ void setLinearGradient2(const QColor &color); /*! øûв±Եɫ * \param color ɫ */ void setLinearGradient3(const QColor &color); /*! øʲźϱԵɫ * \param color ɫ */ void setMaskLinearGradient(const QColor &color); /*! øʲźмɫ * \param color ɫ */ void setMaskLinearGradient2(const QColor &color); /*! øʲź±Եɫ * \param color ɫ */ void setMaskLinearGradient3(const QColor &color); /*! øʻҶ * \param shadow Ҷ */ void setLrcDemoShadow(const int &shadow); protected: /*! 麯ʵpaintEvent * \param event QPaintEvent */ virtual void paintEvent(QPaintEvent *event); private: /*! mask * \param maskWidth mask */ void setLrcMaskWidth(const double &maskWidth); private: QLinearGradient m_linearGradient; /*!< ʵԽ*/ QLinearGradient m_maskLinearGradient; /*!< ʵԽ*/ QFont m_font; /*!< */ double m_lrcMaskWidth; /*!< mask*/ int m_shadow; /*!< Ҷ*/ }; #endif // LRCDEMO_H ================================================ FILE: ConfigPanel/LrcSettingsPage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file LrcSettingsPage.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "LrcSettingsPage.h" #include "LrcDemo.h" #include "GlobalConfig.h" #include "Global.h" #include "TR.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if LRCDEMO_VERSION < 0x030000 #error "LrcDemo version error." #endif #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif #if GLOBAL_VERSION < 0x030000 #error "Global version error." #endif #if TR_VERSION < 0x030000 #error "TR version error." #endif LrcSettingsPage::LrcSettingsPage(QWidget *parnet) : QWidget(parnet), m_lrcDemo(NULL) { this->createUI(); this->createConnect(); } LrcSettingsPage::~LrcSettingsPage() { if (m_lrcDemo != NULL) { m_lrcDemo->deleteLater(); m_lrcDemo = NULL; } /*Else do nothing, and conintue.*/ } void LrcSettingsPage::init() { GlobalConfig *config = GlobalConfig::instance(); m_fontNameCombo->setCurrentText(config->fontName()); m_fontSizeCombo->setCurrentText(config->fontSize()); m_fontTypeCombo->setCurrentText(config->fontType()); m_noPlayShang = config->noPlayShang(); this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = config->noPlayZhong(); this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = config->noPlayXia(); this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = config->playedShang(); this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = config->playedZhong(); this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = config->playedXia(); this->setLineEditColor(m_playedEdit3, m_playedXia); m_shadowSlider->setValue(config->shadow()); this->setDefaultChoiceColor(config->defaultChoiceColor()); } void LrcSettingsPage::apply() { GlobalConfig *config = GlobalConfig::instance(); config->setFontName(m_fontNameCombo->currentText()); config->setFontSize(m_fontSizeCombo->currentText()); config->setFontType(m_fontTypeCombo->currentText()); config->setNoPlayShang(m_noPlayShang); config->setNoPlayZhong(m_noPlayZhong); config->setNoPlayXia(m_noPlayXia); config->setPlayedShang(m_playedShang); config->setPlayedZhong(m_playedZhong); config->setPlayedXia(m_playedXia); config->setDefaultChoiceColor(m_defaultChoiceColor); config->setShadow(m_shadowSlider->value()); if (!config->save()) { QMessageBox::warning(this, TR(""), TR("Ϣʧܣ")); } /*Else do nothing, and contine.*/ } void LrcSettingsPage::createUI() { // QGroupBox *fontGB = new QGroupBox(TR("")); m_fontLabel = new QLabel(this); m_fontLabel->setObjectName("m_fontLabel"); m_fontLabel->setText(TR("")); m_fontNameCombo = new QComboBox(this); QFontDatabase font; //ȡϵͳʾĵ QStringList fontList = font.families(); m_fontNameCombo->addItems(fontList); //С m_fontSizeLabel = new QLabel(this); m_fontSizeLabel->setObjectName("m_fontSizeLabel"); m_fontSizeLabel->setText(TR("ֺ")); m_fontSizeCombo = new QComboBox(this); QStringList fontSizeList; QString fontSizeStr; for (int i = 14; i <= 72; ++i) { fontSizeStr = QString::number(i, 10); fontSizeList << fontSizeStr; } m_fontSizeCombo->addItems(fontSizeList); // m_fontTypeLabel = new QLabel(this); m_fontTypeLabel->setObjectName("m_fontTypeLabel"); m_fontTypeLabel->setText(TR("")); m_fontTypeCombo = new QComboBox(this); QStringList fontTypeList; fontTypeList << TR("") << TR("") << TR("б") << TR(" б"); m_fontTypeCombo->addItems(fontTypeList); //ɫ QGroupBox *colorGB = new QGroupBox(TR("ɫ")); //δ QGroupBox *noPlayGB = new QGroupBox(TR("δ")); m_noPlayEdit = new QLineEdit(this); m_noPlayEdit->setObjectName("m_noPlayEdit"); m_noPlayEdit->setReadOnly(true); m_noPlayEdit2 = new QLineEdit(this); m_noPlayEdit2->setObjectName("m_noPlayEdit3"); m_noPlayEdit2->setReadOnly(true); m_noPlayEdit3 = new QLineEdit(this); m_noPlayEdit3->setObjectName("m_noPlayEdit3"); m_noPlayEdit3->setReadOnly(true); //ϲɫ m_changeNoPlayButton = new QPushButton(this); m_changeNoPlayButton->setObjectName("m_changeNoPlayButton"); m_changeNoPlayButton->setText(TR("ϲɫ")); //вɫ m_changeNoPlayButton2 = new QPushButton(this); m_changeNoPlayButton2->setObjectName("m_changeNoPlayButton2"); m_changeNoPlayButton2->setText(TR("вɫ")); //²ɫ m_changeNoPlayButton3 = new QPushButton(this); m_changeNoPlayButton3->setObjectName("m_changeNoPlayButton3"); m_changeNoPlayButton3->setText(TR("²ɫ")); //Ѳ QGroupBox *playedGB = new QGroupBox(TR("Ѳ")); m_playedEdit = new QLineEdit(this); m_playedEdit->setObjectName("m_playedEdit"); m_playedEdit->setReadOnly(true); m_playedEdit2 = new QLineEdit(this); m_playedEdit2->setObjectName("m_playedEdit2"); m_playedEdit2->setReadOnly(true); m_playedEdit3 = new QLineEdit(this); m_playedEdit3->setObjectName("m_playedEdit3"); m_playedEdit3->setReadOnly(true); //ϲɫ m_changePlayedButton = new QPushButton(this); m_changePlayedButton->setObjectName("m_changePlayedButton"); m_changePlayedButton->setText(TR("ϲɫ")); //вɫ m_changePlayedButton2 = new QPushButton(this); m_changePlayedButton2->setObjectName("m_changePlayedButton2"); m_changePlayedButton2->setText(TR("вɫ")); //²ɫ m_changePlayedButton3 = new QPushButton(this); m_changePlayedButton3->setObjectName("m_changePlayedButton3"); m_changePlayedButton3->setText(TR("²ɫ")); //Ԥ跽 m_yuSheButton = new QPushButton(this); m_yuSheButton->setObjectName("m_yuSheButton"); m_yuSheButton->setText(TR("Ԥ跽")); //ָĬϷ m_recoverDefaultColorButton = new QPushButton(this); m_recoverDefaultColorButton->setObjectName("m_recoverDefaultColorButton"); m_recoverDefaultColorButton->setText(TR("ָĬϷ")); //Ҷʾ QGroupBox *shadowGB = new QGroupBox(TR("ӰЧ")); m_shadowLabel = new QLabel(this); m_shadowLabel->setObjectName("m_shadowLabel"); m_shadowLabel->setText(TR("ӰЧ")); m_shadowSlider = new QSlider(Qt::Horizontal, this); m_shadowSlider->setObjectName("m_shadowSlider"); m_shadowSlider->setRange(0, 255); m_shadowSpinBox = new QSpinBox(this); m_shadowSpinBox->setObjectName("m_shadowSpinBox"); m_shadowSpinBox->setRange(0, 255); //ģʾ if (m_lrcDemo == NULL) { m_lrcDemo = new LrcDemo(this); m_lrcDemo->resize(300, 60); } /*Else do nothing, and continue.*/ // m_jingDianWhite = new QAction(this); m_jingDianWhite->setText(TR("")); m_jingDianWhite->setIcon(QIcon(ImagesDir + "jingDianWhite.png")); // m_haiYangBlue = new QAction(this); m_haiYangBlue->setText(TR("")); m_haiYangBlue->setIcon(QIcon(ImagesDir + "haiYangBlue.png")); // m_huoYanRed = new QAction(this); m_huoYanRed->setText(TR("")); m_huoYanRed->setIcon(QIcon(ImagesDir + "huoYanRed.png")); //ź m_kuXuanBlack = new QAction(this); m_kuXuanBlack->setText(TR("ź")); m_kuXuanBlack->setIcon(QIcon(ImagesDir + "kuXuanBlack.png")); //ɫ m_qiuSeYellow = new QAction(this); m_qiuSeYellow->setText(TR("ɫ")); m_qiuSeYellow->setIcon(QIcon(ImagesDir + "qiuSeYellow.png")); // m_langManPurple = new QAction(this); m_langManPurple->setText(TR("")); m_langManPurple->setIcon(QIcon(ImagesDir + "langManPurple.png")); //Ȼ m_ziRanGreen = new QAction(this); m_ziRanGreen->setText(TR("Ȼ")); m_ziRanGreen->setIcon(QIcon(ImagesDir + "ziRanGreen.png")); m_presetMenu.addAction(m_jingDianWhite); m_presetMenu.addAction(m_haiYangBlue); m_presetMenu.addAction(m_huoYanRed); m_presetMenu.addAction(m_kuXuanBlack); m_presetMenu.addAction(m_qiuSeYellow); m_presetMenu.addAction(m_langManPurple); m_presetMenu.addAction(m_ziRanGreen); QHBoxLayout *fontLayout = new QHBoxLayout; fontLayout->addWidget(m_fontLabel); fontLayout->addWidget(m_fontNameCombo); fontLayout->addStretch(); fontLayout->addWidget(m_fontSizeLabel); fontLayout->addWidget(m_fontSizeCombo); fontLayout->addStretch(); fontLayout->addWidget(m_fontTypeLabel); fontLayout->addWidget(m_fontTypeCombo); fontGB->setLayout(fontLayout); QGridLayout *noPlayLayout = new QGridLayout; noPlayLayout->addWidget(m_noPlayEdit, 0, 0); noPlayLayout->addWidget(m_changeNoPlayButton, 0, 1); noPlayLayout->addWidget(m_noPlayEdit2, 1, 0); noPlayLayout->addWidget(m_changeNoPlayButton2, 1, 1); noPlayLayout->addWidget(m_noPlayEdit3, 2, 0); noPlayLayout->addWidget(m_changeNoPlayButton3, 2, 1); noPlayGB->setLayout(noPlayLayout); QGridLayout *playedLayout = new QGridLayout; playedLayout->addWidget(m_playedEdit, 0, 0); playedLayout->addWidget(m_changePlayedButton, 0, 1); playedLayout->addWidget(m_playedEdit2, 1, 0); playedLayout->addWidget(m_changePlayedButton2, 1, 1); playedLayout->addWidget(m_playedEdit3, 2, 0); playedLayout->addWidget(m_changePlayedButton3, 2, 1); playedGB->setLayout(playedLayout); QHBoxLayout *shadowLayout = new QHBoxLayout; shadowLayout->addWidget(m_shadowLabel); shadowLayout->addWidget(m_shadowSlider); shadowLayout->addWidget(m_shadowSpinBox); shadowLayout->addStretch(); shadowGB->setLayout(shadowLayout); QHBoxLayout *colorLayout = new QHBoxLayout; colorLayout->addWidget(noPlayGB); colorLayout->addStretch(); colorLayout->addWidget(playedGB); QHBoxLayout *buttonsLayout = new QHBoxLayout; buttonsLayout->addWidget(m_yuSheButton); buttonsLayout->addStretch(); buttonsLayout->addWidget(m_recoverDefaultColorButton); QVBoxLayout *colorLayout2 = new QVBoxLayout; colorLayout2->addLayout(colorLayout); colorLayout2->addLayout(buttonsLayout); colorGB->setLayout(colorLayout2); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(fontGB); mainLayout->addWidget(colorGB); mainLayout->addWidget(shadowGB); mainLayout->addWidget(m_lrcDemo); this->setLayout(mainLayout); } void LrcSettingsPage::createConnect() { connect(m_changeNoPlayButton, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_changeNoPlayButton2, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_changeNoPlayButton3, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_changePlayedButton, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_changePlayedButton2, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_changePlayedButton3, SIGNAL(clicked()), this, SLOT(handleChangeColor())); connect(m_jingDianWhite, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_haiYangBlue, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_huoYanRed, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_kuXuanBlack, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_qiuSeYellow, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_langManPurple, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_ziRanGreen, SIGNAL(triggered()), this, SLOT(handlePresetColorChanged())); connect(m_yuSheButton, SIGNAL(clicked()), this, SLOT(handlePresetColor())); connect(m_recoverDefaultColorButton, SIGNAL(clicked()), this, SLOT(handleRecoverDefaultSetting())); connect(m_fontNameCombo, SIGNAL(currentTextChanged(QString)), this, SLOT(handleFontNameChanged(QString))); connect(m_fontSizeCombo, SIGNAL(currentTextChanged(QString)), this, SLOT(handleFontSizeChanged(QString))); connect(m_fontTypeCombo, SIGNAL(currentTextChanged(QString)), this, SLOT(handleFontTypeChanged(QString))); connect(m_noPlayEdit, SIGNAL(textChanged(QString)), this, SLOT(handleNoPlayShangColorChanged())); connect(m_noPlayEdit2, SIGNAL(textChanged(QString)), this, SLOT(handleNoPlayZhongColorChanged())); connect(m_noPlayEdit3, SIGNAL(textChanged(QString)), this, SLOT(handleNoPlayXiaColorChanged())); connect(m_playedEdit, SIGNAL(textChanged(QString)), this, SLOT(handlePlayedShangColorChanged())); connect(m_playedEdit2, SIGNAL(textChanged(QString)), this, SLOT(handlePlayedZhongColorChanged())); connect(m_playedEdit3, SIGNAL(textChanged(QString)), this, SLOT(handlePlayedXiaColorChanged())); //sliderspinboxֵͬ connect(m_shadowSlider, SIGNAL(valueChanged(int)), m_shadowSpinBox, SLOT(setValue(int))); connect(m_shadowSpinBox, SIGNAL(valueChanged(int)), m_shadowSlider, SLOT(setValue(int))); connect(m_shadowSlider, SIGNAL(valueChanged(int)), this, SLOT(handleShadowChanged(int))); } void LrcSettingsPage::setLineEditColor(QLineEdit *lineEdit, const QColor &color) { lineEdit->setText(QString("rgb(%1,%2,%3)").arg(color.red()) .arg(color.green()) .arg(color.blue())); lineEdit->setStyleSheet(QString("background-color: rgb(%1, %2, %3)").arg(color.red()) .arg(color.green()) .arg(color.blue())); } void LrcSettingsPage::handleChangeColor() { QPushButton *button = dynamic_cast(sender()); QColor preColor; if (button == m_changeNoPlayButton) { preColor = m_noPlayShang; } else if (button == m_changeNoPlayButton2) { preColor = m_noPlayZhong; } else if (button == m_changeNoPlayButton3) { preColor = m_noPlayXia; } else if (button == m_changePlayedButton) { preColor = m_playedShang; } else if (button == m_changePlayedButton2) { preColor = m_playedZhong; } else if (button == m_changePlayedButton3) { preColor = m_playedXia; } /*Else do nothing, and conintue.*/ QColor color = QColorDialog::getColor(preColor, this, TR("ѡɫ"), QColorDialog::DontUseNativeDialog); if (color.isValid()) { QString colorStr = QString("rgb(%1,%2,%3)").arg(color.red()) .arg(color.green()) .arg(color.blue()); QString colorStyleSheet = QString("background-color: rgb(%1, %2, %3)").arg(color.red()) .arg(color.green()) .arg(color.blue()); if (button == m_changeNoPlayButton) { m_noPlayShang = color; m_noPlayEdit->setText(colorStr); m_noPlayEdit->setStyleSheet(colorStyleSheet); } else if (button == m_changeNoPlayButton2) { m_noPlayZhong = color; m_noPlayEdit2->setText(colorStr); m_noPlayEdit2->setStyleSheet(colorStyleSheet); } else if (button == m_changeNoPlayButton3) { m_noPlayXia = color; m_noPlayEdit3->setText(colorStr); m_noPlayEdit3->setStyleSheet(colorStyleSheet); } else if (button == m_changePlayedButton) { m_playedShang = color; m_playedEdit->setText(colorStr); m_playedEdit->setStyleSheet(colorStyleSheet); } else if (button == m_changePlayedButton2) { m_playedZhong = color; m_playedEdit2->setText(colorStr); m_playedEdit2->setStyleSheet(colorStyleSheet); } else if (button == m_changePlayedButton3) { m_playedXia = color; m_playedEdit3->setText(colorStr); m_playedEdit3->setStyleSheet(colorStyleSheet); } /*Else do nothing, and conintue.*/ } /*Else do nothing, and conintue.*/ } void LrcSettingsPage::handleFontNameChanged(const QString &fontName) { m_lrcDemo->setFontName(fontName); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handleFontSizeChanged(const QString &fontSize) { m_lrcDemo->setFontSize(fontSize); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handleFontTypeChanged(const QString &fontType) { m_lrcDemo->setFontType(fontType); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handleNoPlayShangColorChanged() { m_lrcDemo->setLinearGradient(m_noPlayShang); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handleNoPlayZhongColorChanged() { m_lrcDemo->setLinearGradient2(m_noPlayZhong); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handleNoPlayXiaColorChanged() { m_lrcDemo->setLinearGradient3(m_noPlayXia); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handlePlayedShangColorChanged() { m_lrcDemo->setMaskLinearGradient(m_playedShang); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handlePlayedZhongColorChanged() { m_lrcDemo->setMaskLinearGradient2(m_playedZhong); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handlePlayedXiaColorChanged() { m_lrcDemo->setMaskLinearGradient3(m_playedXia); emit sigLrcSettingsChanged(); } void LrcSettingsPage::handlePresetColor() { m_presetMenu.exec(QCursor::pos()); } void LrcSettingsPage::handleRecoverDefaultSetting() { m_fontNameCombo->setCurrentText(FontName); m_fontSizeCombo->setCurrentText(FontSize); m_fontTypeCombo->setCurrentText(FontType); m_noPlayShang = NoPlayShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedXia; this->setLineEditColor(m_playedEdit3, m_playedXia); m_shadowSlider->setValue(Shadow); m_defaultChoiceColor = ""; m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } void LrcSettingsPage::handlePresetColorChanged() { QAction *action = dynamic_cast(sender()); // if (action == m_jingDianWhite) { m_defaultChoiceColor = TR(""); m_jingDianWhite->setText(TR(" ")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayWhiteShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayWhiteZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayWhiteXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedWhiteShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedWhiteZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedWhiteXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } // else if (action == m_haiYangBlue) { m_defaultChoiceColor = TR(""); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR(" ")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayBlueShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayBlueZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayBlueXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedBlueShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedBlueZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedBlueXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } // else if (action == m_huoYanRed) { m_defaultChoiceColor = TR(""); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR(" ")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayRedShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayRedZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayRedXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedRedShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedRedZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedRedXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } //ź else if (action == m_kuXuanBlack) { m_defaultChoiceColor = TR("ź"); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź ")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayBlackShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayBlackZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayBlackXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedBlackShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedBlackZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedBlackXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } //ɫ else if (action == m_qiuSeYellow) { m_defaultChoiceColor = TR("ɫ"); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayYellowShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayYellowZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayYellowXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedYellowShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedYellowZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedYellowXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } // else if (action == m_langManPurple) { m_defaultChoiceColor = TR(""); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR(" ")); m_ziRanGreen->setText(TR("Ȼ")); m_noPlayShang = NoPlayPurpleShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayPurpleZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayPurpleXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedPurpleShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedPurpleZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedPurpleXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } //Ȼ else if (action == m_ziRanGreen) { m_defaultChoiceColor = TR("Ȼ"); m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ ")); m_noPlayShang = NoPlayGreenShang; this->setLineEditColor(m_noPlayEdit, m_noPlayShang); m_noPlayZhong = NoPlayGreenZhong; this->setLineEditColor(m_noPlayEdit2, m_noPlayZhong); m_noPlayXia = NoPlayGreenXia; this->setLineEditColor(m_noPlayEdit3, m_noPlayXia); m_playedShang = PlayedGreenShang; this->setLineEditColor(m_playedEdit, m_playedShang); m_playedZhong = PlayedGreenZhong; this->setLineEditColor(m_playedEdit2, m_playedZhong); m_playedXia = PlayedGreenXia; this->setLineEditColor(m_playedEdit3, m_playedXia); } /*Else do nothing, and conintue.*/ } void LrcSettingsPage::handleShadowChanged(const int &shadow) { m_lrcDemo->setLrcDemoShadow(shadow); emit sigLrcSettingsChanged(); } void LrcSettingsPage::setDefaultChoiceColor(const QString &color) { m_defaultChoiceColor = color; if (color == TR("")) { m_jingDianWhite->setText(TR(" ")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR(" ")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR(" ")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("ź")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź ")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("ɫ")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR(" ")); m_ziRanGreen->setText(TR("Ȼ")); } else if (color == TR("Ȼ")) { m_jingDianWhite->setText(TR("")); m_haiYangBlue->setText(TR("")); m_huoYanRed->setText(TR("")); m_kuXuanBlack->setText(TR("ź")); m_qiuSeYellow->setText(TR("ɫ")); m_langManPurple->setText(TR("")); m_ziRanGreen->setText(TR("Ȼ ")); } /*Else do nothing, and conintue.*/ } ================================================ FILE: ConfigPanel/LrcSettingsPage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file LrcSettingsPage.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef LRCSETTINGSPAGE_H #define LRCSETTINGSPAGE_H /*! \def LRCSETTINGSPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define LRCSETTINGSPAGE_VERSION 0x030000 #include #include #include #include class LrcDemo; class QLabel; class QSpinBox; class QLineEdit; class QSlider; class QPushButton; class QAction; class QComboBox; /*! ҳ */ class LrcSettingsPage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ LrcSettingsPage(QWidget *parent = NULL); /*! .*/ ~LrcSettingsPage(); /*! ʼҳ */ void init(); /*! Ӧøı */ void apply(); signals: /*! ʽϢıʱ͸ź */ void sigLrcSettingsChanged(); private slots: /*! ıɫ */ void handleChangeColor(); /*! ı * \param fontName */ void handleFontNameChanged(const QString &fontName); /*! Сı * \param fontSize С */ void handleFontSizeChanged(const QString &fontSize); /*! ͸ı * \param fontType */ void handleFontTypeChanged(const QString &fontType); /*! ûвϱԵɫı */ void handleNoPlayShangColorChanged(); /*! ûвмɫı */ void handleNoPlayZhongColorChanged(); /*! ûв±Եɫı */ void handleNoPlayXiaColorChanged(); /*! ʲźϱԵɫı */ void handlePlayedShangColorChanged(); /*! ʲźмɫı */ void handlePlayedZhongColorChanged(); /*! ʲź±Եɫı */ void handlePlayedXiaColorChanged(); /*! ѡԤɫ */ void handlePresetColor(); /*! ָĬ */ void handleRecoverDefaultSetting(); /*! Ԥɫı */ void handlePresetColorChanged(); /*! ʻҶȸı */ void handleShadowChanged(const int &shadow); private: /*! */ void createUI(); /*! ź */ void createConnect(); /*! ıQLineEditɫ * \param lineEdit QLineEditָ * \param color ɫ */ void setLineEditColor(QLineEdit *lineEdit, const QColor &color); /*! Ԥɫ * \param color ɫ */ void setDefaultChoiceColor(const QString &color); private: LrcDemo *m_lrcDemo; /*!< Demo*/ QLabel *m_fontLabel; /*!< */ QComboBox *m_fontNameCombo; /*!< */ QLabel *m_fontSizeLabel; /*!< С*/ QComboBox *m_fontSizeCombo; /*!< С*/ QLabel *m_fontTypeLabel; /*!< */ QComboBox *m_fontTypeCombo; /*!< */ QLabel *m_shadowLabel; /*!< Ҷ*/ QSlider *m_shadowSlider; /*!< Ҷ*/ QSpinBox *m_shadowSpinBox; /*!< Ҷ*/ QLineEdit *m_noPlayEdit; /*!< ûвϱԵɫ*/ QPushButton *m_changeNoPlayButton; /*!< ûвϱԵɫ*/ QColor m_noPlayShang; /*!< ûвϱԵɫ*/ QLineEdit *m_noPlayEdit2; /*!< ûвмɫ*/ QPushButton *m_changeNoPlayButton2; /*!< ûвмɫ*/ QColor m_noPlayZhong; /*!< ûвмɫ*/ QLineEdit *m_noPlayEdit3; /*!< ûв±Եɫ*/ QPushButton *m_changeNoPlayButton3; /*!< ûв±Եɫ*/ QColor m_noPlayXia; /*!< ûв±Եɫ*/ QLineEdit *m_playedEdit; /*!< ŹϱԵɫ*/ QPushButton *m_changePlayedButton; /*!< ŹϱԵɫ*/ QColor m_playedShang; /*!< ŹϱԵɫ*/ QLineEdit *m_playedEdit2; /*!< Źмɫ*/ QPushButton *m_changePlayedButton2; /*!< Źмɫ*/ QColor m_playedZhong; /*!< Źмɫ*/ QLineEdit *m_playedEdit3; /*!< ʱԵɫ*/ QPushButton *m_changePlayedButton3; /*!< ʱԵɫ*/ QColor m_playedXia; /*!< ʱԵɫ*/ QPushButton *m_yuSheButton; /*!< Ԥɫ*/ QPushButton *m_recoverDefaultColorButton; /*!< ָĬɫ*/ QMenu m_presetMenu; /*!< Ԥɫ*/ QString m_defaultChoiceColor; /*!< ԤĬɫ*/ QAction *m_jingDianWhite; /*!< */ QAction *m_haiYangBlue; /*!< */ QAction *m_huoYanRed; /*!< */ QAction *m_kuXuanBlack; /*!< ź*/ QAction *m_qiuSeYellow; /*!< ɫ*/ QAction *m_langManPurple; /*!< */ QAction *m_ziRanGreen; /*!< Ȼ*/ }; #endif // LRCSETTINGSPAGE_H ================================================ FILE: ConfigPanel/UpdatePage.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file UpdatePage.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #include "UpdatePage.h" #include "TR.h" #include #include #include #include #include #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif /***************************************************************************** ȫֱ *****************************************************************************/ const QString AutoUpdatePath = "./AutoUpdate/AutoUpdate.exe"; /*!< ·*/ UpdatePage::UpdatePage(QWidget *parent) : QWidget(parent) { this->createUI(); this->createConnect(); } UpdatePage::~UpdatePage(void) { /*Do nothing.*/ } void UpdatePage::createUI() { QGroupBox *updateGB = new QGroupBox(TR(""), this); //Ϣ m_updateInfoLabel = new QLabel(this); m_updateInfoLabel->setText(TR("ʹõİ汾V3.0 ʱ:20140718")); //ʼ°ť m_updateButton = new QPushButton(this); m_updateButton->setText(TR("ֶ°汾")); QHBoxLayout *hLayout = new QHBoxLayout; hLayout->addWidget(m_updateInfoLabel); hLayout->addStretch(); QHBoxLayout *hLayout2 = new QHBoxLayout; hLayout2->addWidget(m_updateButton); hLayout2->addStretch(); QVBoxLayout *vLayout = new QVBoxLayout; vLayout->addLayout(hLayout); vLayout->addLayout(hLayout2); updateGB->setLayout(vLayout); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(updateGB); mainLayout->addStretch(); this->setLayout(mainLayout); } void UpdatePage::createConnect() { connect(m_updateButton, SIGNAL(clicked()), this, SLOT(handleUpdate())); } void UpdatePage::handleUpdate() { unsigned long processId = GetCurrentProcessId(); QStringList idList; idList << QString::number(processId); if (!QProcess::startDetached(AutoUpdatePath, idList)) { QMessageBox::information(this, TR("Ϣ"), TR("ʧܣȷϳ·Ƿȷ"), QMessageBox::Yes); } /*Else do nothing, and continue.*/ } ================================================ FILE: ConfigPanel/UpdatePage.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file UpdatePage.h * \author chengxuan 787280310@qq.com * \date 2015-01-24 * \brief ҳͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-24 by chengxuan * * \endverbatim * */ #ifndef UPDATEPAGE_H #define UPDATEPAGE_H /*! \def UPDATEPAGE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define UPDATEPAGE_VERSION 0x030000 #include class QLabel; class QPushButton; /*! ҳ */ class UpdatePage : public QWidget { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ UpdatePage(QWidget *parent = NULL); /*! .*/ ~UpdatePage(void); private slots: /*! */ void handleUpdate(); private: /*! */ void createUI(); /*! ź */ void createConnect(); private: QLabel *m_updateInfoLabel; /*!< Ϣ*/ QPushButton *m_updateButton; /*!< ʼ°ť*/ }; #endif //UPDATEPAGE_H ================================================ FILE: Copyright ================================================
================================================ FILE: Core/AutoStart.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AutoStart.cpp * \author chengxuan 787280310@qq.com * \date 2015-05-01 * \brief ʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-01 by chengxuan * * \endverbatim * */ #include "AutoStart.h" #include #include #ifdef CZ_DEBUG #include #endif /***************************************************************************** ȫֱ *****************************************************************************/ /*! ע:·*/ const QString Path = "Software\\Microsoft\\Windows\\CurrentVersion\\Run"; AutoStart::AutoStart() { /*Do nothing.*/ } AutoStart::~AutoStart() { /*Do nothing.*/ } void AutoStart::autoStart(WCHAR *value) { WCHAR system[MAX_PATH]; //ϵͳĿ¼· WCHAR filePath[MAX_PATH]; //Ҫеļ· WCHAR fileName[MAX_PATH]; //ļ(\CZPlayer.exe) //õǰִļȫ· HMODULE hModule = GetModuleHandle(NULL); GetModuleFileName(hModule, filePath, sizeof(filePath)); //õļ for (int i = lstrlen(filePath) - 1; i >= 0; --i) { if (filePath[i] == '\\') { lstrcpy(fileName, &filePath[i]); break; } /*Else do nothing, and continue.*/ } //õϵͳļĿ¼·c:\windows\system32 GetSystemDirectory(system, sizeof(system)); //γҪƵȫ·c:\windows\system32\CZPlayer.exe wcscat_s(system, fileName); //ҸƵĿ· CopyFile(filePath, system, false); //дעԱ㿪Զ HKEY hKey; //ע if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (wchar_t*)Path.utf16(), 0, KEY_SET_VALUE, &hKey ) == ERROR_SUCCESS) { //һֵ,,ֵΪҪеļ· RegSetValueEx(hKey, value, 0, REG_SZ, (const unsigned char*)system, sizeof(system)); //رע: RegCloseKey(hKey); #ifdef CZ_DEBUG qDebug() << "ÿɹ"; #endif } else { #ifdef CZ_DEBUG qDebug() << "עʧܣ"; qDebug() << __FILE__ << __FUNCTION__ << __LINE__; #endif } } void AutoStart::cancelAutoStart(WCHAR *value) { WCHAR system[MAX_PATH]; //ϵͳĿ¼· WCHAR filePath[MAX_PATH]; //Ҫеļ· WCHAR fileName[MAX_PATH]; //ļ(\CZPlayer.exe) //õǰִļȫ· HMODULE hModule = GetModuleHandle(NULL); GetModuleFileName(hModule, filePath, sizeof(filePath)); //õļ for (int i = lstrlen(filePath) - 1; i >= 0; --i) { if (filePath[i] == '\\') { lstrcpy(fileName, &filePath[i]); break; } /*Else do nothing, and continue.*/ } //õϵͳļĿ¼·c:\windows\system32 GetSystemDirectory(system, sizeof(system)); //γҪƵȫ·c:\windows\system32\CZPlayer.exe wcscat_s(system, fileName); HKEY hKey; DeleteFile(filePath); //ɾӦļ //ע if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (wchar_t*)Path.utf16(), 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) { //ɾֵ RegDeleteValue(hKey, value); //رע RegCloseKey(hKey); #ifdef CZ_DEBUG qDebug() << "ȡɹ"; #endif } else { #ifdef CZ_DEBUG qDebug() << "עʧܣ"; qDebug() << __FILE__ << __FUNCTION__ << __LINE__; #endif } } bool AutoStart::isAutoStart(WCHAR *value) { WCHAR system[MAX_PATH]; //ϵͳĿ¼· WCHAR filePath[MAX_PATH]; //Ҫеļ· WCHAR fileName[MAX_PATH]; //ļ(\CZPlayer.exe) //õǰִļȫ· HMODULE hModule = GetModuleHandle(NULL); GetModuleFileName(hModule, filePath, sizeof(filePath)); //õļ for (int i = lstrlen(filePath) - 1; i >= 0; --i) { if (filePath[i] == '\\') { lstrcpy(fileName, &filePath[i]); break; } /*Else do nothing, and continue.*/ } //õϵͳļĿ¼·c:\windows\system32 GetSystemDirectory(system, sizeof(system)); //γҪƵȫ·c:\windows\system32\CZPlayer.exe wcscat_s(system, fileName); HKEY hKey; bool bIsAutoStart =false; //ע if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (wchar_t*)Path.utf16(), 0, KEY_READ, &hKey) == ERROR_SUCCESS) { WCHAR wData[MAX_PATH]; DWORD dwLen = MAX_PATH * sizeof(WCHAR); if (RegQueryValueEx(hKey, value, 0, 0, (BYTE*)wData, &dwLen) == ERROR_SUCCESS) { bIsAutoStart = true; //ó } else { bIsAutoStart = false; //óû } } else { #ifdef CZ_DEBUG qDebug() << "עʧܣ"; qDebug() << __FILE__ << __FUNCTION__ << __LINE__; #endif } RegCloseKey(hKey); return bIsAutoStart; } ================================================ FILE: Core/AutoStart.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AutoStart.h * \author chengxuan 787280310@qq.com * \date 2015-05-01 * \brief ͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-01 by chengxuan * * \endverbatim * */ #ifndef AUTOSTART_H #define AUTOSTART_H /*! \def AUTOSTART_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define AUTOSTART_VERSION 0x030000 #include /*! */ class AutoStart { public: /*! 캯.*/ AutoStart(); /*! .*/ ~AutoStart(); public: /*! ÿ * \param value עֵ */ static void autoStart(WCHAR *value); /*! ȡ * \param value עֵ */ static void cancelAutoStart(WCHAR *value); /*! жϳǷ * \param value עֵ * \return true */ static bool isAutoStart(WCHAR *value); }; #endif // AUTOSTART_H ================================================ FILE: Core/AutoStartHandle.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AutoStartHandle.cpp * \author chengxuan 787280310@qq.com * \date 2015-05-02 * \brief ʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-02 by chengxuan * * \endverbatim * */ #include "AutoStartHandle.h" #include "GlobalConfig.h" #include "AutoStart.h" #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif #if AUTOSTART_VERSION < 0x030000 #error "AutoStart version error." #endif AutoStartHandle::AutoStartHandle(QObject *parent) : QObject(parent) { this->createConnect(); } AutoStartHandle::~AutoStartHandle() { /*Do nothing.*/ } void AutoStartHandle::handleAutoStart(bool isAutoStart) { if (isAutoStart) { AutoStart::autoStart((wchar_t*)QString("CZPlayer").utf16()); } else { AutoStart::cancelAutoStart((wchar_t*)QString("CZPlayer").utf16()); } } void AutoStartHandle::createConnect() { GlobalConfig *config = GlobalConfig::instance(); connect(config, SIGNAL(sigAutoRunPlayerChanged(bool)), this, SLOT(handleAutoStart(bool))); } ================================================ FILE: Core/AutoStartHandle.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file AutoStartHandle.h * \author chengxuan 787280310@qq.com * \date 2015-05-02 * \brief ͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-02 by chengxuan * * \endverbatim * */ #ifndef AUTOSTARTHANDLE_H #define AUTOSTARTHANDLE_H /*! \def AUTOSTARTHANDLE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define AUTOSTARTHANDLE_VERSION 0x030000 #include /*! */ class AutoStartHandle : public QObject { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ AutoStartHandle(QObject *parent = NULL); /*! .*/ ~AutoStartHandle(); private slots: /*! * \param isAutoStart true:false:ȡ */ void handleAutoStart(bool isAutoStart); private: /*! ź */ void createConnect(); }; #endif // AUTOSTARTHANDLE_H ================================================ FILE: Core/ChineseToLetter.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file ChineseToLetter.h * \author chengxuan 787280310@qq.com * \date 2015-02-27 * \brief תƴͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-31 by chengxuan * * \endverbatim * */ #ifndef CHINESETOLETTER_H #define CHINESETOLETTER_H /*! \def CHINESETOLETTER_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define CHINESETOLETTER_VERSION 0x030000 #include using namespace std; /*! ֵͨıƴұӦƴ * \param nCode ֱ * \return ıƴ */ static string findLetter(const int &nCode); /*! õıƴ * \param strText ı * \return ıƴ */ static string getLetter(const string &strText) { bool m_blnSimaple = false; bool m_blnFirstBig = true; bool m_blnAllBiG = true; bool m_LetterEnd = false; unsigned char ucHigh, ucLow; int nCode; unsigned int j; string strValue = ""; for (unsigned int i = 0; i < strText.length(); i++) { if ((unsigned char)strText[i] < 0x80) { strValue = strValue + strText[i]; if (m_LetterEnd) strValue = strValue + '\''; { continue; } } ucHigh = (unsigned char)strText[i]; ucLow = (unsigned char)strText[i + 1]; if (ucHigh < 0xa1 || ucLow < 0xa1) { continue; } else { nCode = (ucHigh - 0xa0) * 100 + ucLow - 0xa0; } string strRes = findLetter(nCode); if (m_blnSimaple&&strRes.length() > 0) { strRes = strRes.substr(0, 1); } if (!m_blnFirstBig) { strRes[0] = strRes[0] + 32; } if (!m_blnAllBiG) { for (j = 1; j < strRes.length(); j++) { strRes[j] = strRes[j] + 32; } } strValue = strValue + strRes; i++; if (m_LetterEnd) { strValue = strValue + '\''; } } return strValue; } static string findLetter(const int &nCode) { string strValue; switch (nCode) { case 6325: case 6436: case 7571: case 7925: strValue = "A"; break; case 6263: case 6440: case 7040: case 7208: case 7451: case 7733: case 7945: case 8616: strValue = "AI"; break; case 5847: case 5991: case 6278: case 6577: case 6654: case 7281: case 7907: case 8038: case 8786: strValue = "AN"; break; strValue = "ANG"; break; case 5974: case 6254: case 6427: case 6514: case 6658: case 6959: case 7033: case 7081: case 7365: case 8190: case 8292: case 8643: case 8701: case 8773: strValue = "AO"; break; case 6056: case 6135: case 6517: case 7857: case 8446: case 8649: case 8741: strValue = "BA"; break; case 6267: case 6334: case 7494: strValue = "BAI"; break; case 5870: case 5964: case 7851: case 8103: case 8113: case 8418: strValue = "BAN"; break; case 6182: case 6826: strValue = "BANG"; break; case 6165: case 7063: case 7650: case 8017: case 8157: case 8532: case 8621: strValue = "BAO"; break; case 5635: case 5873: case 5893: case 5993: case 6141: case 6703: case 7753: case 8039: case 8156: case 8645: case 8725: strValue = "BEI"; break; case 5946: case 5948: case 7458: case 7928: strValue = "BEN"; break; case 6452: case 7420: strValue = "BENG"; break; case 5616: case 5734: case 6074: case 6109: case 6221: case 6333: case 6357: case 6589: case 6656: case 6725: case 6868: case 6908: case 6986: case 6994: case 7030: case 7052: case 7221: case 7815: case 7873: case 7985: case 8152: case 8357: case 8375: case 8387: case 8416: case 8437: case 8547: case 8734: strValue = "BI"; break; case 5650: case 5945: case 6048: case 6677: case 6774: case 7134: case 7614: case 7652: case 7730: case 7760: case 8125: case 8159: case 8289: case 8354: case 8693: strValue = "BIAN"; break; case 7027: case 7084: case 7609: case 7613: case 7958: case 7980: case 8106: case 8149: case 8707: case 8752: strValue = "BIAO"; break; case 8531: strValue = "BIE"; break; case 5747: case 6557: case 7145: case 7167: case 7336: case 7375: case 7587: case 7957: case 8738: case 8762: strValue = "BIN"; break; case 5787: case 5891: case 6280: strValue = "BING"; break; case 5781: case 6403: case 6636: case 7362: case 7502: case 7771: case 7864: case 8030: case 8404: case 8543: case 8559: strValue = "BO"; break; case 6318: case 6945: case 7419: case 7446: case 7848: case 7863: case 8519: strValue = "BU"; break; case 6474: case 7769: strValue = "CA"; break; strValue = "CAI"; break; case 6978: case 7078: case 7218: case 8451: case 8785: strValue = "CAN"; break; case 5687: strValue = "CANG"; break; case 6448: case 6878: case 8309: case 8429: strValue = "CAO"; break; case 6692: strValue = "CE"; break; case 6515: case 6825: strValue = "CEN"; break; case 6465: strValue = "CENG"; break; case 6639: case 6766: case 7017: case 7230: case 7311: case 7322: case 7363: case 7942: case 7979: case 8135: strValue = "CHA"; break; case 5713: case 7846: case 8091: case 8218: strValue = "CHAI"; break; case 5770: case 5838: case 6159: case 6667: case 6893: case 6904: case 6981: case 7031: case 7086: case 7472: case 7688: case 7966: case 8324: case 8580: strValue = "CHAN"; break; case 5686: case 5943: case 6041: case 6137: case 6660: case 6568: case 6749: case 7029: case 7047: case 7438: case 7509: case 8680: strValue = "CHANG"; break; case 6687: case 7443: case 8173: strValue = "CHAO"; break; case 5969: case 7726: strValue = "CHE"; break; case 5840: case 5863: case 6251: case 6433: case 6923: case 7201: case 7320: case 7755: case 8619: strValue = "CHEN"; break; case 5609: case 5984: case 7239: case 7263: case 7583: case 7810: case 7881: case 7905: case 8146: case 8241: case 8508: strValue = "CHENG"; break; case 5749: case 6015: case 6061: case 6319: case 6374: case 6420: case 6445: case 6633: case 7042: case 7523: case 7787: case 8023: case 8101: case 8161: case 8231: case 8304: case 8355: case 8388: case 8489: case 8556: case 8746: strValue = "CHI"; break; case 6091: case 6671: case 6731: case 8409: case 8430: strValue = "CHONG"; break; case 5717: case 6492: case 6716: case 8112: case 8637: strValue = "CHOU"; break; case 5601: case 5927: case 6680: case 6732: case 7109: case 7238: case 7290: case 7343: case 8150: case 8260: case 8573: case 8777: strValue = "CHU"; break; case 6285: case 6408: case 7590: case 8563: strValue = "CHUAI"; break; case 6622: case 6955: case 7516: case 7843: case 8413: strValue = "CHUAN"; break; case 6675: strValue = "CHUANG"; break; case 5879: case 7302: case 7319: strValue = "CHUI"; break; case 6127: case 8040: case 8277: strValue = "CHUN"; break; case 7401: case 8554: case 8626: strValue = "CHUO"; break; strValue = "CI"; break; case 6075: case 6358: case 7684: case 8043: case 8457: strValue = "4337 "; break; case 6042: case 6840: case 7085: case 7193: case 7214: case 7240: strValue = "CONG"; break; case 7308: case 7403: case 7577: strValue = "COU"; break; case 6180: case 6562: case 6607: case 7367: case 8501: case 8530: case 8577: strValue = "CU"; break; case 5764: case 6305: case 7664: case 7973: strValue = "CUAN"; break; case 6718: case 6145: case 6393: case 7213: case 7333: case 7505: case 8631: strValue = "CUI"; break; case 6666: case 8169: strValue = "CUN"; break; case 5640: case 6547: case 7566: case 7917: case 7983: case 8078: case 8526: case 8567: strValue = "CUO"; break; case 6239: case 6353: case 6410: case 6682: case 7007: case 8155: case 8346: case 8716: case 8718: strValue = "DA"; break; case 6004: case 6316: case 6523: case 6942: case 7110: case 7173: case 8776: strValue = "DAI"; break; case 5757: case 6144: case 6402: case 7373: case 7470: case 7781: case 8067: case 8087: case 8185: case 8376: strValue = "DAN"; break; case 5852: case 5942: case 6148: case 6920: case 7724: case 7885: case 8141: strValue = "DANG"; break; case 6322: case 6665: case 7514: case 8478: strValue = "DAO"; break; case 7929: strValue = "DE"; break; case 6466: case 6556: case 7413: case 7767: case 7975: case 8403: strValue = "DENG"; break; case 5621: case 5765: case 5814: case 5848: case 5901: case 5970: case 6122: case 6454: case 7023: case 7116: case 7260: case 7306: case 7475: case 7738: case 7758: case 7791: case 7965: case 8438: case 8730: strValue = "DI"; break; case 6439: strValue = "DIA"; break; case 5871: case 5967: case 6559: case 7172: case 7868: case 8116: case 8118: case 8401: case 8558: strValue = "DIAN"; break; case 7886: case 8585: case 8684: strValue = "DIAO"; break; case 5976: case 6006: case 6273: case 6409: case 7526: case 8012: case 8183: case 8562: case 8688: strValue = "DIE"; break; case 5674: case 6404: case 7164: case 7575: case 7754: case 7814: case 8059: case 8184: case 8490: strValue = "DING"; break; case 7891: strValue = "DIU"; break; case 5977: case 6343: case 6520: case 6528: case 7517: case 7543: case 7556: case 7747: case 8020: strValue = "DONG"; break; case 6190: case 8128: case 8229: case 8391: strValue = "DOU"; break; case 6022: case 6429: case 6834: case 7292: case 7525: case 8328: case 8338: case 8739: case 8782: strValue = "DU"; break; case 7318: case 7649: case 8393: strValue = "DUAN"; break; case 7701: case 7713: case 7752: strValue = "DUI"; break; case 6771: case 7632: case 7727: case 7766: case 7779: case 7970: case 8527: strValue = "DUN"; break; case 6345: case 6365: case 6785: case 7122: case 7876: case 8154: case 8566: strValue = "DUO"; break; case 5612: case 5832: case 5844: case 5949: case 6035: case 6113: case 6164: case 6332: case 6721: case 6977: case 7025: case 7378: case 7581: case 7916: case 7941: case 8042: case 8206: case 8689: strValue = "E"; break; case 6176: case 6284: strValue = "EN"; break; case 5706: case 6939: case 7177: case 7879: case 8025: case 8660: strValue = "ER"; break; case 5950: case 7732: strValue = "FA"; break; case 6212: case 6232: case 6506: case 7283: case 7660: case 7818: case 8576: strValue = "FAN"; break; case 5890: case 7242: case 7853: case 8419: case 8648: strValue = "FANG"; break; case 6032: case 6584: case 6713: case 6839: case 6990: case 7119: case 7328: case 7572: case 7619: case 7673: case 7948: case 8082: case 8267: case 8385: case 8468: case 8613: case 8678: strValue = "FEI"; break; case 5739: case 6915: case 7291: case 8687: case 8787: strValue = "FEN"; break; case 5726: case 5926: case 6155: case 6384: case 6767: case 7731: strValue = "FENG"; break; strValue = "FO"; break; case 8330: strValue = "FOU"; break; case 5775: case 5776: case 5914: case 6029: case 6062: case 6119: case 6142: case 6252: case 6327: case 6505: case 6686: case 6870: case 6985: case 7058: case 7066: case 7106: case 7108: case 7285: case 7471: case 7680: case 7741: case 7774: case 7775: case 7823: case 7991: case 8005: case 8222: case 8261: case 8280: case 8283: case 8479: case 8535: case 8538: case 8654: case 8691: strValue = "FU"; break; case 6246: case 7056: case 7057: case 7424: case 7837: strValue = " GA"; break; case 5604: case 5875: case 5982: case 7414: case 7464: strValue = "GAI"; break; case 5965: case 6053: case 6247: case 6306: case 6779: case 6838: case 6887: case 7104: case 7347: case 7426: case 7723: case 8065: case 8491: strValue = "GAN"; break; case 7716: case 7824: case 8364: strValue = "GANG"; break; case 5626: case 5830: case 5912: case 6227: case 7141: case 7332: case 7334: case 7429: case 7915: strValue = "GAO"; break; case 5610: case 5678: case 5933: case 5957: case 6010: case 6435: case 7092: case 7501: case 7585: case 7749: case 7951: case 8143: case 8220: case 8420: case 8732: strValue = "GE"; break; strValue = "GEI"; break; case 5608: case 6102: case 6371: case 8462: strValue = "GEN"; break; case 6376: case 6657: case 7114: case 8665: strValue = "GENG"; break; case 7178: case 7537: case 8228: case 8601: strValue = "GONG"; break; case 5694: case 5824: case 6524: case 6960: case 7037: case 7135: case 7259: case 7477: case 7616: case 8349: case 8384: case 8724: strValue = "GOU"; break; case 5637: case 5812: case 6152: case 6536: case 6773: case 7284: case 7379: case 7484: case 7486: case 7591: case 7617: case 7813: case 7825: case 7860: case 7932: case 8019: case 8083: case 8233: case 8494: case 8593: case 8681: case 8729: strValue = "GU"; break; case 5652: case 5820: case 6341: case 7273: case 7550: case 8027: strValue = "GUA"; break; strValue = "GUAI"; break; case 5736: case 6124: case 6272: case 6842: case 7834: case 8057: case 8170: case 8704: strValue = "GUAN"; break; case 6359: case 6578: case 7270: case 7555: strValue = "GUANG"; break; case 5648: case 5659: case 6649: case 7003: case 7277: case 7433: case 7448: case 8007: case 8394: case 8657: case 8712: strValue = "GUI"; break; case 5782: case 7121: case 7762: case 8671: strValue = "GUN"; break; case 5769: case 6266: case 6335: case 6494: case 6538: case 6603: case 7304: case 7529: case 8188: case 8268: case 8269: strValue = "GUO"; break; case 7894: strValue = "HA"; break; case 6443: case 7560: case 8516: strValue = "HAI"; break; case 5885: case 6153: case 6294: case 6759: case 6911: case 7447: case 7642: case 8192: case 8205: case 8232: case 8793: strValue = "HAN"; break; case 6776: case 7112: case 8194: strValue = "HANG"; break; case 6179: case 6222: case 6438: case 6467: case 6909: case 6916: case 7427: case 8009: case 8211: case 8226: strValue = "HAO"; break; case 5813: case 5932: case 5954: case 6432: case 6756: case 7434: case 7833: case 8202: case 8234: case 8471: strValue = "HE"; break; strValue = "HEI"; break; strValue = "HEN"; break; case 6231: case 7181: case 7276: strValue = "HENG"; break; case 5768: case 5774: case 5807: case 6106: case 6214: case 6216: case 6740: case 6792: strValue = "HONG"; break; case 6009: case 6565: case 6943: case 8090: case 8383: case 8455: case 8655: case 8731: strValue = "HOU"; break; case 5792: case 6392: case 6481: case 6518: case 6609: case 6679: case 6717: case 6816: case 6879: case 7190: case 7346: case 7385: case 7618: case 7635: case 7646: case 7670: case 7672: case 7679: case 8013: case 8032: case 8041: case 8055: case 8343: case 8513: case 8590: strValue = "HU"; break; case 7072: case 7275: case 7725: case 7892: strValue = "HUA"; break; case 8555: strValue = "HUAI"; break; case 5928: case 6140: case 6307: case 6487: case 6621: case 6801: case 6829: case 6881: case 6930: case 6953: case 7157: case 7944: case 8673: case 8763: strValue = "HUAN"; break; case 5882: case 6569: case 6850: case 6874: case 6956: case 7211: case 7533: case 8105: case 8308: case 8382: case 8692: strValue = "HUANG"; break; case 5822: case 6078: case 6086: case 6205: case 6352: case 6360: case 6425: case 6736: case 6807: case 6811: case 6971: case 7132: case 7185: case 7445: case 7703: case 8219: case 8319: case 8766: strValue = "HUI"; break; case 5827: case 6638: case 6752: case 6867: strValue = "HUN"; break; case 5669: case 6229: case 6311: case 6475: case 6623: case 7856: case 7933: case 7976: case 8175: case 8322: strValue = "HUO"; break; case 5629: case 5632: case 5662: case 5705: case 5742: case 5952: case 6024: case 6033: case 6193: case 6210: case 6265: case 6320: case 6350: case 6383: case 6507: case 6553: case 6809: case 6976: case 7087: case 7160: case 7165: case 7314: case 7374: case 7410: case 7411: case 7469: case 7473: case 7487: case 7620: case 7722: case 7831: case 7990: case 8002: case 8104: case 8217: case 8337: case 8339: case 8463: case 8550: case 8611: case 8661: case 8674: case 8757: case 8768: strValue = "JI"; break; case 5704: case 5903: case 6171: case 6521: case 6804: case 6940: case 7176: case 7409: case 7546: case 7702: case 7882: case 7956: case 8072: case 8142: case 8244: case 8353: case 8434: case 8542: strValue = "JIA"; break; case 5752: case 5841: case 5857: case 6149: case 6183: case 6286: case 6853: case 6931: case 6932: case 7144: case 7237: case 7305: case 7407: case 7415: case 7480: case 7489: case 7506: case 7576: case 7790: case 7921: case 8047: case 8148: case 8340: case 8469: case 8534: case 8561: case 8668: case 8721: strValue = "JIAN"; break; case 6092: case 6814: case 7113: case 7154: case 7481: case 7768: case 8180: case 8461: case 8488: strValue = "JIANG"; break; case 5714: case 5753: case 6020: case 6090: case 6256: case 6461: case 6572: case 7015: case 7524: case 8008: case 8052: case 8252: case 8520: case 8551: case 8662: strValue = "JIAO"; break; case 5806: case 5821: case 6255: case 6414: case 7028: case 7061: case 7278: case 7757: case 8060: case 8201: case 8227: case 8441: case 8658: case 8726: strValue = "JIE"; break; case 5865: case 6103: case 6132: case 6468: case 6643: case 6659: case 7138: case 7210: case 7340: case 7465: case 7478: case 8138: strValue = "JIN"; break; case 5751: case 5869: case 6128: case 6616: case 6729: case 6794: case 6941: case 6982: case 7026: case 7534: case 7554: case 7570: case 7626: strValue = "JIANG"; break; case 6936: case 7671: strValue = "JIONG"; break; case 5754: case 6417: case 6746: case 7249: case 7274: case 8015: case 8053: case 8481: case 8761: strValue = "JIU"; break; case 5738: case 5810: case 6036: case 6058: case 6076: case 6268: case 6965: case 6980: case 7202: case 7307: case 7316: case 7323: case 7357: case 7381: case 7488: case 7611: case 7850: case 7924: case 8022: case 8132: case 8153: case 8482: case 8522: case 8565: case 8620: case 8634: case 8722: strValue = "JU"; break; case 5918: case 6590: case 6824: case 7280: case 7835: case 7935: case 7952: case 8633: strValue = "JUAN"; break; case 5642: case 5667: case 5860: case 5939: case 6207: case 6421: case 6457: case 6469: case 6540: case 6617: case 7062: case 7169: case 7286: case 7351: case 7663: case 7967: case 8574: case 8591: strValue = "JUE"; break; case 6260: case 8168: case 8362: case 8769: strValue = "JUN"; break; case 5671: case 6339: case 7544: strValue = "KA"; break; case 5660: case 5978: case 6160: case 6673: case 6693: case 7888: case 7920: case 7939: strValue = "KAI"; break; case 5709: case 6108: case 7412: case 7772: case 7811: strValue = "KAN"; break; case 5688: case 6742: case 7854: strValue = "KANG"; break; case 6974: case 7264: case 7491: case 7877: strValue = "KAO"; break; case 6430: case 6519: case 6701: case 6859: case 7076: case 7128: case 7170: case 7380: case 7520: case 7807: case 7861: case 7930: case 7993: case 8066: case 8129: case 8204: case 8282: case 8733: strValue = "KE"; break; case 8144: strValue = "KEN"; break; case 7912: strValue = "KENG"; break; case 5737: case 6539: case 8377: strValue = "KONG"; break; case 6050: case 6202: case 6321: case 7778: case 8356: strValue = "KOU"; break; case 5658: case 6005: case 6423: case 7111: case 8728: strValue = "KU"; break; case 5708: strValue = "KUA"; break; case 5665: case 5906: case 6364: case 6586: case 7558: strValue = "KUAI"; break; case 8737: strValue = "KUAN"; break; case 5818: case 5831: case 5887: case 5959: case 6237: case 6349: case 7094: case 7460: strValue = "KUANG"; break; case 5624: case 5649: case 5771: case 6162: case 6281: case 6413: case 6416: case 6720: case 6951: case 7450: case 7805: case 8606: case 8743: strValue = "KUI"; break; case 6204: case 6245: case 6458: case 6618: case 6928: case 7152: case 7841: case 8051: strValue = "LIAO"; break; case 5793: case 5988: case 6270: case 6354: case 6803: case 8483: case 8581: case 8764: strValue = "LIE"; break; case 6194: case 6388: case 6555: case 6662: case 6733: case 6964: case 7361: case 7405: case 7602: case 7812: case 8452: case 8579: case 8775: strValue = "LIN"; break; case 5925: case 6063: case 6342: case 6482: case 6786: case 7117: case 7258: case 7289: case 7418: case 8186: case 8240: case 8465: case 8676: strValue = "LING"; break; case 6815: case 6962: case 7082: case 7124: case 7628: case 7654: case 7919: case 7954: case 8050: case 8644: strValue = "LIU"; break; case 5966: case 6055: case 6781: case 7171: case 7248: case 7542: case 7735: case 8110: strValue = "LONG"; break; case 5745: case 6168: case 6422: case 6548: case 7946: case 8092: case 8179: case 8287: case 8735: strValue = "LOU"; break; case 6744: case 7321: case 7586: case 7918: case 7989: case 8158: strValue = "L"; break; case 5968: case 6303: case 6464: case 6782: case 6843: case 6885: case 6954: case 7220: case 7251: case 7354: case 7391: case 7404: case 7510: case 7545: case 7969: case 8021: case 8056: case 8392: case 8421: case 8652: strValue = "LU"; break; case 5785: case 7014: case 7279: case 8029: case 8639: strValue = "LUAN"; break; strValue = "LE"; break; strValue = "LUN"; break; case 5732: case 5789: case 6093: case 6259: case 6291: case 6604: case 6788: case 6880: case 7183: case 7301: case 7565: case 7961: case 8107: case 8635: strValue = "LUO"; break; case 6328: strValue = "M"; break; case 6373: case 6579: case 7054: case 7231: case 8301: strValue = "MA"; break; case 5929: case 6104: case 8618: strValue = "MAI"; break; case 6012: case 6503: case 7147: case 7655: case 7960: case 8209: case 8293: case 8709: case 8720: strValue = "MAN"; break; case 5888: case 6861: case 7743: case 8294: strValue = "MANG"; break; case 5783: case 6066: case 6525: case 6787: case 7203: case 7436: case 7483: case 7503: case 7624: case 7714: case 7806: case 8317: case 8754: strValue = "MAO"; break; case 6114: case 6550: case 6613: case 6828: case 6856: case 7325: case 7949: case 8044: case 8139: case 8740: strValue = "MEI"; break; case 6249: case 7643: case 7715: case 7845: strValue = "MEN"; break; case 5934: case 6189: case 6211: case 6734: case 7592: case 7770: case 8221: case 8276: case 8323: case 8427: case 8431: strValue = "MENG"; break; case 5634: case 5855: case 6234: case 6368: case 6455: case 6608: case 6772: case 6921: case 6984: case 7563: case 7682: case 8445: case 8767: case 8771: strValue = "MI"; break; case 6770: case 6837: case 6847: case 7579: case 7777: strValue = "MIAN"; break; case 6387: case 6967: case 7131: case 7149: case 7234: case 7721: case 7780: case 8037: strValue = "MIAO"; break; case 5631: case 6367: case 8326: case 8390: strValue = "MIE"; break; case 6069: case 6526: case 6741: case 6793: case 7137: case 7168: case 7175: case 7710: case 8710: case 8628: strValue = "MIN"; break; case 5804: case 6088: case 6873: case 7452: case 7808: case 8504: strValue = "MING"; break; strValue = "MIU"; break; case 5851: case 6052: case 6175: case 6641: case 7038: case 7366: case 7950: case 7987: case 8102: case 8182: case 8586: case 8588: case 8765: strValue = "MO"; break; case 5716: case 6372: case 7788: case 8254: case 8290: case 8642: strValue = "MOU"; break; case 5679: case 5973: case 6057: case 6769: case 7504: case 7866: strValue = "MU"; break; case 6437: strValue = "N"; break; case 6264: case 7539: case 7953: case 8136: strValue = "NA"; break; case 5630: case 6021: case 6133: case 7245: strValue = "NAI"; break; case 6411: case 6478: case 6479: case 7310: case 7578: case 8279: case 8486: strValue = "NAN"; break; case 6313: case 6476: case 6646: case 7457: strValue = "NANG"; break; case 5611: case 5981: case 6346: case 6614: case 7207: case 7748: case 7883: case 8245: strValue = "NAO"; break; case 5811: strValue = "NE"; break; strValue = "NEI"; break; case 7705: strValue = "NEN"; break; strValue = "NENG"; break; case 5703: case 5972: case 6605: case 6685: case 7439: case 7627: case 7711: case 7794: case 7874: case 8682: strValue = "NI"; break; case 5605: case 5994: case 7393: case 8004: case 8651: case 8683: strValue = "NIAN"; break; strValue = "NIANG"; break; case 6064: case 7053: case 7569: case 8433: strValue = "NIAO"; break; case 5877: case 6233: case 6431: case 8208: case 8411: case 8570: strValue = "NIE"; break; strValue = "NIN"; break; case 5690: case 6344: case 6924: case 8187: strValue = "NING"; break; case 6580: case 6678: case 7004: strValue = "NIU"; break; case 5715: case 6370: strValue = "NONG"; break; case 8181: strValue = "NOU"; break; case 6983: case 7032: case 7059: case 7069: strValue = "NU"; break; case 7704: case 7847: case 8412: strValue = "N"; break; strValue = "NUAN"; break; strValue = "NUE"; break; case 5748: case 6289: case 6386: case 7927: strValue = "NUO"; break; case 6424: case 6462: strValue = "O"; break; case 5809: case 6670: case 7417: case 8178: strValue = "OU"; break; case 6166: case 7243: case 8365: strValue = "PA"; break; case 5729: case 6169: case 6363: strValue = "PAI"; break; case 6761: case 6790: case 8140: case 8165: case 8320: case 8571: strValue = "PAN"; break; case 6561: case 6872: case 6944: case 8306: strValue = "PANG"; break; case 6243: case 6583: case 6650: case 7567: case 8069: strValue = "PAO"; break; case 6446: case 6490: case 7623: case 7934: case 8512: case 8612: strValue = "PEI"; break; case 6852: strValue = "PEN"; break; case 6001: case 6456: case 6681: case 8318: strValue = "PENG"; break; case 5607: case 5682: case 5880: case 5892: case 5915: case 5960: case 6017: case 6037: case 6308: case 6472: case 6647: case 6836: case 7039: case 7102: case 7233: case 7422: case 7802: case 7828: case 7875: case 8117: case 8166: case 8223: case 8271: case 8589: strValue = "PI"; break; case 5850: case 7073: case 7490: case 7561: case 8470: case 8568: strValue = "PIAN"; break; case 5666: case 6449: case 7046: case 7146: case 7372: case 7809: case 8310: strValue = "PIAO"; break; case 6054: case 7513: strValue = "PIE"; break; case 7041: case 6253: case 7016: case 7315: case 7482: case 8213: strValue = "PIN"; break; case 5723: case 7019: case 7250: case 8650: strValue = "PING"; break; case 5647: case 5922: case 7174: case 7839: case 7862: case 8011: case 8345: strValue = "PO"; break; case 5786: case 6269: strValue = "POU"; break; case 5773: case 6459: case 6863: case 6907: case 7217: case 7511: case 7968: case 7972: case 8575: strValue = "PU"; break; case 5633: case 5725: case 5963: case 6027: case 6046: case 6089: case 6129: case 6134: case 6161: case 6213: case 6366: case 6450: case 6508: case 6510: case 6764: case 6831: case 7075: case 7118: case 7187: case 7189: case 7229: case 7271: case 7342: case 7440: case 7605: case 7687: case 7712: case 7751: case 8193: case 8251: case 8264: case 8475: case 8476: case 8572: case 8702: case 8772: strValue = "QI"; break; case 6154: case 8736: strValue = "QIA"; break; case 5727: case 5761: case 5868: case 6023: case 6045: case 6071: case 6271: case 6509: case 6705: case 6727: case 6925: case 6926: case 6929: case 7155: case 7293: case 7541: case 7709: case 7852: case 8215: case 8373: strValue = "QIAN"; break; case 6762: case 7045: case 7341: case 7408: case 7633: case 7926: case 7947: case 7974: case 8163: case 8262: case 8439: case 8536: strValue = "QIANG"; break; case 5668: case 5829: case 5859: case 6081: case 6529: case 6724: case 6730: case 7352: case 7745: case 8546: case 8719: strValue = "QIAO"; break; case 5907: case 6711: case 7010: case 7492: case 7938: case 8370: strValue = "QIE"; break; case 6043: case 6276: case 6336: case 6426: case 6463: case 6858: case 7353: case 7923: case 8291: case 8432: strValue = "QIN"; break; case 6060: case 6485: case 7349: case 7764: case 8263: case 8332: case 8368: case 8605: case 8675: case 8784: strValue = "QING"; break; case 5886: case 6068: case 8123: case 8243: case 8344: case 8528: case 8638: strValue = "QIONG"; break; case 5720: case 5947: case 6576: case 6848: case 6947: case 6957: case 7317: case 7468: case 8216: case 8239: case 8288: case 8435: case 8460: case 8690: case 8792: strValue = "QIU"; break; case 5816: case 5930: case 6201: case 6230: case 6511: case 6573: case 6754: case 7219: case 7479: case 7512: case 7552: case 7678: case 7765: case 8119: case 8248: case 8329: case 8480: case 8636: case 8781: strValue = "QU"; break; case 5825: case 6085: case 6710: case 7125: case 7390: case 7816: case 7893: case 8273: case 8360: case 8760: strValue = "QUAN"; break; case 6755: case 6758: case 7708: strValue = "QUE"; break; case 6950: strValue = "QUN"; break; case 6059: case 8237: case 8755: strValue = "RAN"; break; case 7692: case 8006: strValue = "RANG"; break; case 6073: case 7012: case 7267: strValue = "RAO"; break; strValue = "RE"; break; case 5680: case 6083: case 6156: case 6631: case 7377: case 7994: case 8137: strValue = "REN"; break; strValue = "RENG"; break; strValue = "RI"; break; case 6541: case 6585: case 7337: case 7532: case 8278: strValue = "RONG"; break; case 8459: case 8569: case 8723: strValue = "ROU"; break; case 6174: case 6224: case 6473: case 6818: case 6865: case 6906: case 7140: case 7908: case 8164: case 8212: strValue = "RU"; break; case 7535: strValue = "RUAN"; break; case 6039: case 6208: case 7236: case 7803: case 8224: strValue = "RUI"; break; strValue = "RUN"; break; case 5728: case 8372: strValue = "RUO"; break; case 5606: case 5677: case 7493: case 7559: case 7610: strValue = "SA"; break; case 6471: strValue = "SAI"; break; case 6644: case 7507: case 8454: strValue = "SAN"; break; case 6290: case 7763: case 8210: strValue = "SANG"; break; case 6003: case 7150: case 7156: case 7593: case 8094: case 8694: strValue = "SAO"; break; strValue = "SE"; break; strValue = "SEN"; break; strValue = "SENG"; break; case 6394: case 7606: case 7901: case 8080: case 8436: case 8614: case 8672: strValue = "SHA"; break; case 8507: strValue = "SHAI"; break; case 5663: case 5808: case 5923: case 5979: case 6047: case 6890: case 7009: case 7051: case 7083: case 7594: case 7844: case 8062: case 8321: case 8414: case 8539: case 8713: strValue = "SHAN"; break; case 5980: case 7120: case 7368: case 7656: case 8592: strValue = "SHANG"; break; case 5931: case 6070: case 6891: case 7228: case 8366: case 8425: strValue = "SHAO"; break; case 5639: case 5760: case 6606: case 6860: case 7608: case 7820: case 8774: strValue = "SHE"; break; case 5837: case 6123: case 6351: case 6841: case 7309: case 7547: case 7982: case 8255: strValue = "SHEN"; break; case 6551: case 7441: case 7782: case 8347: strValue = "SHENG"; break; case 5854: case 5985: case 6110: case 6173: case 6317: case 7388: case 7459: case 7634: case 7870: case 8307: case 8334: case 8363: case 8525: case 8669: case 8685: strValue = "SHI"; break; case 6587: case 7123: case 8428: strValue = "SHOU"; break; case 5731: case 5951: case 6136: case 6283: case 6780: case 6888: case 7013: case 7508: case 7582: case 7988: strValue = "SHU"; break; case 6407: strValue = "SHUA"; break; case 8316: strValue = "SHUAI"; break; case 6737: case 6844: strValue = "SHUAN"; break; case 7055: strValue = "SHUANG"; break; strValue = "SHUI"; break; strValue = "SHUN"; break; case 6184: case 6287: case 6989: case 7335: case 7869: strValue = "SHUO"; break; case 5643: case 5778: case 5944: case 6348: case 6765: case 6784: case 6889: case 7006: case 7065: case 7133: case 7675: case 7940: case 8024: case 8174: case 8247: case 8351: strValue = "SI"; break; case 5801: case 6131: case 6534: case 6552: case 6676: case 6704: case 6833: case 8121: strValue = "SONG"; break; case 5937: case 6220: case 6418: case 6453: case 6640: case 6849: case 7612: case 7804: case 7943: case 8284: strValue = "SOU"; break; case 5777: case 5853: case 6188: case 6428: case 6726: case 6819: case 8389: case 8602: case 8653: strValue = "SU"; break; case 6601: strValue = "SUAN"; break; case 5839: case 6120: case 6901: case 6968: case 7661: case 7785: case 7801: strValue = "SUI"; break; case 6105: case 6588: case 6624: case 7330: case 8632: strValue = "SUN"; break; case 6379: case 6434: case 6442: case 7022: case 7288: case 7792: case 8440: strValue = "SUO"; break; case 6743: case 6866: case 6961: case 7329: case 7719: case 7872: case 8533: case 8703: strValue = "TA"; break; case 5902: case 6223: case 6330: case 7070: case 7536: case 7638: case 7849: case 8544: case 8656: strValue = "TAI"; break; case 5916: case 6903: case 7428: case 7694: case 7867: case 7936: case 8191: strValue = "TAN"; break; case 5746: case 6491: case 6871: case 7209: case 7344: case 7906: case 7959: case 8177: case 8305: case 8311: case 8442: case 8517: strValue = "TANG"; break; case 5627: case 6391: case 6812: case 7226: case 7666: strValue = "TAO"; break; strValue = "1845 "; break; case 6315: case 7693: case 7911: strValue = "TE"; break; case 7588: strValue = "TENG"; break; case 5735: case 6709: case 6949: case 7130: case 8035: case 8151: case 8514: strValue = "TI"; break; case 6261: case 6735: case 6757: case 7369: case 7817: strValue = "TIAN"; break; case 5712: case 7686: case 8127: case 8272: case 8352: case 8448: case 8622: case 8670: case 8756: strValue = "TIAO"; break; case 6138: case 8749: strValue = "TIE"; break; case 6080: case 6167: case 7035: case 7272: case 7890: case 8249: case 8610: strValue = "TING"; break; case 5701: case 5758: case 6077: case 6444: case 6690: case 6892: case 7737: strValue = "TONG"; break; case 7855: case 7822: case 8727: strValue = "TOU"; break; case 6002: case 6117: case 6143: case 7842: case 8509: strValue = "TU"; break; case 6250: case 6972: strValue = "TUAN"; break; case 7653: strValue = "TUI"; break; case 5759: case 6629: case 7453: case 7564: strValue = "TUN"; break; case 5617: case 5702: case 5971: case 6653: case 6791: case 7256: case 7262: case 7350: case 7740: case 8374: case 8502: case 8541: case 8630: strValue = "TUO"; break; case 5684: case 7020: case 7580: strValue = "WA"; break; strValue = "WAI"; break; case 5664: case 6025: case 6150: case 7093: case 7126: case 7194: case 7568: case 7821: case 8274: strValue = "WAN"; break; case 5672: case 6244: case 6715: case 7394: case 8745: strValue = "WANG"; break; case 5743: case 5835: case 5881: case 5883: case 6158: case 6217: case 6488: case 6501: case 6543: case 6545: case 6611: case 6612: case 6739: case 6777: case 6802: case 6822: case 6952: case 7024: case 7166: case 7224: case 7406: case 7631: case 7648: case 8084: case 8426: case 8659: strValue = "WEI"; break; case 5656: case 6751: case 6775: case 7223: case 8609: strValue = "WEN"; break; case 6178: case 6219: strValue = "WENG"; break; case 5733: case 6111: case 6502: case 6855: case 7531: case 7750: case 8627: strValue = "WO"; break; case 5603: case 5685: case 5867: case 5889: case 5956: case 6044: case 6377: case 6648: case 6668: case 6672: case 6820: case 6927: case 6935: case 6992: case 7036: case 7080: case 7227: case 7485: case 7641: case 8036: case 8045: case 8077: case 8258: case 8640: case 8789: strValue = "WU"; break; case 5750: case 5766: case 5884: case 5913: case 6130: case 6163: case 6191: case 6241: case 6381: case 6567: case 6630: case 6750: case 6827: case 6832: case 6979: case 7050: case 7184: case 7356: case 7456: case 7474: case 7604: case 7668: case 7689: case 7691: case 8010: case 8122: case 8265: case 8303: case 8312: case 8410: case 8424: case 8443: case 8449: case 8466: case 8521: case 8791: strValue = "XI"; break; case 6340: case 6582: case 6958: case 7206: case 7252: case 7744: case 8093: case 8333: case 8779: strValue = "XIA"; break; case 5794: case 5823: case 6040: case 6118: case 6226: case 6513: case 6593: case 6963: case 7021: case 7515: case 7662: case 7676: case 8034: case 8079: case 8225: case 8358: case 8444: case 8503: case 8548: case 8549: case 8617: strValue = "XIAN"; break; case 6028: case 6157: case 6635: case 6652: case 7088: case 7129: case 8313: case 8663: case 8747: strValue = "XIANG"; break; case 6356: case 6537: case 6876: case 6948: case 7071: case 7115: case 7241: case 7253: case 8257: case 8367: case 8379: case 8744: strValue = "XIAO"; break; case 5741: case 5784: case 5936: case 5938: case 6215: case 6302: case 6619: case 6661: case 6845: case 6912: case 6966: case 7105: case 7151: case 7331: case 7339: case 8583: strValue = "XIE"; break; case 5622: case 6016: case 7431: case 7607: case 8646: strValue = "XIN"; break; case 5874: case 6084: case 6309: case 6712: case 7742: strValue = "XING"; break; case 6026: strValue = "XIONG"; break; case 6361: case 6522: case 6642: case 6651: case 6869: case 8028: case 8587: case 8759: strValue = "XIU"; break; case 5828: case 5935: case 5955: case 6203: case 6810: case 6851: case 7179: case 7282: case 7667: case 7776: case 8167: case 8458: case 8515: strValue = "XU"; break; case 5756: case 5846: case 6170: case 6279: case 6789: case 6854: case 6886: case 7215: case 7324: case 7449: case 7637: case 7651: case 7759: case 7871: case 7964: case 8071: strValue = "XUAN"; break; case 5842: case 7720: case 8529: case 8708: strValue = "XUE"; break; case 5767: case 5908: case 5987: case 6087: case 6101: case 6206: case 6225: case 6530: case 6563: case 6620: case 6694: case 6813: case 6817: case 7454: case 8131: case 8524: case 8664: strValue = "XUN"; break; case 5683: case 5975: case 6275: case 6512: case 6934: case 7011: case 7180: case 7266: case 7518: case 7728: case 7793: case 8073: strValue = "YA"; break; case 5641: case 5645: case 5718: case 5740: case 5780: case 5861: case 5917: case 5919: case 6030: case 6146: case 6535: case 6691: case 6738: case 6753: case 6846: case 6857: case 6991: case 7044: case 7192: case 7360: case 7444: case 7557: case 7645: case 7827: case 8359: case 8506: case 8742: case 8748: case 8790: strValue = "YAN"; break; case 6564: case 6683: case 7630: case 7640: case 7706: case 8253: case 8717: strValue = "YANG"; break; case 5618: case 5619: case 6326: case 6542: case 6570: case 7159: case 7182: case 7235: case 7387: case 7455: case 7540: case 7902: case 8046: case 8126: case 8477: case 8705: strValue = "YAO"; break; case 5644: case 5843: case 5894: case 6262: case 7442: case 7639: case 7884: strValue = "YE"; break; case 5655: case 5657: case 5670: case 5693: case 5711: case 5817: case 5961: case 5992: case 6018: case 6051: case 6072: case 6218: case 6236: case 6240: case 6258: case 6314: case 6329: case 6355: case 6362: case 6441: case 6470: case 6527: case 6558: case 6602: case 6634: case 6688: case 6689: case 6708: case 6884: case 6938: case 7068: case 7143: case 7376: case 7383: case 7461: case 7629: case 7658: case 7784: case 7838: case 7955: case 7978: case 8074: case 8089: case 8115: case 8120: case 8270: case 8415: case 8464: case 8472: case 8493: case 8780: strValue = "YI"; break; case 5623: case 5920: case 5983: case 6007: case 6065: case 6337: case 6419: case 6594: case 6625: case 6806: case 7519: case 7887: case 8111: case 8230: case 8615: case 8624: strValue = "YIN"; break; case 5788: case 5911: case 6067: case 6094: case 6126: case 6151: case 6186: case 6292: case 6451: case 6663: case 6862: case 6875: case 6913: case 7188: case 7212: case 7326: case 7584: case 8048: case 8108: case 8203: case 8331: strValue = "YING"; break; case 6401: strValue = "YO"; break; case 5724: case 5953: case 6013: case 6415: case 6728: case 7163: case 7962: case 8014: case 8711: case 8751: strValue = "YONG"; break; case 5653: case 5692: case 5707: case 6112: case 6115: case 6121: case 6347: case 6483: case 6922: case 7254: case 7364: case 7527: case 7880: case 8064: case 8236: case 8242: case 8286: case 8647: case 8778: case 8788: strValue = "YOU"; break; case 5614: case 5625: case 5681: case 5722: case 5836: case 5845: case 6139: case 6187: case 6277: case 6484: case 6486: case 6546: case 6592: case 6632: case 6637: case 6655: case 6748: case 6987: case 6993: case 7005: case 7090: case 7204: case 7437: case 7476: case 7573: case 7603: case 7622: case 7647: case 7659: case 7718: case 7858: case 8033: case 8054: case 8085: case 8086: case 8130: case 8133: case 8266: case 8285: case 8336: case 8407: case 8408: case 8607: case 8625: strValue = "YU"; break; case 5989: case 6011: case 6282: case 6768: case 7034: case 7205: case 7358: case 7528: case 7783: case 8016: case 8302: case 8378: case 8629: strValue = "YUAN"; break; case 5763: case 6914: case 7348: case 7530: case 7865: strValue = "YUE"; break; case 5909: case 6031: case 6581: case 6702: case 6719: case 7101: case 7225: case 7370: case 7432: case 7521: case 7657: strValue = "YUN"; break; case 6257: case 6338: strValue = "ZA"; break; case 6544: case 7162: strValue = "ZAI"; break; case 7222: case 7435: case 8402: case 8456: case 8485: case 8641: strValue = "ZAN"; break; case 6242: case 7064: case 7416: strValue = "ZANG"; break; case 6380: strValue = "ZAO"; break; case 5638: case 8369: case 5651: case 6385: case 6493: case 6937: case 7430: case 8348: case 8423: strValue = "ZE"; break; strValue = "ZEI"; break; case 5858: strValue = "ZEN"; break; case 7153: case 7421: case 7832: case 7913: strValue = "ZENG"; break; case 6610: case 6274: case 6324: case 6369: case 6378: case 7736: case 8068: case 8238: case 8794: strValue = "ZHA"; break; case 7746: case 8109: strValue = "ZHAI"; break; case 5862: case 6288: case 7625: strValue = "ZHAN"; break; case 5675: case 5921: case 6504: case 6554: case 6615: case 7049: case 7216: case 8315: strValue = "ZHANG"; break; case 5815: case 7294: case 7840: case 8341: strValue = "ZHAO"; break; case 5856: case 6301: case 7247: case 7392: case 7761: case 8049: case 8162: case 8256: case 8487: strValue = "ZHE"; break; case 5958: case 6172: case 6805: case 7139: case 7269: case 7327: case 7384: case 7466: case 7551: case 7562: case 7685: case 7819: case 8001: case 8018: case 8380: strValue = "ZHEN"; break; case 5826: case 6531: case 6571: case 7859: case 7903: case 8361: strValue = "ZHENG"; break; case 5620: case 5876: case 5904: case 5990: case 6038: case 6293: case 6489: case 6669: case 6973: case 6975: case 7079: case 7246: case 7255: case 7257: case 7268: case 7382: case 7389: case 7462: case 7553: case 7589: case 7677: case 7683: case 7773: case 7984: case 8026: case 8075: case 8246: case 8474: case 8505: case 8537: case 8557: case 8560: case 8584: case 8603: strValue = "ZHI"; break; case 5803: case 7981: case 8314: case 8417: case 8564: strValue = "ZHONG"; break; case 6107: case 6390: case 7008: case 7091: case 7107: case 7548: case 7756: case 8406: case 8492: strValue = "ZHOU"; break; case 5689: case 5710: case 5905: case 6049: case 6079: case 6808: case 6830: case 6883: case 7244: case 7338: case 7345: case 7636: case 7889: case 8070: case 8081: case 8335: case 8371: case 8422: case 8467: case 8578: case 8770: strValue = "ZHU"; break; strValue = "ZHUA"; break; strValue = "ZHUAI"; break; case 6389: case 6645: case 8207: strValue = "ZHUAN"; break; case 5755: strValue = "ZHUANG"; break; case 6723: case 7077: case 7136: strValue = "ZHUI"; break; case 7538: case 8124: strValue = "ZHUN"; break; case 5730: case 5834: case 6310: case 6823: case 6835: case 6910: case 7644: case 7690: case 7729: case 7977: strValue = "ZHUO"; break; case 5849: case 6549: case 7002: case 7060: case 7127: case 7287: case 7402: case 7463: case 7707: case 7786: case 7937: case 7986: case 8172: case 8342: case 8450: case 8484: case 8594: case 8604: case 8623: case 8686: case 8758: strValue = "ZI"; break; case 5744: case 7574: case 8453: strValue = "ZONG"; break; case 5833: case 5878: case 5924: case 7067: case 8677: strValue = "ZOU"; break; case 5762: case 6147: case 7963: strValue = "ZU"; break; case 6312: case 7158: case 8582: strValue = "ZUAN"; break; case 6209: strValue = "ZUI"; break; case 6304: case 7355: case 8714: strValue = "ZUN"; break; case 5872: case 6382: case 6460: case 6684: case 7549: case 7681: strValue = "ZUO"; break; default: if (nCode >= 1601 && nCode <= 1602) { strValue = "A"; break; } if (nCode >= 1603 && nCode <= 1615) { strValue = "AI"; break; } if (nCode >= 1616 && nCode <= 1624) { strValue = "AN"; break; } if (nCode >= 1625 && nCode <= 1627) { strValue = "ANG"; break; } if (nCode >= 1628 && nCode <= 1636) { strValue = "AO"; break; } if (nCode >= 1637 && nCode <= 1654) { strValue = "BA"; break; } if (nCode >= 1655 && nCode <= 1662) { strValue = "BAI"; break; } if (nCode >= 1663 && nCode <= 1677) { strValue = "BAN"; break; } if (nCode >= 1678 && nCode <= 1689) { strValue = "BANG"; break; } if (nCode >= 1690 && nCode <= 1712) { strValue = "BAO"; break; } if (nCode >= 1713 && nCode <= 1727) { strValue = "BEI"; break; } if (nCode >= 1728 && nCode <= 1731) { strValue = "BEN"; break; } if (nCode >= 1732 && nCode <= 1737) { strValue = "BENG"; break; } if (nCode > 1738 && nCode <= 1761) { strValue = "BI"; break; } if (nCode >= 1762 && nCode <= 1773) { strValue = "BIAN"; break; } if (nCode >= 1774 && nCode <= 1777) { strValue = "BIAO"; break; } if (nCode >= 1778 && nCode <= 1781) { strValue = "BIE"; break; } if (nCode >= 1782 && nCode <= 1787) { strValue = "BIN"; break; } if (nCode >= 1788 && nCode <= 1794) { strValue = "BING"; break; } if (nCode >= 1801 && nCode <= 1802) { strValue = "BING"; break; } if (nCode >= 1803 && nCode <= 1821) { strValue = "BO"; break; } if (nCode >= 1822 && nCode <= 1832) { strValue = "BU"; break; } if (nCode == 1833) { strValue = "CA"; break; } if (nCode >= 1834 && nCode <= 1844) { strValue = "CAI"; break; } if (nCode >= 1845 && nCode <= 1851) { strValue = "CAN"; break; } if (nCode >= 1852 && nCode <= 1856) { strValue = "CANG"; break; } if (nCode >= 1857 && nCode <= 1861) { strValue = "CAO"; break; } if (nCode >= 1862 && nCode <= 1866) { strValue = "CE"; break; } if (nCode >= 1867 && nCode <= 1868) { strValue = "CENG"; break; } if (nCode >= 1869 && nCode <= 1879) { strValue = "CHA"; break; } if (nCode >= 1880 && nCode <= 1882) { strValue = "CHAI"; break; } if (nCode >= 1883 && nCode <= 1892) { strValue = "CHAN"; break; } if (nCode >= 1893 && nCode <= 1911) { strValue = "CHANG"; break; } if (nCode >= 1912 && nCode <= 1920) { strValue = "CHAO"; break; } if (nCode >= 1921 && nCode <= 1926) { strValue = "CHE"; break; } if (nCode >= 1927 && nCode <= 1936) { strValue = "CHEN"; break; } if (nCode >= 1937 && nCode <= 1951) { strValue = "CHENG"; break; } if (nCode >= 1952 && nCode <= 1967) { strValue = "CHI"; break; } if (nCode >= 1968 && nCode <= 1972) { strValue = "CHONG"; break; } if (nCode >= 1973 && nCode <= 1984) { strValue = "CHOU"; break; } if (nCode >= 1985 && nCode <= 2006) { strValue = "CHU"; break; } if (nCode == 2007) { strValue = "CHUAI"; break; } if (nCode >= 2008 && nCode <= 2014) { strValue = "CHUAN"; break; } if (nCode >= 2015 && nCode <= 2020) { strValue = "CHUANG"; break; } if (nCode >= 2021 && nCode <= 2025) { strValue = "CHUI"; break; } if (nCode >= 2026 && nCode <= 2032) { strValue = "CHUN"; break; } if (nCode >= 2033 && nCode <= 2034) { strValue = "CHUO"; break; } if (nCode >= 2035 && nCode <= 2046) { strValue = "CI"; break; } if (nCode >= 2047 && nCode <= 2052) { strValue = "CONG"; break; } if (nCode >= 2054 && nCode <= 2057) { strValue = "CU"; break; } if (nCode >= 2058 && nCode <= 2060) { strValue = "CUAN"; break; } if (nCode >= 2061 && nCode <= 2068) { strValue = "CUI"; break; } if (nCode >= 2069 && nCode <= 2071) { strValue = "CUN"; break; } if (nCode >= 2072 && nCode <= 2077) { strValue = "CUO"; break; } if (nCode >= 2078 && nCode <= 2083) { strValue = "DA"; break; } if (nCode >= 2084 && nCode <= 2094) { strValue = "DAI"; break; } if (nCode >= 2102 && nCode <= 2116) { strValue = "DAN"; break; } if (nCode >= 2117 && nCode <= 2121) { strValue = "DANG"; break; } if (nCode >= 2122 && nCode <= 2133) { strValue = "DAO"; break; } if (nCode >= 2134 && nCode <= 2136) { strValue = "DE"; break; } if (nCode >= 2137 && nCode <= 2143) { strValue = "DENG"; break; } if (nCode >= 2144 && nCode <= 2162) { strValue = "DI"; break; } if (nCode >= 2163 && nCode <= 2178) { strValue = "DIAN"; break; } if (nCode >= 2179 && nCode <= 2187) { strValue = "DIAO"; break; } if (nCode >= 2188 && nCode <= 2194) { strValue = "DIE"; break; } if (nCode >= 2201 && nCode <= 2209) { strValue = "DING"; break; } if (nCode == 2210) { strValue = "DIU"; break; } if (nCode >= 2211 && nCode <= 2220) { strValue = "DONG"; break; } if (nCode >= 2221 && nCode <= 2227) { strValue = "DOU"; break; } if (nCode >= 2228 && nCode <= 2242) { strValue = "DU"; break; } if (nCode >= 2243 && nCode <= 2248) { strValue = "DUAN"; break; } if (nCode >= 2249 && nCode <= 2252) { strValue = "DUI"; break; } if (nCode >= 2253 && nCode <= 2261) { strValue = "DUN"; break; } if (nCode >= 2262 && nCode <= 2273) { strValue = "DUO"; break; } if (nCode >= 2274 && nCode <= 2286) { strValue = "E"; break; } if (nCode == 2287) { strValue = "EN"; break; } if (nCode >= 2288 && nCode <= 2294 || nCode == 2301) { strValue = "ER"; break; } if (nCode >= 2302 && nCode <= 2309) { strValue = "FA"; break; } if (nCode >= 2310 && nCode <= 2326) { strValue = "FAN"; break; } if (nCode >= 2327 && nCode <= 2337) { strValue = "FANG"; break; } if (nCode >= 2338 && nCode <= 2349) { strValue = "FEI"; break; } if (nCode >= 2350 && nCode <= 2364) { strValue = "FEN"; break; } if (nCode >= 2365 && nCode <= 2379) { strValue = "FENG"; break; } if (nCode == 2380) { strValue = "FO"; break; } if (nCode == 2381) { strValue = "FOU"; break; } if (nCode >= 2382 && nCode <= 2432) { strValue = "FU"; break; } if (nCode >= 2435 && nCode <= 2440) { strValue = "GAI"; break; } if (nCode >= 2441 && nCode <= 2451) { strValue = "GAN"; break; } if (nCode >= 2452 && nCode <= 2460) { strValue = "GANG"; break; } if (nCode >= 2461 && nCode <= 2470) { strValue = "GAO"; break; } if (nCode >= 2471 && nCode <= 2487) { strValue = "GE"; break; } if (nCode == 2488) { strValue = "GEI"; break; } if (nCode >= 2489 && nCode <= 2490) { strValue = "GEN"; break; } if (nCode >= 2491 && nCode <= 2503) { strValue = "GENG"; break; } if (nCode >= 2504 && nCode <= 2518) { strValue = "GONG"; break; } if (nCode >= 2519 && nCode <= 2527) { strValue = "GOU"; break; } if (nCode >= 2528 && nCode <= 2545) { strValue = "GU"; break; } if (nCode >= 2546 && nCode <= 2551) { strValue = "GUA"; break; } if (nCode >= 2552 && nCode <= 2554) { strValue = "GUAI"; break; } if (nCode >= 2555 && nCode <= 2565) { strValue = "GUAN"; break; } if (nCode >= 2566 && nCode <= 2568) { strValue = "GUANG"; break; } if (nCode >= 2569 && nCode <= 2584) { strValue = "GUI"; break; } if (nCode >= 2585 && nCode <= 2587) { strValue = "GUN"; break; } if (nCode >= 2588 && nCode <= 2593) { strValue = "GUO"; break; } if (nCode == 2594) { strValue = "HA"; break; } if (nCode >= 2601 && nCode <= 2607) { strValue = "HAI"; break; } if (nCode >= 2608 && nCode <= 2626) { strValue = "HAN"; break; } if (nCode >= 2627 && nCode <= 2629) { strValue = "HANG"; break; } if (nCode >= 2630 && nCode <= 2638) { strValue = "HAO"; break; } if (nCode >= 2639 && nCode <= 2656) { strValue = "HE"; break; } if (nCode >= 2657 && nCode <= 2658) { strValue = "HEI"; break; } if (nCode >= 2659 && nCode <= 2662) { strValue = "HEN"; break; } if (nCode >= 2663 && nCode <= 2667) { strValue = "HENG"; break; } if (nCode >= 2668 && nCode <= 2676) { strValue = "HONG"; break; } if (nCode >= 2677 && nCode <= 2683) { strValue = "HOU"; break; } if (nCode >= 2684 && nCode <= 2707) { strValue = "HU"; break; } if (nCode >= 2708 && nCode <= 2716) { strValue = "HUA"; break; } if (nCode >= 2717 && nCode <= 2721) { strValue = "HUAI"; break; } if (nCode >= 2722 && nCode <= 2735) { strValue = "HUAN"; break; } if (nCode >= 2736 && nCode <= 2749) { strValue = "HUANG"; break; } if (nCode >= 2750 && nCode <= 2770) { strValue = "HUI"; break; } if (nCode >= 2771 && nCode <= 2776) { strValue = "HUN"; break; } if (nCode >= 2777 && nCode <= 2786) { strValue = "HUO"; break; } if (nCode >= 2787 && nCode <= 2845) { strValue = "JI"; break; } if (nCode >= 2846 && nCode <= 2862) { strValue = "JIA"; break; } if (nCode >= 2863 && nCode <= 2908) { strValue = "JIAN"; break; } if (nCode >= 2909 && nCode <= 2921) { strValue = "JIANG"; break; } if (nCode >= 2922 && nCode <= 2949) { strValue = "JIAO"; break; } if (nCode >= 2950 && nCode <= 2976) { strValue = "JIE"; break; } if (nCode >= 2977 && nCode <= 3002) { strValue = "JIN"; break; } if (nCode >= 3003 && nCode <= 3027) { strValue = "JING"; break; } if (nCode >= 3028 && nCode <= 3029) { strValue = "JIONG"; break; } if (nCode >= 3030 && nCode <= 3046) { strValue = "JIU"; break; } if (nCode >= 3047 && nCode <= 3071) { strValue = "JU"; break; } if (nCode >= 3072 && nCode <= 3078) { strValue = "JUAN"; break; } if (nCode >= 3079 && nCode <= 3088) { strValue = "JUE"; break; } if (nCode >= 3089 && nCode <= 3105) { strValue = "JUN"; break; } if (nCode >= 3106 && nCode <= 3109) { strValue = "KA"; break; } if (nCode >= 3110 && nCode <= 3114) { strValue = "KAI"; break; } if (nCode >= 3115 && nCode <= 3120) { strValue = "KAN"; break; } if (nCode >= 3121 && nCode <= 3127) { strValue = "KANG"; break; } if (nCode >= 3128 && nCode <= 3131) { strValue = "KAO"; break; } if (nCode >= 3132 && nCode <= 3146) { strValue = "KE"; break; } if (nCode >= 3147 && nCode <= 3150) { strValue = "KEN"; break; } if (nCode >= 3151 && nCode <= 3152) { strValue = "KENG"; break; } if (nCode >= 3153 && nCode <= 3156) { strValue = "KONG"; break; } if (nCode >= 3157 && nCode <= 3160) { strValue = "KOU"; break; } if (nCode >= 3161 && nCode <= 3167) { strValue = "KU"; break; } if (nCode >= 3168 && nCode <= 3172) { strValue = "KUA"; break; } if (nCode >= 3173 && nCode <= 3176) { strValue = "KUAI"; break; } if (nCode >= 3177 && nCode <= 3178) { strValue = "KUAN"; break; } if (nCode >= 3179 && nCode <= 3186) { strValue = "KUANG"; break; } if (nCode >= 3187 && nCode <= 3203) { strValue = "KUI"; break; } if (nCode >= 3204 && nCode <= 3207) { strValue = "KUN"; break; } if (nCode >= 3208 && nCode <= 3211) { strValue = "KUO"; break; } if (nCode >= 3212 && nCode <= 3218) { strValue = "LA"; break; } if (nCode >= 3219 && nCode <= 3221) { strValue = "LAI"; break; } if (nCode >= 3222 && nCode <= 3236) { strValue = "LAN"; break; } if (nCode >= 3237 && nCode <= 3243) { strValue = "LANG"; break; } if (nCode >= 3244 && nCode <= 3252) { strValue = "LAO"; break; } if (nCode >= 3253 && nCode <= 3254) { strValue = "LE"; break; } if (nCode >= 3255 && nCode <= 3265) { strValue = "LEI"; break; } if (nCode >= 3266 && nCode <= 3268) { strValue = "LENG"; break; } if (nCode >= 3269 && nCode <= 3308) { strValue = "LI"; } if (nCode == 3309) { strValue = "LIA"; break; } if (nCode >= 3310 && nCode <= 3323) { strValue = "LIAN"; break; } if (nCode >= 3324 && nCode <= 3334) { strValue = "LIANG"; break; } if (nCode >= 3335 && nCode <= 3347) { strValue = "LIAO"; break; } if (nCode >= 3348 && nCode <= 3352) { strValue = "LIE"; break; } if (nCode >= 3353 && nCode <= 3363) { strValue = "LIN"; break; } if (nCode >= 3364 && nCode <= 3378) { strValue = "LING"; break; } if (nCode >= 3379 && nCode <= 3389) { strValue = "LIU"; break; } if (nCode >= 3390 && nCode <= 3404) { strValue = "LONG"; break; } if (nCode >= 3405 && nCode <= 3410) { strValue = "LOU"; break; } if (nCode >= 3411 && nCode <= 3444) { strValue = "LU"; break; } if (nCode >= 3445 && nCode <= 3450) { strValue = "LUAN"; break; } if (nCode >= 3451 && nCode <= 3452) { strValue = "LUE"; break; } if (nCode >= 3453 && nCode <= 3459) { strValue = "LUN"; break; } if (nCode >= 3460 && nCode <= 3471) { strValue = "LUO"; break; } if (nCode >= 3472 && nCode <= 3480) { strValue = "MA"; break; } if (nCode >= 3481 && nCode <= 3486) { strValue = "MAI"; break; } if (nCode >= 3487 && nCode <= 3501) { strValue = "MAN"; break; } if (nCode >= 3502 && nCode <= 3507) { strValue = "MANG"; break; } if (nCode >= 3508 && nCode <= 3519) { strValue = "MAO"; break; } if (nCode == 3520) { strValue = "ME"; break; } if (nCode >= 3521 && nCode <= 3536) { strValue = "MEI"; break; } if (nCode >= 3537 && nCode <= 3539) { strValue = "MEN"; break; } if (nCode >= 3540 && nCode <= 3547) { strValue = "MENG"; break; } if (nCode >= 3548 && nCode <= 3561) { strValue = "MI"; } if (nCode >= 3562 && nCode <= 3570) { strValue = "MIAN"; break; } if (nCode >= 3571 && nCode <= 3578) { strValue = "MIAO"; break; } if (nCode >= 3579 && nCode <= 3580) { strValue = "MIE"; break; } if (nCode >= 3581 && nCode <= 3586) { strValue = "MIN"; break; } if (nCode >= 3587 && nCode <= 3592) { strValue = "MING"; break; } if (nCode == 3593) { strValue == "MIU"; break; } if (nCode >= 3594 && nCode <= 3616) { strValue = "MO"; break; } if (nCode >= 3617 && nCode <= 3619) { strValue = "MOU"; break; } if (nCode >= 3620 && nCode <= 3634) { strValue = "MU"; break; } if (nCode >= 3635 && nCode <= 3641) { strValue = "NA"; break; } if (nCode >= 3642 && nCode <= 3646) { strValue = "NAI"; break; } if (nCode >= 3647 && nCode <= 3649) { strValue = "NAN"; break; } if (nCode == 3650) { strValue = "NANG"; break; } if (nCode >= 3651 && nCode <= 3655) { strValue = "NAO"; break; } if (nCode == 3656) { strValue = "NE"; break; } if (nCode >= 3657 && nCode <= 3658) { strValue = "NEI"; break; } if (nCode == 3659) { strValue = "NEN"; break; } if (nCode == 3660) { strValue = "NENG"; break; } if (nCode >= 3661 && nCode <= 3671) { strValue = "NI"; break; } if (nCode >= 3672 && nCode <= 3678) { strValue = "NIAN"; break; } if (nCode >= 3679 && nCode <= 3680) { strValue = "NIANG"; break; } if (nCode >= 3681 && nCode <= 3682) { strValue = "NIAO"; break; } if (nCode >= 3683 && nCode <= 3689) { strValue = "NIE"; break; } if (nCode == 3690) { strValue = "NIN"; break; } if (nCode >= 3691 && nCode <= 3702) { strValue = "NING"; break; } if (nCode >= 3703 && nCode <= 3706) { strValue = "NIU"; break; } if (nCode >= 3707 && nCode <= 3710) { strValue = "NONG"; break; } if (nCode >= 3711 && nCode <= 3714) { strValue = "NU"; break; } if (nCode == 3715) { strValue = "NUAN"; break; } if (nCode >= 3716 && nCode <= 3717) { strValue = "NUE"; break; } if (nCode >= 3718 && nCode <= 3721) { strValue = "NUO"; break; } if (nCode == 3722) { strValue = "O"; break; } if (nCode >= 3723 && nCode <= 3729) { strValue = "OU"; break; } if (nCode >= 3730 && nCode <= 3735) { strValue = "PA"; break; } if (nCode >= 3736 && nCode <= 3741) { strValue = "PAI"; break; } if (nCode >= 3742 && nCode <= 3749) { strValue = "PAN"; break; } if (nCode >= 3750 && nCode <= 3754) { strValue = "PANG"; break; } if (nCode >= 3755 && nCode <= 3761) { strValue = "PAO"; break; } if (nCode >= 3762 && nCode <= 3770) { strValue = "PEI"; break; } if (nCode >= 3771 && nCode <= 3772) { strValue = "PEN"; break; } if (nCode >= 3773 && nCode <= 3786) { strValue = "PENG"; break; } if (nCode >= 3787 && nCode <= 3809) { strValue = "PI"; break; } if (nCode >= 3810 && nCode <= 3813) { strValue = "PIAN"; break; } if (nCode >= 3814 && nCode <= 3817) { strValue = "PIAO"; break; } if (nCode >= 3818 && nCode <= 3819) { strValue = "PIE"; break; } if (nCode >= 3820 && nCode <= 3824) { strValue = "PIN"; break; } if (nCode >= 3825 && nCode <= 3833) { strValue = "PING"; break; } if (nCode >= 3834 && nCode <= 3841) { strValue = "PO"; break; } if (nCode == 3842) { strValue = "POU"; break; } if (nCode >= 3843 && nCode <= 3857) { strValue = "PU"; break; } if (nCode >= 3858 && nCode <= 3893) { strValue = "QI"; break; } if (nCode == 3894 || nCode >= 3901 && nCode <= 3902) { strValue = "QIA"; break; } if (nCode >= 3903 && nCode <= 3924) { strValue = "QIAN"; break; } if (nCode >= 3925 && nCode <= 3932) { strValue = "QIANG"; break; } if (nCode >= 3933 && nCode <= 3947) { strValue = "QIAO"; break; } if (nCode >= 3948 && nCode <= 3952) { strValue = "QIE"; break; } if (nCode >= 3953 && nCode <= 3963) { strValue = "QIN"; break; } if (nCode >= 3964 && nCode <= 3976) { strValue = "QING"; break; } if (nCode >= 3977 && nCode <= 3978) { strValue = "QIONG"; break; } if (nCode >= 3979 && nCode <= 3986) { strValue = "QIU"; break; } if (nCode >= 3987 && nCode <= 4005) { strValue = "QU"; break; } if (nCode >= 4006 && nCode <= 4016) { strValue = "QUAN"; break; } if (nCode >= 4017 && nCode <= 4024) { strValue = "QUE"; break; } if (nCode >= 4025 && nCode <= 4026) { strValue = "QUN"; break; } if (nCode >= 4027 && nCode <= 4030) { strValue = "RAN"; break; } if (nCode >= 4031 && nCode <= 4035) { strValue = "RANG"; } if (nCode >= 4036 && nCode <= 4038) { strValue = "RAO"; break; } if (nCode >= 4039 && nCode <= 4040) { strValue = "RE"; break; } if (nCode >= 4041 && nCode <= 4050) { strValue = "REN"; break; } if (nCode >= 4051 && nCode <= 4052) { strValue = "RENG"; break; } if (nCode == 4053) { strValue = "RI"; break; } if (nCode >= 4054 && nCode <= 4063) { strValue = "RONG"; break; } if (nCode >= 4064 && nCode <= 4066) { strValue = "ROU"; break; } if (nCode >= 4067 && nCode <= 4076) { strValue = "RU"; break; } if (nCode >= 4077 && nCode <= 4078) { strValue = "RUAN"; break; } if (nCode >= 4079 && nCode <= 4081) { strValue = "RUI"; break; } if (nCode >= 4082 && nCode <= 4083) { strValue = "RUN"; break; } if (nCode >= 4084 && nCode <= 4085) { strValue = "RUO"; break; } if (nCode >= 4086 && nCode <= 4088) { strValue = "SA"; break; } if (nCode >= 4089 && nCode <= 4092) { strValue = "SAI"; break; } if (nCode >= 4093 && nCode <= 4094) { strValue = "SAN"; break; } if (nCode >= 4101 && nCode <= 4102) { strValue = "SAN"; break; } if (nCode >= 4103 && nCode <= 4105) { strValue = "SANG"; break; } if (nCode >= 4106 && nCode <= 4109) { strValue = "SAO"; break; } if (nCode >= 4110 && nCode <= 4112) { strValue = "SE"; break; } if (nCode == 4113) { strValue = "SEN"; } if (nCode == 4114) { strValue = "SENG"; break; } if (nCode >= 4115 && nCode <= 4123) { strValue = "SHA"; break; } if (nCode >= 4124 && nCode <= 4125) { strValue = "SHAI"; break; } if (nCode >= 4126 && nCode <= 4141) { strValue = "SHAN"; break; } if (nCode >= 4142 && nCode <= 4149) { strValue = "SHANG"; break; } if (nCode >= 4150 && nCode <= 4160) { strValue = "SHAO"; break; } if (nCode >= 4161 && nCode <= 4172) { strValue = "SHE"; break; } if (nCode >= 4173 && nCode <= 4188) { strValue = "SHEN"; break; } if (nCode >= 4189 && nCode <= 4205) { strValue = "SHENG"; break; } if (nCode >= 4206 && nCode <= 4252) { strValue = "SHI"; break; } if (nCode >= 4253 && nCode <= 4262) { strValue = "SHOU"; break; } if (nCode >= 4263 && nCode <= 4301) { strValue = "SHU"; break; } if (nCode >= 4302 && nCode <= 4303) { strValue = "SHUA"; break; } if (nCode >= 4304 && nCode <= 4307) { strValue = "SHUAI"; break; } if (nCode >= 4308 && nCode <= 4309) { strValue = "SHUAN"; break; } if (nCode >= 4310 && nCode <= 4312) { strValue = "SHUANG"; break; } if (nCode >= 4313 && nCode <= 4316) { strValue = "SHUI"; break; } if (nCode >= 4317 && nCode <= 4320) { strValue = "SHUN"; break; } if (nCode >= 4321 && nCode <= 4324) { strValue = "SHUO"; break; } if (nCode >= 4325 && nCode <= 4340) { strValue = "SI"; break; } if (nCode >= 4341 && nCode <= 4348) { strValue = "SONG"; break; } if (nCode >= 4349 && nCode <= 4352) { strValue = "SOU"; break; } if (nCode >= 4353 && nCode <= 4364) { strValue = "SU"; break; } if (nCode >= 4365 && nCode <= 4367) { strValue = "SUAN"; break; } if (nCode >= 4368 && nCode <= 4378) { strValue = "SUI"; break; } if (nCode >= 4379 && nCode <= 4381) { strValue = "SUN"; break; } if (nCode >= 4382 && nCode <= 4389) { strValue = "SUO"; break; } if (nCode >= 4390 && nCode <= 4404) { strValue = "TA"; break; } if (nCode >= 4405 && nCode <= 4413) { strValue = "TAI"; break; } if (nCode >= 4414 && nCode <= 4431) { strValue = "TAN"; break; } if (nCode >= 4432 && nCode <= 4444) { strValue = "TANG"; break; } if (nCode >= 4445 && nCode <= 4455) { strValue = "TAO"; break; } if (nCode == 4456) { strValue = "TE"; break; } if (nCode >= 4457 && nCode <= 4460) { strValue = "TENG"; break; } if (nCode >= 4461 && nCode <= 4475) { strValue = "TI"; break; } if (nCode >= 4476 && nCode <= 4483) { strValue = "TIAN"; break; } if (nCode >= 4484 && nCode <= 4488) { strValue = "TIAO"; break; } if (nCode >= 4489 && nCode <= 4491) { strValue = "TIE"; break; } if (nCode >= 4492 && nCode <= 4507) { strValue = "TING"; break; } if (nCode >= 4508 && nCode <= 4520) { strValue = "TONG"; break; } if (nCode >= 4521 && nCode <= 4524) { strValue = "TOU"; break; } if (nCode >= 4525 && nCode <= 4535) { strValue = "TU"; break; } if (nCode >= 4536 && nCode <= 4537) { strValue = "TUAN"; break; } if (nCode >= 4538 && nCode <= 4543) { strValue = "TUI"; break; } if (nCode >= 4544 && nCode <= 4546) { strValue = "TUN"; break; } if (nCode >= 4547 && nCode <= 4557) { strValue = "TUO"; break; } if (nCode >= 4558 && nCode <= 4564) { strValue = "WA"; break; } if (nCode >= 4565 && nCode <= 4566) { strValue = "WAI"; break; } if (nCode >= 4567 && nCode <= 4583) { strValue = "WAN"; break; } if (nCode >= 4584 && nCode <= 4593) { strValue = "WANG"; break; } if (nCode >= 4594 && nCode <= 4632) { strValue = "WEI"; break; } if (nCode >= 4633 && nCode <= 4642) { strValue = "WEN"; break; } if (nCode >= 4643 && nCode <= 4645) { strValue = "WENG"; break; } if (nCode >= 4646 && nCode <= 4654) { strValue = "WO"; break; } if (nCode >= 4655 && nCode <= 4683) { strValue = "WU"; break; } if (nCode >= 4684 && nCode <= 4724) { strValue = "XI"; break; } if (nCode >= 4725 && nCode <= 4737) { strValue = "XIA"; break; } if (nCode >= 4738 && nCode <= 4763) { strValue = "XIAN"; break; } if (nCode >= 4764 && nCode <= 4783) { strValue = "XIANG"; break; } if (nCode >= 4784 && nCode <= 4807) { strValue = "XIAO"; break; } if (nCode >= 4809 && nCode <= 4828) { strValue = "XIE"; break; } if (nCode >= 4829 && nCode <= 4838) { strValue = "XIN"; break; } if (nCode >= 4839 && nCode <= 4853) { strValue = "XING"; break; } if (nCode >= 4854 && nCode <= 4860) { strValue = "XIONG"; break; } if (nCode >= 4861 && nCode <= 4869) { strValue = "XIU"; break; } if (nCode >= 4870 && nCode <= 4888) { strValue = "XU"; break; } if (nCode >= 4889 && nCode <= 4904) { strValue = "XUAN"; break; } if (nCode >= 4905 && nCode <= 4910) { strValue = "XUE"; break; } if (nCode >= 4911 && nCode <= 4924) { strValue = "XUN"; break; } if (nCode >= 4925 && nCode <= 4940) { strValue = "YA"; break; } if (nCode >= 4941 && nCode <= 4973) { strValue = "YAN"; break; } if (nCode >= 4974 && nCode <= 4990) { strValue = "YANG"; break; } if (nCode >= 4991 && nCode <= 5011) { strValue = "YAO"; break; } if (nCode >= 5012 && nCode <= 5026) { strValue = "YE"; break; } if (nCode >= 5027 && nCode <= 5079) { strValue = "YI"; break; } if (nCode >= 5080 && nCode <= 5101) { strValue = "YIN"; break; } if (nCode >= 5102 && nCode <= 5119) { strValue = "YING"; break; } if (nCode == 5120) { strValue = "YO"; break; } if (nCode >= 5121 && nCode <= 5135) { strValue = "YONG"; break; } if (nCode >= 5136 && nCode <= 5155) { strValue = "YOU"; break; } if (nCode >= 5156 && nCode <= 5206) { strValue = "YU"; break; } if (nCode >= 5207 && nCode <= 5226) { strValue = "YUAN"; break; } if (nCode >= 5227 && nCode <= 5236) { strValue = "YUE"; break; } if (nCode >= 5237 && nCode <= 5248) { strValue = "YUN"; break; } if (nCode >= 5249 && nCode <= 5251) { strValue = "ZA"; break; } if (nCode >= 5252 && nCode <= 5258) { strValue = "ZAI"; break; } if (nCode >= 5259 && nCode <= 5262) { strValue = "ZAN"; break; } if (nCode >= 5263 && nCode <= 5265) { strValue = "ZANG"; break; } if (nCode >= 5266 && nCode <= 5279) { strValue = "ZAO"; break; } if (nCode >= 5280 && nCode <= 5283) { strValue = "ZE"; break; } if (nCode == 5284) { strValue = "ZEI"; break; } if (nCode == 5285) { strValue = "ZEN"; break; } if (nCode >= 5286 && nCode <= 5289) { strValue = "ZENG"; break; } if (nCode >= 5290 && nCode <= 5309) { strValue = "ZHA"; break; } if (nCode >= 5310 && nCode <= 5315) { strValue = "ZHAI"; break; } if (nCode >= 5316 && nCode <= 5332) { strValue = "ZHAN"; break; } if (nCode >= 5333 && nCode <= 5347) { strValue = "ZHANG"; break; } if (nCode >= 5348 && nCode <= 5357) { strValue = "ZHAO"; break; } if (nCode >= 5358 && nCode <= 5367) { strValue = "ZHE"; break; } if (nCode >= 5368 && nCode <= 5383) { strValue = "ZHEN"; break; } if (nCode >= 5384 && nCode <= 5404) { strValue = "ZHENG"; break; } if (nCode >= 5405 && nCode <= 5447) { strValue = "ZHI"; break; } if (nCode >= 5448 && nCode <= 5458) { strValue = "ZHONG"; break; } if (nCode >= 5459 && nCode <= 5472) { strValue = "ZHOU"; break; } if (nCode >= 5473 && nCode <= 5504) { strValue = "ZHU"; break; } if (nCode >= 5505 && nCode <= 5506) { strValue = "ZHUA"; break; } if (nCode == 5507) { strValue = "ZHUAI"; break; } if (nCode >= 5508 && nCode <= 5513) { strValue = "ZHUAN"; break; } if (nCode >= 5514 && nCode <= 5520) { strValue = "ZHUANG"; break; } if (nCode >= 5521 && nCode <= 5526) { strValue = "ZHUI"; break; } if (nCode >= 5527 && nCode <= 5528) { strValue = "ZHUN"; break; } if (nCode >= 5529 && nCode <= 5539) { strValue = "ZHUO"; break; } if (nCode >= 5540 && nCode <= 5554) { strValue = "ZI"; break; } if (nCode >= 5555 && nCode <= 5561) { strValue = "ZONG"; break; } if (nCode >= 5562 && nCode <= 5565) { strValue = "ZOU"; break; } if (nCode >= 5566 && nCode <= 5573) { strValue = "ZU"; break; } if (nCode >= 5574 && nCode <= 5575) { strValue = "ZUAN"; break; } if (nCode >= 5576 && nCode <= 5579) { strValue = "ZUI"; break; } if (nCode >= 5580 && nCode <= 5581) { strValue = "ZUN"; break; } if (nCode >= 5582 && nCode <= 5589) { strValue = "ZUO"; break; } } if (strValue == "") { strValue = "?"; } return strValue; } #endif // CHINESETOLETTER_H ================================================ FILE: Core/Core.pri ================================================ DEPENDPATH += $$PWD INCLUDEPATH += $$PWD HEADERS += \ $$PWD/GlobalHotkey.h \ $$PWD/NoFocusDelegate.h \ $$PWD/signal_slot.h \ $$PWD/StatusDefine.h \ $$PWD/TR.h \ $$PWD/ChineseToLetter.h \ $$PWD/AutoStart.h \ $$PWD/FileRelation.h \ $$PWD/AutoStartHandle.h \ $$PWD/FileRelationHandle.h SOURCES += \ $$PWD/GlobalHotkey.cpp \ $$PWD/NoFocusDelegate.cpp \ $$PWD/AutoStart.cpp \ $$PWD/FileRelation.cpp \ $$PWD/AutoStartHandle.cpp \ $$PWD/FileRelationHandle.cpp #עapi LIBS += -lAdvapi32 #ˢϵͳ溯SHChangeNotify LIBS += -lshell32 ================================================ FILE: Core/FileRelation.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file FileRelation.cpp * \author chengxuan 787280310@qq.com * \date 2015-05-01 * \brief ʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-01 by chengxuan * * \endverbatim * */ #include "FileRelation.h" #include #include FileRelation::FileRelation() { /*Do nothing.*/ } FileRelation::~FileRelation() { /*Do nothing.*/ } void FileRelation::registerFileRelation( WCHAR *wExt, WCHAR *wAppPath, WCHAR *wAppKey, WCHAR *wDefaultIcon, WCHAR *wDescribe ) { WCHAR wTemp[MAX_PATH]; HKEY hKey; //Ϊ.wav,ֵΪCZPlayer2.WAV RegCreateKey(HKEY_CLASSES_ROOT, wExt, &hKey); //.wav RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, wAppKey, lstrlen(wAppKey) + 1); //CZPlayer2.WAV RegCloseKey(hKey); //ΪCZPlayer2.WAV,ֵΪWAVļ RegCreateKey(HKEY_CLASSES_ROOT, wAppKey, &hKey); //CZPlayer2.WAV RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, wDescribe, lstrlen(wDescribe) + 1); //WAVļ RegCloseKey(hKey); //Ĭͼ(:D:/visual studio 2010 Projects/spectrum/debug/spectrum.exe,0) wsprintf(wTemp, (wchar_t*)QString("%s\\DefaultIcon").utf16(), wAppKey); RegCreateKey(HKEY_CLASSES_ROOT, wTemp, &hKey); RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, wDefaultIcon, lstrlen(wDefaultIcon) + 1); RegCloseKey(hKey); //SHCNE_ASSOCCHANGED:޸ļ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);//þΪˢϵͳ wsprintf(wTemp, (wchar_t*)QString("%s\\Shell\\Open").utf16(), wAppKey); RegCreateKey(HKEY_CLASSES_ROOT, wTemp, &hKey); RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, (wchar_t*)QString("ʹ CZPlayer (&O)").utf16(), strlen("ʹ CZPlayer (&O)") + 1); RegCloseKey(hKey); //ù(:"D:/visual studio 2010 Projects/spectrum/debug/spectrum.exe" "%1") wsprintf(wTemp, (wchar_t*)QString("%s\\Shell\\Open\\Command").utf16(), wAppKey); RegCreateKey(HKEY_CLASSES_ROOT, wTemp, &hKey); wsprintf(wTemp ,(wchar_t*)QString("\"%s\" \"%%1\"").utf16(), wAppPath); RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, wTemp, lstrlen(wTemp) + 1); RegCloseKey(hKey); } void FileRelation::cancelFileRelation( WCHAR *wExt, WCHAR *wAppKey ) { WCHAR wTemp[MAX_PATH]; HKEY hKey; //Ϊ.wav,ֵΪCZPlayer2.WAV RegCreateKey(HKEY_CLASSES_ROOT, wExt, &hKey); //.wav RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, (wchar_t*)QString("").utf16(), 2); //CZPlayer2.WAV RegCloseKey(hKey); //Ĭͼ wsprintf(wTemp, (wchar_t*)QString("%s\\DefaultIcon").utf16(), wAppKey); RegCreateKey(HKEY_CLASSES_ROOT, wTemp, &hKey); RegSetValue(hKey, (wchar_t*)QString("").utf16(), REG_SZ, (wchar_t*)QString("").utf16(), 2 + 1); RegCloseKey(hKey); //SHCNE_ASSOCCHANGED:޸ļ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);//þΪˢϵͳ } bool FileRelation::checkFileRelation( const WCHAR* wExt, const WCHAR *wAppKey ) { bool isRelation = false; HKEY hKey; if(RegOpenKey(HKEY_CLASSES_ROOT, wExt, &hKey)==ERROR_SUCCESS) { WCHAR wData[MAX_PATH]; DWORD dwLen = MAX_PATH * sizeof(WCHAR); if (RegQueryValueEx(hKey, 0, 0, 0, (BYTE*)wData, &dwLen) == ERROR_SUCCESS) { if (lstrcmp(wData, wAppKey) == 0) { isRelation = true; } /*Else do nothing, and continue.*/ } /*Else do nothing, and continue.*/ RegCloseKey(hKey); return isRelation; } /*Else do nothing, and continue.*/ return isRelation; } ================================================ FILE: Core/FileRelation.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file FileRelation.h * \author chengxuan 787280310@qq.com * \date 2015-05-01 * \brief ͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-01 by chengxuan * * \endverbatim * */ #ifndef FILERELATION_H #define FILERELATION_H /*! \def FILERELATION_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define FILERELATION_VERSION 0x030000 #include #include /*! ļ */ class FileRelation { public: /*! 캯.*/ FileRelation(); /*! .*/ ~FileRelation(); public: /*! עļ * \param wExt Ҫչ(: ".wav") * \param wAppPath ҪӦó(: "C:/MyApp/MyApp.exe") * \param wAppKey wExtչעеļֵ(: "CZPlayer2.WAV") * \param wDefaultIcon չΪwAppPathͼļ(: "D:/visual studio 2010 Projects/spectrum/debug/spectrum.exe,0") * \param wDescribe ļ */ static void registerFileRelation(WCHAR *wExt, WCHAR *wAppPath, WCHAR *wAppKey, WCHAR *wDefaultIcon, WCHAR *wDescribe); /*! ȡļ * \param wExt Ҫչ(: ".wav") * \param wAppKey ExeNameչעеļֵ(: "CZPlayer2.0.WAV") */ static void cancelFileRelation(WCHAR *wExt, WCHAR *wAppKey); /*! жļ * \param wExt Ҫչ(: ".wav") * \param wAppKey ExeNameչעеļֵ(: "CZPlayer2.0.WAV") * \return true: ʾѹfalse: ʾδ */ static bool checkFileRelation(const WCHAR* wExt, const WCHAR *wAppKey); }; #endif //FILERELATION_H ================================================ FILE: Core/FileRelationHandle.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file FileRelationHandle.cpp * \author chengxuan 787280310@qq.com * \date 2015-05-02 * \brief ļʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-02 by chengxuan * * \endverbatim * */ #include "FileRelationHandle.h" #include "FileRelation.h" #include "GlobalConfig.h" #ifdef CZ_DEBUG #include #endif /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif #if FILERELATION_VERSION < 0x030000 #error "FileRelation version error." #endif FileRelationHandle::FileRelationHandle(QObject *parent) : QObject(parent) { this->createConnect(); } FileRelationHandle::~FileRelationHandle() { /*Do nothing.*/ } void FileRelationHandle::handleFileRelation(bool isRelationFile) { if (isRelationFile) { WCHAR filePath[MAX_PATH]; //ļ· WCHAR icoPath[MAX_PATH]; //ͼ· //õǰִļȫ· HMODULE hModule = GetModuleHandle(NULL); GetModuleFileName(hModule, filePath, sizeof(filePath)); wsprintf(icoPath, (wchar_t*)QString("%s,0").utf16(), filePath); FileRelation::registerFileRelation((wchar_t*)QString(".mp3").utf16(), filePath, (wchar_t*)QString("CZPlayer.MP3").utf16(), icoPath, (wchar_t*)QString("MP3ļ").utf16()); FileRelation::registerFileRelation((wchar_t*)QString(".wma").utf16(), filePath, (wchar_t*)QString("CZPlayer.WMA").utf16(), icoPath, (wchar_t*)QString("WMAļ").utf16()); FileRelation::registerFileRelation((wchar_t*)QString(".wav").utf16(), filePath, (wchar_t*)QString("CZPlayer.WAV").utf16(), icoPath, (wchar_t*)QString("WAVļ").utf16()); FileRelation::registerFileRelation((wchar_t*)QString(".ogg").utf16(), filePath, (wchar_t*)QString("CZPlayer.OGG").utf16(), icoPath, (wchar_t*)QString("OGGļ").utf16()); } else { FileRelation::cancelFileRelation((wchar_t*)QString(".mp3").utf16(), (wchar_t*)QString("CZPlayer.MP3").utf16()); FileRelation::cancelFileRelation((wchar_t*)QString(".wma").utf16(), (wchar_t*)QString("CZPlayer.WMA").utf16()); FileRelation::cancelFileRelation((wchar_t*)QString(".wav").utf16(), (wchar_t*)QString("CZPlayer.WAV").utf16()); FileRelation::cancelFileRelation((wchar_t*)QString(".ogg").utf16(), (wchar_t*)QString("CZPlayer.OGG").utf16()); } } void FileRelationHandle::createConnect() { GlobalConfig *config = GlobalConfig::instance(); connect(config, SIGNAL(sigDefaultPlayerChanged(bool)), this, SLOT(handleFileRelation(bool))); } ================================================ FILE: Core/FileRelationHandle.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file FileRelationHandle.h * \author chengxuan 787280310@qq.com * \date 2015-05-02 * \brief ļͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-05-02 by chengxuan * * \endverbatim * */ #ifndef FILERELATIONHANDLE_H #define FILERELATIONHANDLE_H /*! \def FILERELATIONHANDLE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define FILERELATIONHANDLE_VERSION 0x030000 #include /*! ļ */ class FileRelationHandle : public QObject { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ FileRelationHandle(QObject *parent = NULL); /*! .*/ ~FileRelationHandle(); private slots: /*! ļ * \param isRelationFile true:ļfalse:ȡ */ void handleFileRelation(bool isRelationFile); private: /*! ź */ void createConnect(); }; #endif // FILERELATIONHANDLE_H ================================================ FILE: Core/GlobalHotkey.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalHotKey.cpp * \author chengxuan 787280310@qq.com * \date 2015-01-31 * \brief ȫȼʵļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-31 by chengxuan * * \endverbatim * */ #include "GlobalHotkey.h" #include "qxtglobalshortcut.h" #include "GlobalConfig.h" /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if GLOBALCONFIG_VERSION < 0x030000 #error "GlobalConfig version error." #endif GlobalHotKey::GlobalHotKey(QObject *parent) : QObject(NULL) { //ѡ m_configOptions = new QxtGlobalShortcut(this); //ʾ/ m_showHideMainWidget = new QxtGlobalShortcut(this); //ģʽ/ m_minMainWidget = new QxtGlobalShortcut(this); //ļ m_openMusicfile = new QxtGlobalShortcut(this); //ʾ/б m_showDownload = new QxtGlobalShortcut(this); //ʾ/ظб m_showMusicList = new QxtGlobalShortcut(this); //ʾ/ m_showLrc = new QxtGlobalShortcut(this); ///ͣ m_playPause = new QxtGlobalShortcut(this); //һ m_last = new QxtGlobalShortcut(this); //һ m_nextSc = new QxtGlobalShortcut(this); GlobalConfig *config = GlobalConfig::instance(); connect(config, SIGNAL(sigSettingsHotKeyChanged(QString)), this, SLOT(handleSettingsHotKeyChanged(QString))); connect(config, SIGNAL(sigMinToTrayHotKeyChanged(QString)), this, SLOT(handleMinToTrayHotKeyChanged(QString))); connect(config, SIGNAL(sigOpenMinWidgetHotKeyChanged(QString)), this, SLOT(handleOpenMinWidgetHotKeyChanged(QString))); connect(config, SIGNAL(sigOpenMusicFileHotKeyChanged(QString)), this, SLOT(handleOpenMusicFileHotKeyChanged(QString))); connect(config, SIGNAL(sigOpenMediaWidgetHotKeyChanged(QString)), this, SLOT(handleOpenMediaWidgetHotKeyChanged(QString))); connect(config, SIGNAL(sigOpenListWidgetHotKeyChanged(QString)), this, SLOT(handleOpenListWidgetHotKeyChanged(QString))); connect(config, SIGNAL(sigOpenLrcHotKeyChanged(QString)), this, SLOT(handleOpenLrcHotKeyChanged(QString))); connect(config, SIGNAL(sigPauseHotKeyChanged(QString)), this, SLOT(handlePauseHotKeyChanged(QString))); connect(config, SIGNAL(sigLastHotKeyChanged(QString)), this, SLOT(handleLastHotKeyChanged(QString))); connect(config, SIGNAL(sigNextHotKeyChanged(QString)), this, SLOT(handleNextHotKeyChanged(QString))); connect(m_configOptions, SIGNAL(activated()), parent, SLOT(handleConfigOptions())); connect(m_showHideMainWidget, SIGNAL(activated()), parent, SLOT(handleShowHideMainWidget())); connect(m_minMainWidget, SIGNAL(activated()), parent, SLOT(handleMinMainWidget())); connect(m_openMusicfile, SIGNAL(activated()), parent, SLOT(handleOpenFile())); connect(m_showDownload, SIGNAL(activated()), parent, SLOT(handleOpenMediaWidget())); connect(m_showMusicList, SIGNAL(activated()), parent, SLOT(handleOpenMusicList())); connect(m_showLrc, SIGNAL(activated()), parent, SLOT(handleOpenMusicLrc())); connect(m_playPause, SIGNAL(activated()), parent, SLOT(handleSetPlayPaused())); connect(m_last, SIGNAL(activated()), parent, SLOT(handleSetPre())); connect(m_nextSc, SIGNAL(activated()), parent, SLOT(handleSetNext())); } GlobalHotKey::~GlobalHotKey() { m_configOptions->setEnabled(false); m_showHideMainWidget->setEnabled(false); m_minMainWidget->setEnabled(false); m_openMusicfile->setEnabled(false); m_showDownload->setEnabled(false); m_showMusicList->setEnabled(false); m_showLrc->setEnabled(false); m_playPause->setEnabled(false); m_last->setEnabled(false); m_nextSc->setEnabled(false); } void GlobalHotKey::handleSettingsHotKeyChanged(const QString &hotKey) { m_configOptions->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleMinToTrayHotKeyChanged(const QString &hotKey) { m_showHideMainWidget->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleOpenMinWidgetHotKeyChanged(const QString &hotKey) { m_minMainWidget->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleOpenMusicFileHotKeyChanged(const QString &hotKey) { m_openMusicfile->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleOpenMediaWidgetHotKeyChanged(const QString &hotKey) { m_showDownload->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleOpenListWidgetHotKeyChanged(const QString &hotKey) { m_showMusicList->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleOpenLrcHotKeyChanged(const QString &hotKey) { m_showLrc->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handlePauseHotKeyChanged(const QString &hotKey) { m_playPause->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleLastHotKeyChanged(const QString &hotKey) { m_last->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::handleNextHotKeyChanged(const QString &hotKey) { m_nextSc->setShortcut(QKeySequence(hotKey)); } void GlobalHotKey::setConfigOptionsHotkeyWork(bool isWork) { m_configOptions->setEnabled(isWork); } void GlobalHotKey::setShowHideMainWidgetHotkeyWork(bool isWork) { m_showHideMainWidget->setEnabled(isWork); } void GlobalHotKey::setMinMainWidgetHotkeyWork(bool isWork) { m_minMainWidget->setEnabled(isWork); } void GlobalHotKey::setOpenMusicfileHotkeyWork(bool isWork) { m_openMusicfile->setEnabled(isWork); } void GlobalHotKey::setShowDownloadHotkeyWork(bool isWork) { m_showDownload->setEnabled(isWork); } void GlobalHotKey::setShowMusicListHotkeyWork(bool isWork) { m_showMusicList->setEnabled(isWork); } void GlobalHotKey::setShowLrcHotkeyWork(bool isWork) { m_showLrc->setEnabled(isWork); } void GlobalHotKey::setPlayPauseHotkeyWork(bool isWork) { m_playPause->setEnabled(isWork); } void GlobalHotKey::setLastHotkeyWork(bool isWork) { m_last->setEnabled(isWork); } void GlobalHotKey::setNextHotkeyWork(bool isWork) { m_nextSc->setEnabled(isWork); } ================================================ FILE: Core/GlobalHotkey.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file GlobalHotKey.h * \author chengxuan 787280310@qq.com * \date 2015-01-31 * \brief ȫȼͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-31 by chengxuan * * \endverbatim * */ #ifndef GLOBALHOTKEY_H #define GLOBALHOTKEY_H /*! \def GLOBALHOTKEY_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define GLOBALHOTKEY_VERSION 0x030000 #include #include class QxtGlobalShortcut; /*! ȫȼ */ class GlobalHotKey : public QObject { Q_OBJECT public: /*! 캯 * \param parent ָ룬ĬΪNULL */ GlobalHotKey(QObject *parent = NULL); /*! .*/ ~GlobalHotKey(); public: /*! Ƿѡȼ * \param isWork trueãر */ void setConfigOptionsHotkeyWork(bool isWork); /*! Ƿʾ/ȼ * \param isWork trueãر */ void setShowHideMainWidgetHotkeyWork(bool isWork); /*! Ƿģʽ/ȼ * \param isWork trueãر */ void setMinMainWidgetHotkeyWork(bool isWork); /*! Ƿôļȼ * \param isWork trueãر */ void setOpenMusicfileHotkeyWork(bool isWork); /*! Ƿʾ/бȼ * \param isWork trueãر */ void setShowDownloadHotkeyWork(bool isWork); /*! Ƿʾ/ظбȼ * \param isWork trueãر */ void setShowMusicListHotkeyWork(bool isWork); /*! Ƿʾ/ȼ * \param isWork trueãر */ void setShowLrcHotkeyWork(bool isWork); /*! Ƿò/ͣȼ * \param isWork trueãر */ void setPlayPauseHotkeyWork(bool isWork); /*! Ƿһȼ * \param isWork trueãر */ void setLastHotkeyWork(bool isWork); /*! Ƿһȼ * \param isWork trueãر */ void setNextHotkeyWork(bool isWork); private slots: /*! ѡȼı * \param hotKey ѡȼ */ void handleSettingsHotKeyChanged(const QString &hotKey); /*! ʾ/ȼı * \param hotKey ʾ/ȼ */ void handleMinToTrayHotKeyChanged(const QString &hotKey); /*! ģʽ/ȼı * \param hotKey ģʽ/ȼ */ void handleOpenMinWidgetHotKeyChanged(const QString &hotKey); /*! ļȼı * \param hotKey ļȼ */ void handleOpenMusicFileHotKeyChanged(const QString &hotKey); /*! ʾ/ýȼı * \param hotKey ʾ/ýȼ */ void handleOpenMediaWidgetHotKeyChanged(const QString &hotKey); /*! ʾ/ظбȼı * \param hotKey ʾ/ظбȼ */ void handleOpenListWidgetHotKeyChanged(const QString &hotKey); /*! ʾ/ȼı * \param hotKey ʾ/ȼ */ void handleOpenLrcHotKeyChanged(const QString &hotKey); /*! /ͣȼı * \param hotKey /ͣȼ */ void handlePauseHotKeyChanged(const QString &hotKey); /*! һȼı * \param hotKey һȼ */ void handleLastHotKeyChanged(const QString &hotKey); /*! һȼı * \param hotKey һȼ */ void handleNextHotKeyChanged(const QString &hotKey); private: QxtGlobalShortcut *m_configOptions; /*!< ѡȼ*/ QxtGlobalShortcut *m_showHideMainWidget; /*!< ʾ/ȼ*/ QxtGlobalShortcut *m_minMainWidget; /*!< ģʽ/ȼ*/ QxtGlobalShortcut *m_openMusicfile; /*!< ļȼ*/ QxtGlobalShortcut *m_showDownload; /*!< ʾ/бȼ*/ QxtGlobalShortcut *m_showMusicList; /*!< ʾ/ظбȼ*/ QxtGlobalShortcut *m_showLrc; /*!< ʾ/ȼ*/ QxtGlobalShortcut *m_playPause; /*!< /ͣȼ*/ QxtGlobalShortcut *m_last; /*!< һȼ*/ QxtGlobalShortcut *m_nextSc; /*!< һȼ*/ }; #endif // GLOBALHOTKEY_H ================================================ FILE: Core/NoFocusDelegate.cpp ================================================ #include "NoFocusDelegate.h" NoFocusDelegate::NoFocusDelegate( QStyledItemDelegate *parent /*= 0*/ ) : m_parent(parent) { /*Do nothing.*/ } NoFocusDelegate::~NoFocusDelegate() { /*Do nothing.*/ } ================================================ FILE: Core/NoFocusDelegate.h ================================================ #ifndef NOFOCUSDELEGATE_H #define NOFOCUSDELEGATE_H #include #include #include class NoFocusDelegate : public QStyledItemDelegate { Q_OBJECT public: NoFocusDelegate(QStyledItemDelegate *parent = 0); ~NoFocusDelegate(); protected: void paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex &index) const { QStyleOptionViewItem itemOption(option); if (itemOption.state & QStyle::State_HasFocus) { itemOption.state = itemOption.state ^ QStyle::State_HasFocus; } QStyledItemDelegate::paint(painter, itemOption, index); } private: QStyledItemDelegate *m_parent; }; #endif // NOFOCUSDELEGATE_H ================================================ FILE: Core/StatusDefine.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file StatusDefine.h * \author chengxuan 787280310@qq.com * \date 2014-12-25 * \brief ״̬붨ͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-25 by chengxuan * * \endverbatim * */ #ifndef STATUSDEFINE_H #define STATUSDEFINE_H /*! \def STATUSDEFINE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define STATUSDEFINE_VERSION 0x030000 /*! ר״̬*/ enum AlbumDownloadStatus { AlbumDownloadFailed = 1, /*!< רʧ*/ AlbumDownloadSuccess = 2 /*!< רسɹ*/ }; /*! ״̬*/ enum LrcDownloadStatus { LrcDownloadFailed = 1, /*!< ʧ*/ LrcDownloadSuccess = 2 /*!< سɹ*/ }; /*! ״̬*/ enum MusicSearchStatus { MusicSearchFailed = 1, /*!< ʧ*/ MusicSearchSuccess = 2 /*!< ɹ*/ }; /*! ״̬*/ enum MusicDownloadStatus { MusicDownloadFailed = 1, /*!< ʧ*/ MusicDownloadSuccess = 2 /*!< سɹ*/ }; #endif // STATUSDEFINE_H ================================================ FILE: Core/TR.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file TR.h * \author chengxuan 787280310@qq.com * \date 2015-01-22 * \brief תļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2015-01-22 by chengxuan * * \endverbatim * */ #ifndef TR_H #define TR_H /*! \def TR_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define TR_VERSION 0x030000 #include #include #include /*! ַתGBK * \param chars תַ * \return תַ */ inline static QString TR(const char *chars) { static QTextCodec *codec = QTextCodec::codecForName("GBK"); return codec->toUnicode(chars); } /*! غַתGBK * \param chars תַ * \return תַ */ inline static QString TR(const QByteArray &chars) { static QTextCodec *codec = QTextCodec::codecForName("GBK"); return codec->toUnicode(chars); } #endif //TR_H ================================================ FILE: Core/signal_slot.h ================================================ #ifndef SIGNAL_handleH #define SIGNAL_handleH /**< ĿǰźŲۻ޶ֻ֧9Ĵ Ҫָ֧򽫴ڱļĩβ */ #include #define c_emit #define c_slots #define c_signals public #define c_connect(sender, signal, receiver, slot) ((sender) ->signal.Bind(receiver, slot)) ///////////////////////////////////////////no param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ class SlotBase { public: virtual ~SlotBase() {} virtual void exec() = 0; }; /**< ģ */ template class SlotImpl : public SlotBase { public: SlotImpl(T *pObj, void (T::*func)()) { m_pObj = pObj; m_Func = func; } void exec() { (m_pObj ->*m_Func)(); } private: T *m_pObj; void (T::*m_Func)(); }; /**< */ class Slot { public: template Slot(T *pObj, void (T::*func)()) { m_pSlotBase = new SlotImpl(pObj, func); } ~Slot() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec() { m_pSlotBase ->exec(); } private: SlotBase *m_pSlotBase; }; /**< ź */ class Signal { public: template void Bind(T *pObj, void (T::*func)()) { m_pSlotVec.push_back(new Slot(pObj, func)); } ~Signal() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(); } } private: std::vector< Slot* > m_pSlotVec; }; ///////////////////////////////////////////one param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase1 { public: virtual ~SlotBase1() {} virtual void exec(T1 t1) = 0; }; /**< ģ */ template class SlotImpl1 : public SlotBase1 { public: SlotImpl1(T *pObj, void (T::*func)(T1)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1) { (m_pObj ->*m_Func)(t1); } private: T *m_pObj; void (T::*m_Func)(T1); }; /**< */ template class Slot1 { public: template Slot1(T *pObj, void (T::*func)(T1)) { m_pSlotBase = new SlotImpl1(pObj, func); } ~Slot1() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1) { m_pSlotBase ->exec(t1); } private: SlotBase1 *m_pSlotBase; }; /**< ź */ template class Signal1 { public: template void Bind(T *pObj, void (T::*func)(T1)) { m_pSlotVec.push_back(new Slot1(pObj, func)); } ~Signal1() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1); } } private: std::vector< Slot1* > m_pSlotVec; }; ///////////////////////////////////////////two param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase2 { public: virtual ~SlotBase2() {} virtual void exec(T1 t1, T2 t2) = 0; }; /**< ģ */ template class SlotImpl2 : public SlotBase2 { public: SlotImpl2(T *pObj, void (T::*func)(T1, T2)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2) { (m_pObj ->*m_Func)(t1, t2); } private: T *m_pObj; void (T::*m_Func)(T1, T2); }; /**< */ template class Slot2 { public: template Slot2(T *pObj, void (T::*func)(T1, T2)) { m_pSlotBase = new SlotImpl2(pObj, func); } ~Slot2() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2) { m_pSlotBase ->exec(t1, t2); } private: SlotBase2 *m_pSlotBase; }; /**< ź */ template class Signal2 { public: template void Bind(T *pObj, void (T::*func)(T1, T2)) { m_pSlotVec.push_back(new Slot2(pObj, func)); } ~Signal2() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2); } } private: std::vector< Slot2* > m_pSlotVec; }; ///////////////////////////////////////////three param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase3 { public: virtual ~SlotBase3() {} virtual void exec(T1 t1, T2 t2, T3 t3) = 0; }; /**< ģ */ template class SlotImpl3 : public SlotBase3 { public: SlotImpl3(T *pObj, void (T::*func)(T1, T2, T3)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3) { (m_pObj ->*m_Func)(t1, t2, t3); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3); }; /**< */ template class Slot3 { public: template Slot3(T *pObj, void (T::*func)(T1, T2, T3)) { m_pSlotBase = new SlotImpl3(pObj, func); } ~Slot3() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3) { m_pSlotBase ->exec(t1, t2, t3); } private: SlotBase3 *m_pSlotBase; }; /**< ź */ template class Signal3 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3)) { m_pSlotVec.push_back(new Slot3(pObj, func)); } ~Signal3() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3); } } private: std::vector< Slot3* > m_pSlotVec; }; ///////////////////////////////////////////four param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase4 { public: virtual ~SlotBase4() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4) = 0; }; /**< ģ */ template class SlotImpl4 : public SlotBase4 { public: SlotImpl4(T *pObj, void (T::*func)(T1, T2, T3, T4)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4) { (m_pObj ->*m_Func)(t1, t2, t3, t4); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4); }; /**< */ template class Slot4 { public: template Slot4(T *pObj, void (T::*func)(T1, T2, T3, T4)) { m_pSlotBase = new SlotImpl4(pObj, func); } ~Slot4() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4) { m_pSlotBase ->exec(t1, t2, t3, t4); } private: SlotBase4 *m_pSlotBase; }; /**< ź */ template class Signal4 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4)) { m_pSlotVec.push_back(new Slot4(pObj, func)); } ~Signal4() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4); } } private: std::vector< Slot4* > m_pSlotVec; }; ///////////////////////////////////////////five param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase5 { public: virtual ~SlotBase5() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) = 0; }; /**< ģ */ template class SlotImpl5 : public SlotBase5 { public: SlotImpl5(T *pObj, void (T::*func)(T1, T2, T3, T4, T5)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { (m_pObj ->*m_Func)(t1, t2, t3, t4, t5); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4, T5); }; /**< */ template class Slot5 { public: template Slot5(T *pObj, void (T::*func)(T1, T2, T3, T4, T5)) { m_pSlotBase = new SlotImpl5(pObj, func); } ~Slot5() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { m_pSlotBase ->exec(t1, t2, t3, t4, t5); } private: SlotBase5 *m_pSlotBase; }; /**< ź */ template class Signal5 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5)) { m_pSlotVec.push_back(new Slot5(pObj, func)); } ~Signal5() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5); } } private: std::vector< Slot5* > m_pSlotVec; }; ///////////////////////////////////////////six param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase6 { public: virtual ~SlotBase6() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) = 0; }; /**< ģ */ template class SlotImpl6 : public SlotBase6 { public: SlotImpl6(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4, T5, T6); }; /**< */ template class Slot6 { public: template Slot6(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6)) { m_pSlotBase = new SlotImpl6(pObj, func); } ~Slot6() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6); } private: SlotBase6 *m_pSlotBase; }; /**< ź */ template class Signal6 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6)) { m_pSlotVec.push_back(new Slot6(pObj, func)); } ~Signal6() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6); } } private: std::vector< Slot6* > m_pSlotVec; }; ///////////////////////////////////////////seven param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase7 { public: virtual ~SlotBase7() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) = 0; }; /**< ģ */ template class SlotImpl7 : public SlotBase7 { public: SlotImpl7(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7); }; /**< */ template class Slot7 { public: template Slot7(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7)) { m_pSlotBase = new SlotImpl7(pObj, func); } ~Slot7() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7); } private: SlotBase7 *m_pSlotBase; }; /**< ź */ template class Signal7 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7)) { m_pSlotVec.push_back(new Slot7(pObj, func)); } ~Signal7() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7); } } private: std::vector< Slot7* > m_pSlotVec; }; ///////////////////////////////////////////eight param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase8 { public: virtual ~SlotBase8() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) = 0; }; /**< ģ */ template class SlotImpl8 : public SlotBase8 { public: SlotImpl8(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7, t8); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7, T8); }; /**< */ template class Slot8 { public: template Slot8(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) { m_pSlotBase = new SlotImpl8(pObj, func); } ~Slot8() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7, t8); } private: SlotBase8 *m_pSlotBase; }; /**< ź */ template class Signal8 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) { m_pSlotVec.push_back(new Slot8(pObj, func)); } ~Signal8() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7, t8); } } private: std::vector< Slot8* > m_pSlotVec; }; ///////////////////////////////////////////nine param signal-slot//////////////////////////////////////////////////// /**< ۽ӿ */ template class SlotBase9 { public: virtual ~SlotBase9() {} virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) = 0; }; /**< ģ */ template class SlotImpl9 : public SlotBase9 { public: SlotImpl9(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) { m_pObj = pObj; m_Func = func; } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7, t8, t9); } private: T *m_pObj; void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7, T8, T9); }; /**< */ template class Slot9 { public: template Slot9(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) { m_pSlotBase = new SlotImpl9(pObj, func); } ~Slot9() { if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; } } void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7, t8, t9); } private: SlotBase9 *m_pSlotBase; }; /**< ź */ template class Signal9 { public: template void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) { m_pSlotVec.push_back(new Slot9(pObj, func)); } ~Signal9() { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; } } } void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { for (int i = 0; i < (int)m_pSlotVec.size(); ++i) { m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7, t8, t9); } } private: std::vector< Slot9* > m_pSlotVec; }; #endif // SIGNAL_handleH ================================================ FILE: DB/DB.pri ================================================ DEPENDPATH += $$PWD INCLUDEPATH += $$PWD QT += sql HEADERS += \ $$PWD/DBModule.h SOURCES += \ $$PWD/DBModule.cpp ================================================ FILE: DB/DBModule.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file DBModule.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-21 * \brief ݿģͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-21 by chengxuan * * \endverbatim * */ #include "DBModule.h" #include "TR.h" #include #include #include #include /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif /***************************************************************************** ȫֱ *****************************************************************************/ const QString DBType = "QSQLITE"; /*!< ݿ*/ const QString DBFile = "CZPlayer.sqlite"; /*!< ݿļ*/ DBModule::DBModule() { /*Do nothing.*/ } DBModule::~DBModule() { /*Do nothing.*/ } void DBModule::initDB() { //жݿļǷ bool create = !QFile::exists(DBFile); if (!DBModule::createConnection()) { QMessageBox::warning(NULL, TR("ʾ"), TR("ݿ!")); return; } /*Else do nothing, and continue.*/ if (create) { DBModule::createTable(); } /*Else do nothing, and continue.*/ } bool DBModule::createConnection() { QSqlDatabase db = QSqlDatabase::addDatabase(DBType); db.setDatabaseName(DBFile);//ݿļڣԶһ if (!db.open()) { QMessageBox::warning(0, TR("ݿ򿪴!"), db.lastError().databaseText()); return false; } /*Else do nothing, and continue.*/ return true; } void DBModule::createTable() { QSqlQuery query; query.exec("drop table musicList"); query.exec("create table musicList (fileName varchar(50) primary key not null, " "time varchar(10), filePath varchar(50), albumUrlPath varchar(100))"); } bool DBModule::readFilePath( QStringList &list ) { QSqlQuery query; query.exec("select filePath from musicList"); while (query.next()) { QString filePath = query.value(0).toString(); list << filePath; } if (!list.isEmpty()) { return true; } /*Else do nothing, and continue.*/ return false; } bool DBModule::readMusicListSaveFormatEntity( QList &list ) { QSqlQuery query; query.exec("select fileName, time, filePath from musicList"); while (query.next()) { MusicListSaveFormatEntity entity(query.value(0).toString(), query.value(1).toString(), query.value(2).toString()); list.append(entity); } if (!list.isEmpty()) { return true; } /*Else do nothing, and continue.*/ return false; } bool DBModule::clearDB() { QSqlQuery query; return query.exec("delete from musicList"); } bool DBModule::delLine( const QString &fileName ) { QSqlQuery query; query.prepare("delete from musicList where fileName = ?"); query.addBindValue(fileName); return query.exec(); } bool DBModule::insertLine( const QString &fileName, const QString &time, const QString &filePath ) { QSqlQuery query; query.prepare("insert into musicList values(?, ?, ?, ?)"); query.addBindValue(fileName); query.addBindValue(time); query.addBindValue(filePath); query.addBindValue(""); return query.exec(); } bool DBModule::updateAlbumUrlPath( const QString &fileName, const QString &albumUrlPath ) { QSqlQuery query; query.prepare("update musicList set albumUrlPath = ? where fileName = ?"); query.addBindValue(albumUrlPath); query.addBindValue(fileName); return query.exec(); } bool DBModule::readAlbumUrlPathFromDB( const QString &fileName, QString &albumUrlPath ) { QSqlQuery query; query.prepare("select albumUrlPath from musicList where fileName = ?"); query.addBindValue(fileName); query.exec(); while (query.next()) { albumUrlPath = query.value(0).toString(); break; } return true; } bool DBModule::readMusicInfoEntity( QList &list ) { QSqlQuery query; query.exec("select fileName, time, filePath from musicList"); while (query.next()) { MusicInfoEntity entity(query.value(0).toString(), query.value(1).toString(), query.value(2).toString()); list.append(entity); } if (!list.isEmpty()) { return true; } /*Else do nothing, and continue.*/ return false; } ================================================ FILE: DB/DBModule.h ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file DBModule.h * \author chengxuan 787280310@qq.com * \date 2014-12-21 * \brief ݿģͷļ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-21 by chengxuan * * \endverbatim * */ #ifndef DBMODULE_H #define DBMODULE_H /*! \def DBMODULE_VERSION * 汾ƺ꣬Ӧv3.0.0汾. */ #define DBMODULE_VERSION 0x030000 #include "MusicListSaveFormatEntity.h" #include "MusicInfoEntity.h" #include #include #include /*! ݿģ */ class DBModule { public: /*! ʼݿ */ static void initDB(); /*! ݿ * \return trueɹʧ */ static bool createConnection(); /*! */ static void createTable(); /*! ݿжʾб * \param list ļ· * \return trueɹʧ */ static bool readFilePath(QStringList &list); /*! ݿжʾm3uļ * \param list бʽ * \return trueɹʧ */ static bool readMusicListSaveFormatEntity(QList &list); /*! ݿȡϢ * \param list Ϣ * \return trueɹʧ */ static bool readMusicInfoEntity(QList &list); /*! ݿ * \return trueɹʧ */ static bool clearDB(); /*! ɾһ¼ * \param fileName ļ * \return trueɹʧ */ static bool delLine(const QString &fileName); /*! һм¼ * \param fileName ļ * \param time ʱ * \param filePath ļ· * \return trueɹʧ */ static bool insertLine(const QString &fileName, const QString &time, const QString &filePath); /*! רurl * \param fileName ļ * \param albumUrlPath רurl * \return trueɹʧ */ static bool updateAlbumUrlPath(const QString &fileName, const QString &albumUrlPath); /*! ݿжӦרurl * \param fileName ļ * \param albumUrlPath רurl * \return trueɹʧ */ static bool readAlbumUrlPathFromDB(const QString &fileName, QString &albumUrlPath); private: /*! 캯.*/ DBModule(); /*! .*/ ~DBModule(); }; #endif //DBMODULE_H ================================================ FILE: Doxyfile ================================================ # Doxyfile 1.8.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = CZPlayer # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = 3.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = CZPlayer应用程序 # With the PROJECT_LOGO tag one can specify an logo or icon that is included in # the documentation. The maximum height of the logo should not exceed 55 pixels # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = ./ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = Chinese # If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a # new page for each member. If set to NO, the documentation of a member will be # part of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C # (default is Fortran), use: inc=Fortran f=C. # # Note For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined # locally in source files will be included in the documentation. If set to NO # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO these classes will be included in the various overviews. This option has # no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the # todo list. This list is created by putting \todo commands in the # documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the # test list. This list is created by putting \test commands in the # documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES the list # will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. Do not use file names with spaces, bibtex cannot handle them. See # also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO doxygen will only warn about wrong or incomplete parameter # documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. INPUT = ./README \ ./TODO \ ./AboutPanel \ ./ConfigPanel \ ./Core \ ./DB \ ./Engine \ ./Entity \ ./LrcLabel \ ./MainWidget \ ./MediaWidget \ ./MinWidget \ ./MusicList \ ./Thread \ ./README \ ./main.cpp # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = GBK # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.idl \ *.ddl \ *.odl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.cs \ *.d \ *.php \ *.php4 \ *.php5 \ *.phtml \ *.inc \ *.m \ *.markdown \ *.md \ *.mm \ *.dox \ *.py \ *.f90 \ *.f \ *.for \ *.tcl \ *.vhd \ *.vhdl \ *.ucf \ *.qsf \ *.as \ *.js # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES, then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more acurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # compiled with the --with-libclang option. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = doc # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = Copyright # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- # defined cascading style sheet that is included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefor more robust against future updates. # Doxygen will copy the style sheet file to the output directory. For an example # see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 61 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 88 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 117 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to NO can help when comparing the output of multiple runs. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler ( hhc.exe). If non-empty # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated ( # YES) or that it should be included in the master .chm file ( NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated ( # YES) or a normal table of contents ( NO) in the .chm file. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using prerendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPage.cpp 文件参考

关于页面实现文件。 更多...

#include "AboutPage.h"
#include "TR.h"
#include <QVBoxLayout>
#include <QLabel>

详细描述

关于页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

================================================ FILE: doc/_about_page_8h.html ================================================ CZPlayer: AboutPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPage.h 文件参考

关于页面头文件。 更多...

#include <QWidget>

浏览源代码.

class  AboutPage
 

宏定义

#define ABOUTPAGE_VERSION   0x030000
 

详细描述

关于页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

宏定义说明

#define ABOUTPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_about_page_8h_source.html ================================================ CZPlayer: AboutPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPage.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef ABOUTPAGE_H
38 #define ABOUTPAGE_H
39 
43 #define ABOUTPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class AboutPage : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  AboutPage(QWidget *parent = NULL);
60 
62  ~AboutPage(void);
63 
64  QLabel *m_label;
65 };
66 
67 #endif //ABOUTPAGE_H
68 
Definition: AboutPage.h:51
~AboutPage(void)
Definition: AboutPage.cpp:64
QLabel * m_label
Definition: AboutPage.h:64
AboutPage(QWidget *parent=NULL)
Definition: AboutPage.cpp:49

================================================ FILE: doc/_about_panel_8cpp.html ================================================ CZPlayer: AboutPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel.cpp 文件参考

关于面板实现文件。 更多...

#include "AboutPanel.h"
#include "AboutPage.h"
#include "AuthorPage.h"
#include "ThanksPage.h"
#include "Global.h"
#include "TR.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTabWidget>
#include <QPushButton>
#include <QLabel>

详细描述

关于面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

================================================ FILE: doc/_about_panel_8h.html ================================================ CZPlayer: AboutPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel.h 文件参考

关于面板头文件。 更多...

#include <QDialog>

浏览源代码.

class  AboutPanel
 

宏定义

#define ABOUTPANEL_VERSION   0x030000
 

详细描述

关于面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

宏定义说明

#define ABOUTPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_about_panel_8h_source.html ================================================ CZPlayer: AboutPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef ABOUTPANEL_H
38 #define ABOUTPANEL_H
39 
43 #define ABOUTPANEL_VERSION 0x030000
44 
45 #include <QDialog>
46 
47 class QLabel;
48 class QPushButton;
49 class QTabWidget;
50 class AboutPage;
51 class AuthorPage;
52 class ThanksPage;
53 
56 class AboutPanel : public QDialog
57 {
58  Q_OBJECT
59 
60 public:
64  AboutPanel(QWidget *parent = NULL);
65 
67  ~AboutPanel(void);
68 
71  void init();
72 
73 private:
74  QTabWidget *m_tabWidget;
75  QPushButton *m_okButton;
76  QLabel *m_logoLabel;
78  AboutPage *m_aboutPage;
79  AuthorPage *m_authorPage;
80  ThanksPage *m_thanksPage;
81 };
82 
83 #endif // ABOUTPANEL_H
84 
Definition: AboutPage.h:51
~AboutPanel(void)
Definition: AboutPanel.cpp:117
Definition: AboutPanel.h:56
Definition: AuthorPage.h:51
void init()
Definition: AboutPanel.cpp:141
AboutPanel(QWidget *parent=NULL)
Definition: AboutPanel.cpp:72
Definition: ThanksPage.h:51

================================================ FILE: doc/_album_thread_8cpp.html ================================================ CZPlayer: AlbumThread.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AlbumThread.cpp 文件参考

专辑下载线程实现文件。 更多...

#include "AlbumThread.h"
#include <QTextCodec>
#include <QEventLoop>
#include <QNetworkAccessManager>
#include <QLabel>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonParseError>

详细描述

专辑下载线程实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-24    by chengxuan
*
* 

================================================ FILE: doc/_album_thread_8h.html ================================================ CZPlayer: AlbumThread.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AlbumThread.h 文件参考

专辑下载线程头文件。 更多...

#include <QThread>
#include <QFile>
#include <QString>
#include <QNetworkReply>
#include "StatusDefine.h"

浏览源代码.

class  AlbumThread
 

宏定义

#define ALBUMTHREAD_VERSION   0x030000
 

详细描述

专辑下载线程头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-24    by chengxuan
*
* 

宏定义说明

#define ALBUMTHREAD_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_album_thread_8h_source.html ================================================ CZPlayer: AlbumThread.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AlbumThread.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef ALBUMTHREAD_H
38 #define ALBUMTHREAD_H
39 
43 #define ALBUMTHREAD_VERSION 0x030000
44 
45 #include <QThread>
46 #include <QFile>
47 #include <QString>
48 #include <QNetworkReply>
49 #include "StatusDefine.h"
50 
51 class QNetworkAccessManager;
52 class QLabel;
53 
56 class AlbumThread : public QThread
57 {
58  Q_OBJECT
59 
60 public:
68  AlbumThread(const QString &fileName,
69  const QString &musicName,
70  const QString &musicArtist,
71  const QString &albumFilePath,
72  QObject *parent = NULL);
73 
75  ~AlbumThread();
76 
77 protected:
80  virtual void run();
81 
82 signals:
89  void sigAlbumDownloadStatus(const QString &fileName,
90  const QString &albumUrl,
91  const QString &albumFilePath,
92  AlbumDownloadStatus status);
93 
94 private slots:
98  void handleGetMusicAlbumJson(QNetworkReply *replay);
99 
103  void handleGetMusicAlbumJson2(QNetworkReply *replay);
104 
107  void handleSaveAlbum();
108 
111  void handleReplayFinished();
112 
115  void handleReplyError(QNetworkReply::NetworkError networkError);
116 
117 private:
121  void setAlbumFromURL(const QUrl &url);
122 
126  QString errorCodeToString(QNetworkReply::NetworkError networkError);
127 
128 private:
129  QFile m_albumFile;
130  QString m_fileName;
131  QString m_musicName;
132  QString m_musicArtist;
133  QString m_albumFilePath;
134  QString m_albumUrl;
136  QNetworkAccessManager *m_albumManager;
137  QNetworkAccessManager *m_albumManager2;
138  QNetworkAccessManager *m_albumManager3;
139  QNetworkReply *m_albumReply;
140 };
141 
142 #endif // ALBUMTHREAD_H
状态代码定义头文件。
AlbumDownloadStatus
Definition: StatusDefine.h:46
~AlbumThread()
Definition: AlbumThread.cpp:70
void sigAlbumDownloadStatus(const QString &fileName, const QString &albumUrl, const QString &albumFilePath, AlbumDownloadStatus status)
AlbumThread(const QString &fileName, const QString &musicName, const QString &musicArtist, const QString &albumFilePath, QObject *parent=NULL)
Definition: AlbumThread.cpp:51
virtual void run()
Definition: AlbumThread.cpp:101
Definition: AlbumThread.h:56

================================================ FILE: doc/_audio_stream_8h_source.html ================================================ CZPlayer: AudioStream.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AudioStream.h
1 #ifndef INCLUDE_AUDIOSTREAM
2 #define INCLUDE_AUDIOSTREAM
3 
4 #include "CriticalSection.h"
5 #include "Stream.h"
6 #include <tchar.h>
7 #include <windows.h>
8 #include <wmsdk.h>
9 #include <msacm.h>
10 
11 #pragma warning(disable : 4006)
12 #pragma warning(disable : 4995)
13 
14 class CAudioStream;
15 
16 typedef struct _WMA_SYNC_READER
17 {
18  CAudioStream* pAudioStream;
19  IWMSyncReader* pWMSyncReader;
20  INSSBuffer* pNSSBuffer;
21  IWMHeaderInfo* pWMHeaderInfo;
22  DWORD dwOffset;
23  IStream* pStream;
24  WORD wStream;
25  DWORD dwOutput;
26  bool bHasAudio;
27  bool bProtected;
28  WORD dwChannels;
29  DWORD dwSampleRate;
30  WORD dwBitsPerSample;
31  LARGE_INTEGER liDuration;
33 
34 typedef struct _WMAFormatSpec
35 {
36  DWORD BitsPerSample;
37  DWORD Channels;
38  DWORD SampleRate;
40 
41 class CAudioStream : public IStream
42 {
43 private:
44  LONG m_cRef;
45  CStream* m_Stream;
46 public:
47  CAudioStream();
48  ~CAudioStream(void);
49 
50  void SetStream(CStream* pStream) { m_Stream = pStream; }
51 
52  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
53  ULONG STDMETHODCALLTYPE AddRef(void);
54  ULONG STDMETHODCALLTYPE Release(void);
55 
56  HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead);
57  HRESULT STDMETHODCALLTYPE Write(const void *pv, ULONG cb, ULONG *pcbWritten);
58 
59  HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition);
60  HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER libNewSize);
61  HRESULT STDMETHODCALLTYPE CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten);
62  HRESULT STDMETHODCALLTYPE Commit(DWORD grfCommitFlags);
63  HRESULT STDMETHODCALLTYPE Revert(void);
64  HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
65  HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
66  HRESULT STDMETHODCALLTYPE Stat(STATSTG *pstatstg, DWORD grfStatFlag);
67  HRESULT STDMETHODCALLTYPE Clone(IStream **ppstm);
68 };
69 
70 void WMA_Reader_Init(WMA_SYNC_READER* reader, CStream* pStream, bool bDescrete, SHORT iSpeakers);
71 DWORD WMA_Reader_GetDuration(WMA_SYNC_READER* reader);
72 void WMA_Reader_GetTag(WMA_SYNC_READER* reader, WCHAR* pszTagName, WCHAR* pszTagValue, size_t vsize);
73 WORD WMA_Reader_GetTagLength(WMA_SYNC_READER* reader, WCHAR* pszTagName);
74 void WMA_Reader_GetAuthor(WMA_SYNC_READER* reader, WCHAR* pszAuthor);
75 void WMA_Reader_Uninit(WMA_SYNC_READER* reader);
76 DWORD WMA_Reader_GetBitrate(WMA_SYNC_READER* reader);
77 DWORD WMA_Reader_GetFormatCount(WMA_SYNC_READER* reader, bool Descrete);
78 void WMA_Reader_GetFormat(WMA_SYNC_READER* reader, bool Descrete, int index, WMAFormatSpec* pFormatSpec);
79 bool WMA_Reader_GetIsVBR(WMA_SYNC_READER* reader);
80 void WMA_Reader_Free(WMA_SYNC_READER* reader);
81 void WMA_Reader_GetData(WMA_SYNC_READER* reader, void** buffer, DWORD* bytes);
82 void WMA_Reader_GetAudioPropties(WMA_SYNC_READER* reader, WORD* channels, WORD* bitspersamples, DWORD* sampledate);
83 void WMA_Reader_Seek(WMA_SYNC_READER* reader, DWORD offset);
84 void WMA_Reader_SetFormat(WMA_SYNC_READER* reader, bool Descrete, DWORD FormatIndex);
85 
86 #endif
Definition: Stream.h:15
Definition: AudioStream.h:34
Definition: AudioStream.h:41
Definition: AudioStream.h:16

================================================ FILE: doc/_author_page_8cpp.html ================================================ CZPlayer: AuthorPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AuthorPage.cpp 文件参考

作者页面实现文件。 更多...

#include "AuthorPage.h"
#include "TR.h"
#include <QVBoxLayout>
#include <QLabel>

详细描述

作者页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

================================================ FILE: doc/_author_page_8h.html ================================================ CZPlayer: AuthorPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AuthorPage.h 文件参考

作者页面头文件。 更多...

#include <QWidget>

浏览源代码.

class  AuthorPage
 

宏定义

#define AUTHORPAGE_VERSION   0x030000
 

详细描述

作者页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

宏定义说明

#define AUTHORPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_author_page_8h_source.html ================================================ CZPlayer: AuthorPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AuthorPage.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef AUTHORPAGE_H
38 #define AUTHORPAGE_H
39 
43 #define AUTHORPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class AuthorPage : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  AuthorPage(QWidget *parent = NULL);
60 
62  ~AuthorPage(void);
63 
64 private:
65  QLabel *m_mainAuthorLabel;
66  QLabel *m_plugAuthorLabel;
67  QLabel *m_artAuthorLabel;
68 };
69 
70 #endif //AUTHORPAGE_H
71 
~AuthorPage(void)
Definition: AuthorPage.cpp:70
AuthorPage(QWidget *parent=NULL)
Definition: AuthorPage.cpp:49
Definition: AuthorPage.h:51

================================================ FILE: doc/_basic_player_8cpp.html ================================================ CZPlayer: BasicPlayer.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
BasicPlayer.cpp 文件参考

播放引擎实现文件。 更多...

#include "BasicPlayer.h"
#include "CriticalSection.h"
#include "IO.h"

宏定义

#define DEBUG_OUTPUT_BUFFER_SIZE   256
 
#define DEFAULT_BUFFER_SIZE   88200
 
#define DEFAULT_SAMPLE_RATE   44100.0F
 
#define DEFAULT_FRAME_SIZE   4
 
#define DEFAULT_BITS_PER_SAMPLE   16
 
#define DEFAULT_CHANNELS   2
 
#define DEFAULT_SECONDS   2
 
#define DEFAULT_DS_BUFFER_SIZE   DEFAULT_SECONDS*DEFAULT_SAMPLE_RATE*(DEFAULT_BITS_PER_SAMPLE>>3)*DEFAULT_CHANNELS
 
#define DEFAULT_WIDTH   300
 
#define DEFAULT_HEIGHT   180
 
#define DEFAULT_SAMPLE_SIZE   2048
 
#define DEFAULT_FPS   30
 
#define DEFAULT_SPECTRUM_ANALYSER_FFT_SAMPLE_SIZE   512
 
#define DEFAULT_SPECTRUM_ANALYSER_BAND_COUNT   30
 
#define DEFAULT_SPECTRUM_ANALYSER_DECAY   0.05F
 
#define DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY   5 /* the value is more lower, fall faster */
 
#define DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO   0.4F
 
#define DEFAULT_SPECTRUM_ANALYSER_PEAK_DELAY_FPS_RATIO_RANGE   0.1F
 
#define MIN_SPECTRUM_ANALYSER_DECAY   0.02F
 
#define MAX_SPECTRUM_ANALYSER_DECAY   0.08F
 
#define SAMPLE_TYPE_EIGHT_BIT   1
 
#define SAMPLE_TYPE_SIXTEEN_BIT   2
 
#define CHANNEL_MODE_MONO   1
 
#define CHANNEL_MODE_STEREO   2
 

函数

void set_low (jlong *value, jint low)
 
void set_high (jlong *value, jint high)
 
jlong as_long (LARGE_INTEGER x)
 

变量

TCHAR BUFFER [DEBUG_OUTPUT_BUFFER_SIZE]
 
LARGE_INTEGER liFrequency = { 0 }
 
bool gSupportPerformanceFrequency = QueryPerformanceFrequency(&liFrequency)
 

详细描述

播放引擎实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-06    by chengxuan
*
* 

================================================ FILE: doc/_basic_player_8h.html ================================================ CZPlayer: BasicPlayer.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
BasicPlayer.h 文件参考

播放引擎头文件。 更多...

#include "AudioStream.h"
#include "FastFourierTransform.h"
#include "Utils.h"
#include "Thread.h"
#include "signal_slot.h"
#include <vector>

浏览源代码.

class  CSystem
 
class  CPlayThread
 
class  CSpectrumAnalyserThread
 
class  CSpectrumAnalyser
 
class  CBasicPlayer
 

宏定义

#define BASICPLAYER_VERSION   0x030000
 
#define CONST64(x)   (x ## LL)
 
#define NANOS_PER_SEC   CONST64(1000000000)
 
#define NANOS_PER_MILLISEC   1000000
 

类型定义

typedef __int64 jlong
 
typedef unsigned int juint
 
typedef unsigned __int64 julong
 
typedef long jint
 
typedef signed char jbyte
 

函数

jlong as_long (LARGE_INTEGER x)
 
void set_high (jlong *value, jint high)
 
void set_low (jlong *value, jint low)
 

详细描述

播放引擎头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-06    by chengxuan
*
* 

宏定义说明

#define BASICPLAYER_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_basic_player_8h_source.html ================================================ CZPlayer: BasicPlayer.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
BasicPlayer.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef BASICPLAYER_H
38 #define BASICPLAYER_H
39 
43 #define BASICPLAYER_VERSION 0x030000
44 
45 #include "AudioStream.h"
46 #include "FastFourierTransform.h"
47 #include "Utils.h"
48 #include "Thread.h"
49 #include "signal_slot.h"
50 #include <vector>
51 using namespace std;
52 
53 // pre-defined class
54 class CCriticalSection;
55 class CInput;
56 class CFileInput;
57 class CWmaInput;
58 class CMp3Input;
59 class CWaveInput;
60 class CVorbisInput;
61 class CBasicPlayer;
62 class CSpectrumAnalyser;
63 
64 #pragma warning(disable : 4244)
65 
66 /************************************************************************/
67 /* CSystem */
68 /************************************************************************/
69 typedef __int64 jlong;
70 typedef unsigned int juint;
71 typedef unsigned __int64 julong;
72 typedef long jint;
73 typedef signed char jbyte;
74 
75 #define CONST64(x) (x ## LL)
76 #define NANOS_PER_SEC CONST64(1000000000)
77 #define NANOS_PER_MILLISEC 1000000
78 
79 jlong as_long(LARGE_INTEGER x);
80 void set_high(jlong* value, jint high);
81 void set_low(jlong* value, jint low);
82 
83 class CSystem
84 {
85 private:
86  static jlong frequency;
87  static int ready;
88 
89  static void init()
90  {
91  LARGE_INTEGER liFrequency = { 0 };
92  QueryPerformanceFrequency(&liFrequency);
93  frequency = as_long(liFrequency);
94  ready = 1;
95  }
96 public:
97  static jlong nanoTime()
98  {
99  if (ready != 1)
100  init();
101 
102  LARGE_INTEGER liCounter = { 0 };
103  QueryPerformanceCounter(&liCounter);
104  double current = as_long(liCounter);
105  double freq = frequency;
106  return (jlong)((current / freq) * NANOS_PER_SEC);
107  }
108 };
109 
110 /************************************************************************/
111 /* CPlayThread */
112 /************************************************************************/
113 
116 class CPlayThread : public CThread
117 {
118 public:
119  CPlayThread(CBasicPlayer* pPlayer);
120  ~CPlayThread(void);
121 
122 protected:
123  void Execute(); //执行
124 
125 c_signals:
126  Signal sigFinished; //播放完成信号
127 
128 private:
129  CBasicPlayer* m_Player;
130  CCriticalSection* m_CriticalSection;
131 };
132 
133 /************************************************************************/
134 /* CSpectrumAnalyserThread */
135 /************************************************************************/
136 
140 {
141 public:
142  CSpectrumAnalyserThread(CSpectrumAnalyser* pSpectrumAnalyser);
144 
145 private:
146  CBasicPlayer* m_Player;
147  CSpectrumAnalyser* m_SpectrumAnalyser;
148  CCriticalSection* m_CriticalSection;
149  bool m_process;
150  jlong m_lfp;
151  int m_frameSize;
152 
153 private:
154  int calculateSamplePosition();
155  void processSamples(int pPosition);
156 
157 protected:
158  void Execute();
159 };
160 
161 /************************************************************************/
162 /* CSpectrumAnalyser:频谱分析仪 */
163 /************************************************************************/
164 
168 {
169  friend class CSpectrumAnalyserThread;
170 
171 public:
173  ~CSpectrumAnalyser(void);
174 
175 public:
176  void Start();
177  void Stop();
178  void Process(float pFrameRateRatioHint);
179 
180  jbyte* GetAudioDataBuffer() { return m_AudioDataBuffer; }
181 
182  int GetPosition() { return m_position; }
183  void SetPosition(int pPosition) { m_position = pPosition; }
184 
185  DWORD GetAudioDataBufferLength() { return m_AudioDataBufferLength; }
186  void SetAudioDataBufferLength(DWORD pAudioDataBufferLength) { m_AudioDataBufferLength = pAudioDataBufferLength; }
187 
188 c_signals:
189  Signal1<vector<float>> sigSpectrumChanged;
190 
191 private:
192  CBasicPlayer* m_Player;
193  CSpectrumAnalyserThread* m_SpectrumAnalyserThread; //频谱分析线程
194  CFastFourierTransform* m_FFT; //快速傅里叶变换
195  vector<float> m_vecFrequency; //频率集合
196 
197  /* digital signal process */
198  DWORD m_AudioDataBufferLength;
199  jbyte* m_AudioDataBuffer;
200  int m_SampleSize;
201  LONG m_FpsAsNS;
202  LONG m_DesiredFpsAsNS;
203  float* m_Left;
204  float* m_Right;
205  int m_position;
206  int m_offset;
207  int m_sampleType;
208  int m_channelMode;
209 
210  /* spectrum analyser */
211  int m_width;
212  int m_height;
213  int* m_peaks;
214  int* m_peaksDelay;
215  float* m_oldFFT;
216  int m_saFFTSampleSize;
217  int m_saBands;
218  float m_saMultiplier;
219  float m_saDecay;
220  int m_barOffset;
221  int m_peakDelay;
222  int m_winwidth, m_winheight;
223 };
224 
225 /************************************************************************/
226 /* CBasicPlayer */
227 /************************************************************************/
228 
232 {
233  //friend class declare
234  friend class CPlayThread;
235  friend class CSpectrumAnalyser;
236 
237 public:
241  CBasicPlayer(TCHAR* fileName);
242 
244  ~CBasicPlayer(void);
245 
246 public:
249  CFileInput* GetInput();
250 
253  bool isVaild();
254 
257  void Start();
258 
261  void Stop();
262 
265  void Pause();
266 
269  void Play();
270 
273  jlong GetLongFramePosition();
274 
275 c_signals:
276  Signal1<vector<float>> sigSpectrumChanged;
279 private c_slots:
283  void handleSpectrumChanged(vector<float> vecFrequency);
284 
287  void handleFinished();
288 
289 private:
290  CPlayThread* m_PlayThread;
291  CSpectrumAnalyser* m_SpectrumAnalyser;
292  CCriticalSection* m_CriticalSection;
294  CFileInput* m_Input;
295  CWmaInput* m_WmaInput;
296  CMp3Input* m_Mp3Input;
297  CWaveInput* m_WavInput;
298  CVorbisInput* m_VorbisInput;
300  DS_Info* m_info;
301  volatile long m_bytePosition;
303  DWORD m_BufferSize;
304  float m_SampleRate;
305  WORD m_FrameSize;
306  WORD m_BitPerSample;
307  WORD m_Channels;
310  enum MusicFormat
311  {
312  mp3 = 1,
313  wav = 2,
314  wma = 3,
315  ogg = 4
316  };
317 
318  MusicFormat m_musicFormat;
319 };
320 
321 #endif
Definition: BasicPlayer.h:83
Definition: signal_slot.h:173
Definition: BasicPlayer.h:139
Definition: IO.h:332
Definition: signal_slot.h:78
Signal sigFinished
Definition: BasicPlayer.h:277
Definition: IO.h:96
Definition: Thread.h:7
Definition: Utils.h:59
Definition: BasicPlayer.h:116
Definition: FastFourierTransform.h:14
Definition: IO.h:475
Definition: BasicPlayer.h:231
Definition: IO.h:438
Definition: IO.h:152
Definition: BasicPlayer.h:167
Definition: CriticalSection.h:9
Definition: IO.h:22

================================================ FILE: doc/_collection_panel_8cpp.html ================================================ CZPlayer: CollectionPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CollectionPanel.cpp 文件参考

收藏面板实现文件。 更多...

#include "CollectionPanel.h"
#include "TR.h"
#include <QLabel>
#include <QVBoxLayout>

详细描述

收藏面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_collection_panel_8h.html ================================================ CZPlayer: CollectionPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CollectionPanel.h 文件参考

收藏面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  CollectionPanel
 

宏定义

#define COLLECTIONPANEL_VERSION   0x030000
 

详细描述

收藏面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define COLLECTIONPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_collection_panel_8h_source.html ================================================ CZPlayer: CollectionPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CollectionPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef COLLECTIONPANEL_H
38 #define COLLECTIONPANEL_H
39 
43 #define COLLECTIONPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class CollectionPanel : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  CollectionPanel(QWidget *parent = NULL);
60 
63 
64 private:
67  void createUI();
68 
71  void createConnect();
72 
73 private:
74  QLabel *m_tipLabel;
75 };
76 
77 #endif // COLLECTIONPANEL_H
CollectionPanel(QWidget *parent=NULL)
Definition: CollectionPanel.cpp:49
Definition: CollectionPanel.h:51
~CollectionPanel()
Definition: CollectionPanel.cpp:56

================================================ FILE: doc/_config_dialog_8cpp.html ================================================ CZPlayer: ConfigDialog.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ConfigDialog.cpp 文件参考

全局配置实现文件。 更多...

#include "ConfigDialog.h"
#include "GeneralSettingsPage.h"
#include "DownloadSettingsPage.h"
#include "LrcSettingsPage.h"
#include "HotkeysSettingsPage.h"
#include "UpdatePage.h"
#include "Global.h"
#include "TR.h"
#include <QListWidget>
#include <QPushButton>
#include <QStackedWidget>
#include <QHBoxLayout>
#include <QDir>
#include <QCloseEvent>

详细描述

全局配置实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_config_dialog_8h.html ================================================ CZPlayer: ConfigDialog.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ConfigDialog.h 文件参考

全局配置头文件。 更多...

#include <QDialog>

浏览源代码.

class  ConfigDialog
 

宏定义

#define CONFIGDIALOG_VERSION   0x030000
 

详细描述

全局配置头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define CONFIGDIALOG_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_config_dialog_8h_source.html ================================================ CZPlayer: ConfigDialog.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ConfigDialog.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef CONFIGDIALOG_H
38 #define CONFIGDIALOG_H
39 
43 #define CONFIGDIALOG_VERSION 0x030000
44 
45 #include <QDialog>
46 
49 class LrcSettingsPage;
51 class UpdatePage;
52 class QListWidget;
53 class QPushButton;
54 class QStackedWidget;
55 class QListWidgetItem;
56 class QCloseEvent;
57 
60 class ConfigDialog : public QDialog
61 {
62  Q_OBJECT
63 
64 public:
68  ConfigDialog(QWidget *parent = NULL);
69 
71  ~ConfigDialog();
72 
75  void init();
76 
77 protected:
81  virtual void closeEvent(QCloseEvent *event);
82 
83 signals:
86  void sigConfigDialogClosed();
87 
88 private slots:
93  void handleChangePage(QListWidgetItem *current, QListWidgetItem *previous);
94 
97  void handleOkFunc();
98 
101  void handleAppFunc();
102 
105  void handleGeneralSettingsChanged();
106 
109  void handleDownloadSettingsChanged();
110 
113  void handleLrcSettingsChanged();
114 
117  void handleHotKeysSettingsChanged();
118 
119 private:
122  void createUI();
123 
126  void createIcons();
127 
130  void createConnect();
131 
132 private:
133  QListWidget *m_contentsWidget;
134  QStackedWidget *m_pagesWidget;
136  QPushButton *m_okButton;
137  QPushButton *m_cancelButton;
138  QPushButton *m_appButton;
140  GeneralSettingsPage *m_generalSettingsPage;
141  DownloadSettingsPage *m_downloadSettingsPage;
142  LrcSettingsPage *m_lrcSettingsPage;
143  HotKeysSettingsPage *m_hotKeysSettingsPage;
144  UpdatePage *m_updatePage;
146  bool m_isGeneralSettingsChanged;
147  bool m_isDownloadSettingsChanged;
148  bool m_isLrcSettingsChanged;
149  bool m_isHotKeysSettingsChanged;
150 };
151 
152 #endif // CONFIGDIALOG_H
~ConfigDialog()
Definition: ConfigDialog.cpp:102
Definition: UpdatePage.h:52
void init()
Definition: ConfigDialog.cpp:230
void sigConfigDialogClosed()
Definition: HotkeysSettingsPage.h:55
Definition: DownloadSettingsPage.h:54
virtual void closeEvent(QCloseEvent *event)
Definition: ConfigDialog.cpp:383
Definition: LrcSettingsPage.h:61
Definition: ConfigDialog.h:60
ConfigDialog(QWidget *parent=NULL)
Definition: ConfigDialog.cpp:86
Definition: GeneralSettingsPage.h:51

================================================ FILE: doc/_critical_section_8h_source.html ================================================ CZPlayer: CriticalSection.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CriticalSection.h
1 #ifndef INCLUDE_CRITICALSECTION
2 #define INCLUDE_CRITICALSECTION
3 
4 #include <windows.h>
5 
6 /************************************************************************/
7 /* CCriticalSection */
8 /************************************************************************/
10 {
11 public:
12  CCriticalSection() { InitializeCriticalSection(&m_CriticalSection); }
13  ~CCriticalSection() { DeleteCriticalSection(&m_CriticalSection); }
14 
15 public:
16  void Enter() { EnterCriticalSection(&m_CriticalSection); } //进入临界区
17  void Leave() { LeaveCriticalSection(&m_CriticalSection); } //离开临界区
18 
19 protected:
20  CRITICAL_SECTION m_CriticalSection;
21 };
22 
23 #endif
Definition: CriticalSection.h:9

================================================ FILE: doc/_d_b_module_8cpp.html ================================================ CZPlayer: DBModule.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DBModule.cpp 文件参考

数据库模块头文件。 更多...

#include "DBModule.h"
#include "TR.h"
#include <QtSql>
#include <QMessageBox>
#include <QFile>

变量

const QString DBType = "QSQLITE"
 
const QString DBFile = "CZPlayer.sqlite"
 

详细描述

数据库模块头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

变量说明

const QString DBFile = "CZPlayer.sqlite"

数据库文件

const QString DBType = "QSQLITE"

数据库类型


================================================ FILE: doc/_d_b_module_8h.html ================================================ CZPlayer: DBModule.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DBModule.h 文件参考

数据库模块头文件。 更多...

#include "MusicListSaveFormatEntity.h"
#include "MusicInfoEntity.h"
#include <QStringList>
#include <QString>
#include <QList>

浏览源代码.

class  DBModule
 

宏定义

#define DBMODULE_VERSION   0x030000
 

详细描述

数据库模块头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define DBMODULE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_d_b_module_8h_source.html ================================================ CZPlayer: DBModule.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DBModule.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef DBMODULE_H
38 #define DBMODULE_H
39 
43 #define DBMODULE_VERSION 0x030000
44 
46 #include "MusicInfoEntity.h"
47 #include <QStringList>
48 #include <QString>
49 #include <QList>
50 
51 class DBModule
52 {
53 public:
56  static void initDB();
57 
61  static bool createConnection();
62 
65  static void createTable();
66 
71  static bool readFilePath(QStringList &list);
72 
77  static bool readMusicListSaveFormatEntity(QList<MusicListSaveFormatEntity> &list);
78 
83  static bool readMusicInfoEntity(QList<MusicInfoEntity> &list);
84 
88  static bool clearDB();
89 
94  static bool delLine(const QString &fileName);
95 
102  static bool insertLine(const QString &fileName, const QString &time, const QString &filePath);
103 
109  static bool updateAlbumUrlPath(const QString &fileName, const QString &albumUrlPath);
110 
116  static bool readAlbumUrlPathFromDB(const QString &fileName, QString &albumUrlPath);
117 
118 private:
120  DBModule();
121 
123  ~DBModule();
124 };
125 
126 #endif //DBMODULE_H
static void createTable()
Definition: DBModule.cpp:101
static bool readMusicListSaveFormatEntity(QList< MusicListSaveFormatEntity > &list)
Definition: DBModule.cpp:130
音乐列表保存格式实体头文件。
static bool readFilePath(QStringList &list)
Definition: DBModule.cpp:110
static bool insertLine(const QString &fileName, const QString &time, const QString &filePath)
Definition: DBModule.cpp:166
static bool readMusicInfoEntity(QList< MusicInfoEntity > &list)
Definition: DBModule.cpp:202
static bool updateAlbumUrlPath(const QString &fileName, const QString &albumUrlPath)
Definition: DBModule.cpp:177
static bool readAlbumUrlPathFromDB(const QString &fileName, QString &albumUrlPath)
Definition: DBModule.cpp:186
static void initDB()
Definition: DBModule.cpp:67
static bool clearDB()
Definition: DBModule.cpp:152
static bool createConnection()
Definition: DBModule.cpp:86
static bool delLine(const QString &fileName)
Definition: DBModule.cpp:158
Definition: DBModule.h:51
音乐信息实体头文件。

================================================ FILE: doc/_download_list_panel_8cpp.html ================================================ CZPlayer: DownloadListPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadListPanel.cpp 文件参考

下载列表面板实现文件。 更多...

#include "DownloadListPanel.h"
#include "TR.h"
#include <QLabel>
#include <QVBoxLayout>

详细描述

下载列表面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_download_list_panel_8h.html ================================================ CZPlayer: DownloadListPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadListPanel.h 文件参考

下载列表面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  DownloadListPanel
 

宏定义

#define DOWNLOADLISTPANEL_VERSION   0x030000
 

详细描述

下载列表面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define DOWNLOADLISTPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_download_list_panel_8h_source.html ================================================ CZPlayer: DownloadListPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadListPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef DOWNLOADLISTPANEL_H
38 #define DOWNLOADLISTPANEL_H
39 
43 #define DOWNLOADLISTPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class DownloadListPanel : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  DownloadListPanel(QWidget *parent = NULL);
60 
63 
64 private:
67  void createUI();
68 
71  void createConnect();
72 
73 private:
74  QLabel *m_tipLabel;
75 };
76 
77 #endif // DOWNLOADLISTPANEL_H
~DownloadListPanel()
Definition: DownloadListPanel.cpp:56
DownloadListPanel(QWidget *parent=NULL)
Definition: DownloadListPanel.cpp:49
Definition: DownloadListPanel.h:51

================================================ FILE: doc/_download_settings_page_8cpp.html ================================================ CZPlayer: DownloadSettingsPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadSettingsPage.cpp 文件参考

下载设置页面实现文件。 更多...

#include "DownloadSettingsPage.h"
#include "GlobalConfig.h"
#include "TR.h"
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>

详细描述

下载设置页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_download_settings_page_8h.html ================================================ CZPlayer: DownloadSettingsPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadSettingsPage.h 文件参考

下载设置页面头文件。 更多...

#include <QWidget>
#include <QString>

浏览源代码.

class  DownloadSettingsPage
 

宏定义

#define DOWNLOADSETTINGSPAGE_VERSION   0x030000
 

详细描述

下载设置页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define DOWNLOADSETTINGSPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_download_settings_page_8h_source.html ================================================ CZPlayer: DownloadSettingsPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadSettingsPage.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef DOWNLOADSETTINGSPAGE_H
38 #define DOWNLOADSETTINGSPAGE_H
39 
43 #define DOWNLOADSETTINGSPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 #include <QString>
47 
48 class QLabel;
49 class QLineEdit;
50 class QPushButton;
51 
54 class DownloadSettingsPage : public QWidget
55 {
56  Q_OBJECT
57 
58 public:
62  DownloadSettingsPage(QWidget *parent = NULL);
63 
66 
69  void init();
70 
73  void apply();
74 
75 signals:
79 
80 private slots:
83  void handleMusicDirChanged();
84 
87  void handleAlbumDirChanged();
88 
91  void handleLrcDirChanged();
92 
93 private:
96  void createUI();
97 
100  void createConnect();
101 
102 private:
103  QLabel *m_musicDirLabel;
104  QLineEdit *m_musicEdit;
105  QPushButton *m_musicButton;
107  QLabel *m_albumDirLabel;
108  QLineEdit *m_albumEdit;
109  QPushButton *m_albumButton;
111  QLabel *m_lrcFileLabel;
112  QLineEdit *m_lrcFileEdit;
113  QPushButton *m_lrcFileButton;
114 };
115 
116 #endif // DOWNLOADSETTINGSPAGE_H
void apply()
Definition: DownloadSettingsPage.cpp:146
void sigDownloadSettingsChanged()
DownloadSettingsPage(QWidget *parent=NULL)
Definition: DownloadSettingsPage.cpp:63
Definition: DownloadSettingsPage.h:54
void init()
Definition: DownloadSettingsPage.cpp:138
~DownloadSettingsPage()
Definition: DownloadSettingsPage.cpp:70

================================================ FILE: doc/_edit_hotkey_dialog_8cpp.html ================================================ CZPlayer: EditHotkeyDialog.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
EditHotkeyDialog.cpp 文件参考

热键编辑对话框实现文件。 更多...

#include "EditHotkeyDialog.h"
#include "TR.h"
#include <QLineEdit>
#include <QHBoxLayout>
#include <QEvent>
#include <QKeyEvent>
#include <QLabel>
#include <QPushButton>

详细描述

热键编辑对话框实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_edit_hotkey_dialog_8h.html ================================================ CZPlayer: EditHotkeyDialog.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
EditHotkeyDialog.h 文件参考

热键编辑对话框头文件。 更多...

#include <QDialog>

浏览源代码.

class  EditHotkeyDialog
 

宏定义

#define EDITHOTKEYDIALOG_VERSION   0x030000
 

详细描述

热键编辑对话框头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define EDITHOTKEYDIALOG_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_edit_hotkey_dialog_8h_source.html ================================================ CZPlayer: EditHotkeyDialog.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
EditHotkeyDialog.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef EDITHOTKEYDIALOG_H
38 #define EDITHOTKEYDIALOG_H
39 
43 #define EDITHOTKEYDIALOG_VERSION 0x030000
44 
45 #include <QDialog>
46 
47 class QEvent;
48 class QLineEdit;
49 class QLabel;
50 class QPushButton;
51 
54 class EditHotkeyDialog : public QDialog
55 {
56  Q_OBJECT
57 
58 public:
62  EditHotkeyDialog(QWidget *parent = NULL);
63 
66 
71  void init(const QString &currentHotKeyName, const QString &currentHotKey);
72 
73 protected:
79  virtual bool eventFilter(QObject *target, QEvent *event);
80 
81 signals:
86  void sigEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey);
87 
88 private slots:
91  void handleEditHotkeyFinished();
92 
93 private:
96  void createUI();
97 
100  void createConnect();
101 
104  void hotKeySuccessReset();
105 
108  void keyReleaseReset();
109 
110 private:
111  QLabel *m_label;
112  QLineEdit *m_edit;
113  QPushButton *m_okButton;
114  QPushButton *m_cancelButton;
116  bool m_isHeadKeyPress;
117  bool m_isTailkeyPress;
118  bool m_isHotkeySuccess;
120  bool m_isCtrlKeyPress;
121  bool m_isAltKeyPress;
122  bool m_isShiftKeyPress;
124  QString m_currentHotKeyName;
125  QString m_currentHotKey;
126 };
127 
128 #endif //EDITHOTKEYDIALOG_H
129 
~EditHotkeyDialog()
Definition: EditHotkeyDialog.cpp:69
void init(const QString &currentHotKeyName, const QString &currentHotKey)
Definition: EditHotkeyDialog.cpp:106
void sigEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey)
EditHotkeyDialog(QWidget *parent=NULL)
Definition: EditHotkeyDialog.cpp:56
Definition: EditHotkeyDialog.h:54
virtual bool eventFilter(QObject *target, QEvent *event)
Definition: EditHotkeyDialog.cpp:120

================================================ FILE: doc/_fast_fourier_transform_8h_source.html ================================================ CZPlayer: FastFourierTransform.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
FastFourierTransform.h
1 #ifndef INCLUDE_FASTTOURIERTRANSFORM
2 #define INCLUDE_FASTTOURIERTRANSFORM
3 
4 #include <math.h>
5 #include <stdlib.h>
6 
7 /************************************************************************/
8 /* CFastFourierTransform */
9 /************************************************************************/
10 
11 #define PI_2 6.283185F
12 #define PI 3.1415925F
13 
15 {
16 public:
17  CFastFourierTransform(int pSampleSize);
18  ~CFastFourierTransform(void);
19 
20 public:
21  float* Calculate(float* pSample, size_t pSampleSize);
22 
23 private:
24  float* xre;
25  float* xim;
26  float* mag;
27  float* fftSin;
28  float* fftCos;
29  int* fftBr;
30  int ss;
31  int ss2;
32  int nu;
33  int nu1;
34 
35  int BitRev(int j, int nu);
36  void PrepareFFTTables();
37 };
38 
39 #endif
Definition: FastFourierTransform.h:14

================================================ FILE: doc/_general_settings_page_8cpp.html ================================================ CZPlayer: GeneralSettingsPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GeneralSettingsPage.cpp 文件参考

一般设置页面实现文件。 更多...

#include "GeneralSettingsPage.h"
#include "GlobalConfig.h"
#include "Global.h"
#include "TR.h"
#include <QGridLayout>
#include <QGroupBox>
#include <QCheckBox>
#include <QMessageBox>

详细描述

一般设置页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_general_settings_page_8h.html ================================================ CZPlayer: GeneralSettingsPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GeneralSettingsPage.h 文件参考

一般设置页面头文件。 更多...

#include <QWidget>

浏览源代码.

class  GeneralSettingsPage
 

宏定义

#define GENERALSETTINGSPAGE_VERSION   0x030000
 

详细描述

一般设置页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define GENERALSETTINGSPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_general_settings_page_8h_source.html ================================================ CZPlayer: GeneralSettingsPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GeneralSettingsPage.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef GENERALSETTINGSPAGE_H
38 #define GENERALSETTINGSPAGE_H
39 
43 #define GENERALSETTINGSPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QCheckBox;
48 
51 class GeneralSettingsPage : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  GeneralSettingsPage(QWidget *parent = NULL);
60 
63 
66  void init();
67 
70  void apply();
71 
72 signals:
76 
77 private:
80  void createUI();
81 
84  void createConnect();
85 
86 private:
87  QCheckBox *m_autoPlay;
88  QCheckBox *m_autoRun;
89  QCheckBox *m_helloCZPlayer;
90  QCheckBox *m_defaultPlayer;
91 };
92 
93 #endif // GENERALSETTINGSPAGE_H
void sigGeneralSettingsChanged()
void apply()
Definition: GeneralSettingsPage.cpp:133
GeneralSettingsPage(QWidget *parent=NULL)
Definition: GeneralSettingsPage.cpp:61
void init()
Definition: GeneralSettingsPage.cpp:124
~GeneralSettingsPage()
Definition: GeneralSettingsPage.cpp:68
Definition: GeneralSettingsPage.h:51

================================================ FILE: doc/_global_8h_source.html ================================================ CZPlayer: Global.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Global.h
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef GLOBAL_H
38 #define GLOBAL_H
39 
43 #define GLOBAL_VERSION 0x030000
44 
45 #include <QString>
46 
48 extern const char *StringOrganization;
50 extern const char *StringApplication;
51 
52 extern const QString ImagesDir;
54 #endif // GLOBAL_H

================================================ FILE: doc/_global_config_8cpp.html ================================================ CZPlayer: GlobalConfig.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalConfig.cpp 文件参考

全局配置实现文件。 更多...

#include "GlobalConfig.h"
#include "Global.h"
#include "TR.h"
#include <QSettings>

枚举

enum  PlayModeType { RandomPlay = 1, CyclePlay = 2 }
 

变量

const QString StrGeneralConfig = "GeneralConfig"
 
const QString StrAutoPlayMusic = "AutoPlayMusic"
 
const QString StrAutoRunPlayer = "AutoRunPlayer"
 
const QString StrAutoGreetings = "AutoGreetings"
 
const QString StrDefaultPlayer = "DefaultPlayer"
 
const QString StrDownloadConfig = "DownloadConfig"
 
const QString StrMusicPath = "MusicPath"
 
const QString StrAlbumPath = "AlbumPath"
 
const QString StrLrcPath = "LrcPath"
 
const QString StrLrcConfig = "LrcConfig"
 
const QString StrFontName = "FontName"
 
const QString StrFontSize = "FontSize"
 
const QString StrFontType = "FontType"
 
const QString StrNoPlayShang = "NoPlayShang"
 
const QString StrNoPlayZhong = "NoPlayZhong"
 
const QString StrNoPlayXia = "NoPlayXia"
 
const QString StrPlayedShang = "PlayedShang"
 
const QString StrPlayedZhong = "PlayedZhong"
 
const QString StrPlayedXia = "PlayedXia"
 
const QString StrDefaultChoiceColor = "DefaultChoiceColor"
 
const QString StrShadow = "Shadow"
 
const QString StrHotkeyConfig = "HotkeyConfig"
 
const QString StrConfigOptions = "ConfigOptions"
 
const QString StrShowHideMainWidget = "ShowHideMainWidget"
 
const QString StrMinMainWidget = "MinMainWidget"
 
const QString StrOpenMusicFile = "OpenMusicFile"
 
const QString StrShowHideMediaWidget = "ShowHideMediaWidget"
 
const QString StrShowHideMusicList = "ShowHideMusicList"
 
const QString StrShowHideLrc = "ShowHideLrc"
 
const QString StrPlayPause = "PlayPause"
 
const QString StrPlayPre = "PlayPre"
 
const QString StrPlayNext = "PlayNext"
 
const QString StrPlayControlConfig = "PlayControlConfig"
 
const QString StrMute = "Mute"
 
const QString StrVolume = "Volume"
 
const QString StrPlayMode = "PlayMode"
 
const bool AutoPlayMusic = false
 
const bool AutoRunPlayer = false
 
const bool AutoGreetings = false
 
const bool DefaultPlayer = false
 
const QString MusicPath = "E:/CZPlayer"
 
const QString AlbumPath = "E:/CZPlayer/albumImages"
 
const QString LrcPath = "E:/CZPlayer/lrc"
 
const QString FontName = TR("微软雅黑")
 
const QString FontSize = "30"
 
const QString FontType = TR("常规")
 
const QColor NoPlayShang = QColor(14, 179, 255)
 
const QColor NoPlayZhong = QColor(114, 232, 255)
 
const QColor NoPlayXia = QColor(14, 179, 255)
 
const QColor PlayedShang = QColor(222, 54, 4)
 
const QColor PlayedZhong = QColor(255, 72, 16)
 
const QColor PlayedXia = QColor(222, 54, 4)
 
const QString DefaultChoiceColor = ""
 
const int Shadow = 255
 
const QString ConfigOptions = "Ctrl+Alt+F1"
 
const QString ShowHideMainWidget = "Ctrl+Alt+W"
 
const QString MinMainWidget = "Ctrl+Alt+M"
 
const QString OpenMusicFile = "Ctrl+Alt+O"
 
const QString ShowHideMediaWidget = "Ctrl+Alt+D"
 
const QString ShowHideMusicList = "Ctrl+Alt+L"
 
const QString ShowHideLrc = "Ctrl+Alt+R"
 
const QString PlayPause = "Alt+Space"
 
const QString PlayPre = "Alt+Left"
 
const QString PlayNext = "Alt+Right"
 
const QColor NoPlayWhiteShang = QColor(255, 255, 255)
 
const QColor NoPlayWhiteZhong = QColor(255, 255, 255)
 
const QColor NoPlayWhiteXia = QColor(255, 255, 255)
 
const QColor PlayedWhiteShang = QColor(255, 255, 0)
 
const QColor PlayedWhiteZhong = QColor(255, 255, 0)
 
const QColor PlayedWhiteXia = QColor(255, 255, 0)
 
const QColor NoPlayBlueShang = QColor(0, 52, 138)
 
const QColor NoPlayBlueZhong = QColor(0, 128, 192)
 
const QColor NoPlayBlueXia = QColor(3, 202, 252)
 
const QColor PlayedBlueShang = QColor(130, 247, 253)
 
const QColor PlayedBlueZhong = QColor(255, 255, 255)
 
const QColor PlayedBlueXia = QColor(3, 233, 252)
 
const QColor NoPlayRedShang = QColor(255, 172, 0)
 
const QColor NoPlayRedZhong = QColor(255, 0, 0)
 
const QColor NoPlayRedXia = QColor(170, 0, 0)
 
const QColor PlayedRedShang = QColor(255, 255, 164)
 
const QColor PlayedRedZhong = QColor(255, 255, 0)
 
const QColor PlayedRedXia = QColor(255, 100, 26)
 
const QColor NoPlayBlackShang = QColor(225, 225, 225)
 
const QColor NoPlayBlackZhong = QColor(106, 106, 106)
 
const QColor NoPlayBlackXia = QColor(0, 0, 0)
 
const QColor PlayedBlackShang = QColor(255, 255, 255)
 
const QColor PlayedBlackZhong = QColor(0, 255, 255)
 
const QColor PlayedBlackXia = QColor(128, 255, 255)
 
const QColor NoPlayYellowShang = QColor(2, 166, 174)
 
const QColor NoPlayYellowZhong = QColor(128, 255, 255)
 
const QColor NoPlayYellowXia = QColor(2, 166, 174)
 
const QColor PlayedYellowShang = QColor(247, 132, 38)
 
const QColor PlayedYellowZhong = QColor(255, 255, 0)
 
const QColor PlayedYellowXia = QColor(255, 128, 0)
 
const QColor NoPlayPurpleShang = QColor(64, 0, 128)
 
const QColor NoPlayPurpleZhong = QColor(255, 128, 255)
 
const QColor NoPlayPurpleXia = QColor(64, 0, 128)
 
const QColor PlayedPurpleShang = QColor(255, 55, 146)
 
const QColor PlayedPurpleZhong = QColor(255, 243, 134)
 
const QColor PlayedPurpleXia = QColor(255, 55, 146)
 
const QColor NoPlayGreenShang = QColor(147, 255, 38)
 
const QColor NoPlayGreenZhong = QColor(70, 176, 0)
 
const QColor NoPlayGreenXia = QColor(0, 85, 0)
 
const QColor PlayedGreenShang = QColor(255, 255, 255)
 
const QColor PlayedGreenZhong = QColor(154, 255, 17)
 
const QColor PlayedGreenXia = QColor(255, 255, 0)
 
const bool Mute = false
 
const int Volume = 100
 
enum PlayModeType PlayMode = RandomPlay
 

详细描述

全局配置实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-18
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-18    by chengxuan
*
* 

================================================ FILE: doc/_global_config_8h.html ================================================ CZPlayer: GlobalConfig.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalConfig.h 文件参考

全局配置头文件。 更多...

#include <QObject>
#include <QString>
#include <QColor>

浏览源代码.

class  GlobalConfig
 

宏定义

#define GLOBALCONFIG_VERSION   0x030000
 

变量

const QString FontName
 
const QString FontSize
 
const QString FontType
 
const QColor NoPlayShang
 
const QColor NoPlayZhong
 
const QColor NoPlayXia
 
const QColor PlayedShang
 
const QColor PlayedZhong
 
const QColor PlayedXia
 
const QString DefaultChoiceColor
 
const int Shadow
 
const QString ConfigOptions
 
const QString ShowHideMainWidget
 
const QString MinMainWidget
 
const QString OpenMusicFile
 
const QString ShowHideMediaWidget
 
const QString ShowHideMusicList
 
const QString ShowHideLrc
 
const QString PlayPause
 
const QString PlayPre
 
const QString PlayNext
 
const QColor NoPlayWhiteShang
 
const QColor NoPlayWhiteZhong
 
const QColor NoPlayWhiteXia
 
const QColor PlayedWhiteShang
 
const QColor PlayedWhiteZhong
 
const QColor PlayedWhiteXia
 
const QColor NoPlayBlueShang
 
const QColor NoPlayBlueZhong
 
const QColor NoPlayBlueXia
 
const QColor PlayedBlueShang
 
const QColor PlayedBlueZhong
 
const QColor PlayedBlueXia
 
const QColor NoPlayRedShang
 
const QColor NoPlayRedZhong
 
const QColor NoPlayRedXia
 
const QColor PlayedRedShang
 
const QColor PlayedRedZhong
 
const QColor PlayedRedXia
 
const QColor NoPlayBlackShang
 
const QColor NoPlayBlackZhong
 
const QColor NoPlayBlackXia
 
const QColor PlayedBlackShang
 
const QColor PlayedBlackZhong
 
const QColor PlayedBlackXia
 
const QColor NoPlayYellowShang
 
const QColor NoPlayYellowZhong
 
const QColor NoPlayYellowXia
 
const QColor PlayedYellowShang
 
const QColor PlayedYellowZhong
 
const QColor PlayedYellowXia
 
const QColor NoPlayPurpleShang
 
const QColor NoPlayPurpleZhong
 
const QColor NoPlayPurpleXia
 
const QColor PlayedPurpleShang
 
const QColor PlayedPurpleZhong
 
const QColor PlayedPurpleXia
 
const QColor NoPlayGreenShang
 
const QColor NoPlayGreenZhong
 
const QColor NoPlayGreenXia
 
const QColor PlayedGreenShang
 
const QColor PlayedGreenZhong
 
const QColor PlayedGreenXia
 

详细描述

全局配置头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-18
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-18    by chengxuan
*
* 

宏定义说明

#define GLOBALCONFIG_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_global_config_8h_source.html ================================================ CZPlayer: GlobalConfig.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalConfig.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef GLOBALCONFIG_H
38 #define GLOBALCONFIG_H
39 
43 #define GLOBALCONFIG_VERSION 0x030000
44 
45 #include <QObject>
46 #include <QString>
47 #include <QColor>
48 
49 /*歌词配置信息默认值*/
50 extern const QString FontName;
51 extern const QString FontSize;
52 extern const QString FontType;
53 extern const QColor NoPlayShang;
54 extern const QColor NoPlayZhong;
55 extern const QColor NoPlayXia;
56 extern const QColor PlayedShang;
57 extern const QColor PlayedZhong;
58 extern const QColor PlayedXia;
59 extern const QString DefaultChoiceColor;
60 extern const int Shadow;
61 
62 /*热键配置信息默认值*/
63 extern const QString ConfigOptions;
64 extern const QString ShowHideMainWidget;
65 extern const QString MinMainWidget;
66 extern const QString OpenMusicFile;
67 extern const QString ShowHideMediaWidget;
68 extern const QString ShowHideMusicList;
69 extern const QString ShowHideLrc;
70 extern const QString PlayPause;
71 extern const QString PlayPre;
72 extern const QString PlayNext;
73 
74 //经典白
75 extern const QColor NoPlayWhiteShang;
76 extern const QColor NoPlayWhiteZhong;
77 extern const QColor NoPlayWhiteXia;
78 extern const QColor PlayedWhiteShang;
79 extern const QColor PlayedWhiteZhong;
80 extern const QColor PlayedWhiteXia;
81 
82 //海洋蓝
83 extern const QColor NoPlayBlueShang;
84 extern const QColor NoPlayBlueZhong;
85 extern const QColor NoPlayBlueXia;
86 extern const QColor PlayedBlueShang;
87 extern const QColor PlayedBlueZhong;
88 extern const QColor PlayedBlueXia;
89 
90 //火焰红
91 extern const QColor NoPlayRedShang;
92 extern const QColor NoPlayRedZhong;
93 extern const QColor NoPlayRedXia;
94 extern const QColor PlayedRedShang;
95 extern const QColor PlayedRedZhong;
96 extern const QColor PlayedRedXia;
97 
98 //酷炫黑
99 extern const QColor NoPlayBlackShang;
100 extern const QColor NoPlayBlackZhong;
101 extern const QColor NoPlayBlackXia;
102 extern const QColor PlayedBlackShang;
103 extern const QColor PlayedBlackZhong;
104 extern const QColor PlayedBlackXia;
105 
106 //秋色黄
107 extern const QColor NoPlayYellowShang;
108 extern const QColor NoPlayYellowZhong;
109 extern const QColor NoPlayYellowXia;
110 extern const QColor PlayedYellowShang;
111 extern const QColor PlayedYellowZhong;
112 extern const QColor PlayedYellowXia;
113 
114 //浪漫紫
115 extern const QColor NoPlayPurpleShang;
116 extern const QColor NoPlayPurpleZhong;
117 extern const QColor NoPlayPurpleXia;
118 extern const QColor PlayedPurpleShang;
119 extern const QColor PlayedPurpleZhong;
120 extern const QColor PlayedPurpleXia;
121 
122 //自然绿
123 extern const QColor NoPlayGreenShang;
124 extern const QColor NoPlayGreenZhong;
125 extern const QColor NoPlayGreenXia;
126 extern const QColor PlayedGreenShang;
127 extern const QColor PlayedGreenZhong;
128 extern const QColor PlayedGreenXia;
129 
130 Q_DECLARE_METATYPE(enum PlayModeType)
131 
132 
134 class GlobalConfig : public QObject
135 {
136  Q_OBJECT
137 
138 public:
142  static GlobalConfig* instance();
143 
147  static void delInstance();
148 
152  bool reload();
153 
157  bool save();
158 
162  void setReleaseResource(const bool &isReleaseResource);
163 
164  /*****************************************************************************
165  常规设置get/set函数
166  *****************************************************************************/
167 
171  void setAutoPlayMusic(bool isAutoPlayMusic);
172 
176  void setAutoRunPlayer(bool isAutoRunPlayer);
177 
181  void setAutoGreetings(bool isAutoGrettings);
182 
186  void setDefaultPlayer(bool isDefaultPlayer);
187 
191  bool autoPlayMusic() const;
192 
196  bool autoRunPlayer() const;
197 
201  bool autoGreetings() const;
202 
206  bool defaultPlayer() const;
207 
208  /*****************************************************************************
209  下载设置get/set函数
210  *****************************************************************************/
211 
215  void setMusicPath(const QString &path);
216 
220  void setAlbumPath(const QString &path);
221 
225  void setLrcPath(const QString &path);
226 
230  QString musicPath() const;
231 
235  QString albumPath() const;
236 
240  QString lrcPath() const;
241 
242  /*****************************************************************************
243  热键设置get/set函数
244  *****************************************************************************/
245 
249  void setSettingsHotKey(const QString &hotKey);
250 
254  void setMinToTrayHotKey(const QString &hotKey);
255 
259  void setOpenMinWidgetHotKey(const QString &hotKey);
260 
264  void setOpenMusicFileHotKey(const QString &hotKey);
265 
269  void setOpenMediaWidgetHotKey(const QString &hotKey);
270 
274  void setOpenListWidgetHotKey(const QString &hotKey);
275 
279  void setOpenLrcHotKey(const QString &hotKey);
280 
284  void setPauseHotKey(const QString &hotKey);
285 
289  void setLastHotKey(const QString &hotKey);
290 
294  void setNextHotKey(const QString &hotKey);
295 
299  QString settingsHotKey() const;
300 
304  QString minToTrayHotKey() const;
305 
309  QString openMinWidgetHotKey() const;
310 
314  QString openMusicFileHotKey() const;
315 
319  QString openMediaWidgetHotKey() const;
320 
324  QString openListWidgetHotKey() const;
325 
329  QString openLrcHotKey() const;
330 
334  QString pauseHotKey() const;
335 
339  QString lastHotKey() const;
340 
344  QString nextHotKey() const;
345 
346  /*****************************************************************************
347  歌词设置get/set函数
348  *****************************************************************************/
349 
353  void setFontName(const QString &fontName);
354 
358  void setFontSize(const QString &fontSize);
359 
363  void setFontType(const QString &fontType);
364 
368  void setNoPlayShang(const QColor &color);
369 
373  void setNoPlayZhong(const QColor &color);
374 
378  void setNoPlayXia(const QColor &color);
379 
383  void setPlayedShang(const QColor &color);
384 
388  void setPlayedZhong(const QColor &color);
389 
393  void setPlayedXia(const QColor &color);
394 
398  void setDefaultChoiceColor(const QString &color);
399 
403  void setShadow(const int &shadow);
404 
408  QString fontName() const;
409 
413  QString fontSize() const;
414 
418  QString fontType() const;
419 
423  QColor noPlayShang() const;
424 
428  QColor noPlayZhong() const;
429 
433  QColor noPlayXia() const;
434 
438  QColor playedShang() const;
439 
443  QColor playedZhong() const;
444 
448  QColor playedXia() const;
449 
453  QString defaultChoiceColor() const;
454 
458  int shadow() const;
459 
460  /*****************************************************************************
461  播放控制设置get/set函数
462  *****************************************************************************/
463 
467  void setMute(const bool &isMute);
468 
472  void setVolume(const int &volume);
473 
477  void setPlayMode(enum PlayModeType playMode);
478 
482  bool mute() const;
483 
487  int volume() const;
488 
492  enum PlayModeType playMode() const;
493 
494 signals:
495  /*****************************************************************************
496  常规设置配置信息改变发送的信号
497  *****************************************************************************/
498 
502  void sigAutoPlayMusicChanged(bool isAutoPlayMusic);
503 
507  void sigAutoRunPlayerChanged(bool isAutoRunPlayer);
508 
512  void sigAutoGreetingsChanged(bool isAutoGrettings);
513 
517  void sigDefaultPlayerChanged(bool isDefaultPlayer);
518 
519  /*****************************************************************************
520  下载设置配置信息改变发送的信号
521  *****************************************************************************/
522 
526  void sigMusicPathChanged(const QString &path);
527 
531  void sigAlbumPathChanged(const QString &path);
532 
536  void sigLrcPathChanged(const QString &path);
537 
538  /*****************************************************************************
539  热键设置配置信息改变发送的信号
540  *****************************************************************************/
544  void sigSettingsHotKeyChanged(const QString &hotKey);
545 
549  void sigMinToTrayHotKeyChanged(const QString &hotKey);
550 
554  void sigOpenMinWidgetHotKeyChanged(const QString &hotKey);
555 
559  void sigOpenMusicFileHotKeyChanged(const QString &hotKey);
560 
564  void sigOpenMediaWidgetHotKeyChanged(const QString &hotKey);
565 
569  void sigOpenListWidgetHotKeyChanged(const QString &hotKey);
570 
574  void sigOpenLrcHotKeyChanged(const QString &hotKey);
575 
579  void sigPauseHotKeyChanged(const QString &hotKey);
580 
584  void sigLastHotKeyChanged(const QString &hotKey);
585 
589  void sigNextHotKeyChanged(const QString &hotKey);
590 
591  /*****************************************************************************
592  歌词设置配置信息改变发送的信号
593  *****************************************************************************/
597  void sigFontNameChanged(const QString &fontName);
598 
602  void sigFontSizeChanged(const QString &fontSize);
603 
607  void sigFontTypeChanged(const QString &fontType);
608 
612  void sigNoPlayShangChanged(const QColor &color);
613 
617  void sigNoPlayZhongChanged(const QColor &color);
618 
622  void sigNoPlayXiaChanged(const QColor &color);
623 
627  void sigPlayedShangChanged(const QColor &color);
628 
632  void sigPlayedZhongChanged(const QColor &color);
633 
637  void sigPlayedXiaChanged(const QColor &color);
638 
642  void sigDefaultChoiceColorChanged(const QString &color);
643 
647  void sigShadowChanged(const int &shadow);
648 
649  /*****************************************************************************
650  播放控制配置信息改变发送的信号
651  *****************************************************************************/
652 
656  void sigMuteChanged(const bool &isMute);
657 
661  void sigVolumeChanged(const int &volume);
662 
666  void sigPlayModeChanged(enum PlayModeType playMode);
667 
668 private:
670  GlobalConfig();
671 
673  ~GlobalConfig();
674 
678  bool createRegedit();
679 
683  bool saveGeneralSettingsInfo();
684 
688  bool saveDownloadSettingsInfo();
689 
693  bool saveHotkeysSettingsInfo();
694 
698  bool saveLrcSettingsInfo();
699 
703  bool savePlayControlSettingsInfo();
704 
708  bool reloadGeneralSettingsInfo();
709 
713  bool reloadDownloadSettingsInfo();
714 
718  bool reloadLrcSettingsInfo();
719 
723  bool reloadHotkeySettingsInfo();
724 
728  bool reloadPlayControlSettingsInfo();
729 
730 private:
731  static GlobalConfig* m_instance;
732  bool m_isReleaseResource;
734  bool m_isGeneralSettingsNeedSave;
735  bool m_isDownloadSettingsNeedSave;
736  bool m_isLrcSettingsNeedSave;
737  bool m_isHotkeySettingsNeedSave;
738  bool m_isPlayControlSettingsNeedSave;
740  bool m_isAutoPlayMusic;
741  bool m_isAutoRunPlayer;
742  bool m_isAutoGrettings;
743  bool m_isDefaultPlayer;
745  QString m_musicPath;
746  QString m_albumPath;
747  QString m_lrcPath;
749  QString m_settingsHotKey;
750  QString m_minToTrayHotKey;
751  QString m_openMinWidgetHotKey;
752  QString m_openMusicFileHotKey;
753  QString m_openMediaWidgetHotKey;
754  QString m_openListWidgetHotKey;
755  QString m_openLrcHotKey;
756  QString m_pauseHotKey;
757  QString m_lastHotKey;
758  QString m_nextHotKey;
760  QString m_fontName;
761  QString m_fontSize;
762  QString m_fontType;
763  QColor m_noPlayShang;
764  QColor m_noPlayZhong;
765  QColor m_noPlayXia;
766  QColor m_playedShang;
767  QColor m_playedZhong;
768  QColor m_playedXia;
769  QString m_defaultChoiceColor;
770  int m_shadow;
772  bool m_isMute;
773  int m_volume;
774  enum PlayModeType m_playMode;
775 };
776 
777 #endif // GLOBALCONFIG_H
Definition: GlobalConfig.h:134

================================================ FILE: doc/_global_hotkey_8cpp.html ================================================ CZPlayer: GlobalHotkey.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalHotkey.cpp 文件参考

全局热键实现文件。 更多...

#include "GlobalHotkey.h"
#include "qxtglobalshortcut.h"
#include "GlobalConfig.h"

详细描述

全局热键实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-31
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-31    by chengxuan
*
* 

================================================ FILE: doc/_global_hotkey_8h.html ================================================ CZPlayer: GlobalHotkey.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalHotkey.h 文件参考

全局热键头文件。 更多...

#include <QObject>
#include <QString>

浏览源代码.

class  GlobalHotKey
 

宏定义

#define GLOBALHOTKEY_VERSION   0x030000
 

详细描述

全局热键头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-31
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-31    by chengxuan
*
* 

宏定义说明

#define GLOBALHOTKEY_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_global_hotkey_8h_source.html ================================================ CZPlayer: GlobalHotkey.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalHotkey.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef GLOBALHOTKEY_H
38 #define GLOBALHOTKEY_H
39 
43 #define GLOBALHOTKEY_VERSION 0x030000
44 
45 #include <QObject>
46 #include <QString>
47 
48 class QxtGlobalShortcut;
49 
52 class GlobalHotKey : public QObject
53 {
54  Q_OBJECT
55 
56 public:
60  GlobalHotKey(QObject *parent = NULL);
61 
63  ~GlobalHotKey();
64 
65 public:
69  void setConfigOptionsHotkeyWork(const bool &isWork);
70 
74  void setShowHideMainWidgetHotkeyWork(const bool &isWork);
75 
79  void setMinMainWidgetHotkeyWork(const bool &isWork);
80 
84  void setOpenMusicfileHotkeyWork(const bool &isWork);
85 
89  void setShowDownloadHotkeyWork(const bool &isWork);
90 
94  void setShowMusicListHotkeyWork(const bool &isWork);
95 
99  void setShowLrcHotkeyWork(const bool &isWork);
100 
104  void setPlayPauseHotkeyWork(const bool &isWork);
105 
109  void setLastHotkeyWork(const bool &isWork);
110 
114  void setNextHotkeyWork(const bool &isWork);
115 
116 private slots:
120  void handleSettingsHotKeyChanged(const QString &hotKey);
121 
125  void handleMinToTrayHotKeyChanged(const QString &hotKey);
126 
130  void handleOpenMinWidgetHotKeyChanged(const QString &hotKey);
131 
135  void handleOpenMusicFileHotKeyChanged(const QString &hotKey);
136 
140  void handleOpenMediaWidgetHotKeyChanged(const QString &hotKey);
141 
145  void handleOpenListWidgetHotKeyChanged(const QString &hotKey);
146 
150  void handleOpenLrcHotKeyChanged(const QString &hotKey);
151 
155  void handlePauseHotKeyChanged(const QString &hotKey);
156 
160  void handleLastHotKeyChanged(const QString &hotKey);
161 
165  void handleNextHotKeyChanged(const QString &hotKey);
166 
167 private:
168  QxtGlobalShortcut *m_configOptions;
169  QxtGlobalShortcut *m_showHideMainWidget;
170  QxtGlobalShortcut *m_minMainWidget;
171  QxtGlobalShortcut *m_openMusicfile;
172  QxtGlobalShortcut *m_showDownload;
173  QxtGlobalShortcut *m_showMusicList;
174  QxtGlobalShortcut *m_showLrc;
175  QxtGlobalShortcut *m_playPause;
176  QxtGlobalShortcut *m_last;
177  QxtGlobalShortcut *m_nextSc;
178 };
179 
180 #endif // GLOBALHOTKEY_H
void setPlayPauseHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:204
void setShowDownloadHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:189
void setMinMainWidgetHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:179
void setShowLrcHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:199
void setConfigOptionsHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:169
void setNextHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:214
void setShowMusicListHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:194
GlobalHotKey(QObject *parent=NULL)
Definition: GlobalHotkey.cpp:48
~GlobalHotKey()
Definition: GlobalHotkey.cpp:105
void setOpenMusicfileHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:184
void setLastHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:209
Definition: GlobalHotkey.h:52
void setShowHideMainWidgetHotkeyWork(const bool &isWork)
Definition: GlobalHotkey.cpp:174

================================================ FILE: doc/_hotkeys_settings_page_8cpp.html ================================================ CZPlayer: HotkeysSettingsPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysSettingsPage.cpp 文件参考

热键设置页面实现文件。 更多...

#include "HotkeysSettingsPage.h"
#include "HotkeysTableWidget.h"
#include "GlobalConfig.h"
#include "EditHotkeyDialog.h"
#include "TR.h"
#include <QPushButton>
#include <QTableWidgetItem>
#include <QGroupBox>
#include <QVBoxLayout>
#include <QMessageBox>

详细描述

热键设置页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_hotkeys_settings_page_8h.html ================================================ CZPlayer: HotkeysSettingsPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysSettingsPage.h 文件参考

热键设置页面头文件。 更多...

#include <QWidget>
#include <QString>

浏览源代码.

class  HotKeysSettingsPage
 

宏定义

#define HOTKEYSSETTINGSPAGE_VERSION   0x030000
 

详细描述

热键设置页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define HOTKEYSSETTINGSPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_hotkeys_settings_page_8h_source.html ================================================ CZPlayer: HotkeysSettingsPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysSettingsPage.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef HOTKEYSSETTINGSPAGE_H
38 #define HOTKEYSSETTINGSPAGE_H
39 
43 #define HOTKEYSSETTINGSPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 #include <QString>
47 
48 class HotKeysTableWidget;
49 class QPushButton;
50 class QTableWidgetItem;
51 class EditHotkeyDialog;
52 
55 class HotKeysSettingsPage : public QWidget
56 {
57  Q_OBJECT
58 
59 public:
63  HotKeysSettingsPage(QWidget *parent = NULL);
64 
67 
70  void init();
71 
74  void apply();
75 
76 signals:
80 
81 private slots:
84  void handleRecoverDefaultSetting();
85 
88  void handleEditHotKeys();
89 
93  void handleTableClicked(const int &index);
94 
99  void handleEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey);
100 
105  void handleTableDoubleClicked(const int &row, const int &column);
106 
107 private:
110  void createUI();
111 
114  void createConnect();
115 
116 private:
117  HotKeysTableWidget *m_hotKeysTableWidget;
118  EditHotkeyDialog *m_editHotkeyDialog;
119  QPushButton *m_editButton;
120  QPushButton *m_recoverDefaultSettingButton;
122  QTableWidgetItem *m_settingsHotKey;
123  QTableWidgetItem *m_minToTrayHotKey;
124  QTableWidgetItem *m_openMinWidgetHotKey;
125  QTableWidgetItem *m_openMusicFileHotKey;
126  QTableWidgetItem *m_openMediaWidgetHotKey;
127  QTableWidgetItem *m_openListWidgetHotKey;
128  QTableWidgetItem *m_openLrcHotKey;
129  QTableWidgetItem *m_pauseHotKey;
130  QTableWidgetItem *m_lastHotKey;
131  QTableWidgetItem *m_nextHotKey;
133  int m_row;
134 };
135 
136 #endif // HOTKEYSSETTINGSPAGE_H
HotKeysSettingsPage(QWidget *parent=NULL)
Definition: HotkeysSettingsPage.cpp:70
void apply()
Definition: HotkeysSettingsPage.cpp:343
~HotKeysSettingsPage()
Definition: HotkeysSettingsPage.cpp:166
Definition: HotkeysSettingsPage.h:55
void init()
Definition: HotkeysSettingsPage.cpp:328
Definition: EditHotkeyDialog.h:54
Definition: HotkeysTableWidget.h:49
void sigHotKeysSettingsChanged()

================================================ FILE: doc/_hotkeys_table_widget_8cpp.html ================================================ CZPlayer: HotkeysTableWidget.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysTableWidget.cpp 文件参考

热键页面实现文件。 更多...

#include "HotkeysTableWidget.h"
#include "NoFocusDelegate.h"
#include "TR.h"
#include <QHeaderView>

详细描述

热键页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_hotkeys_table_widget_8h.html ================================================ CZPlayer: HotkeysTableWidget.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysTableWidget.h 文件参考

热键页面头文件。 更多...

#include <QTableWidget>

浏览源代码.

class  HotKeysTableWidget
 

宏定义

#define HOTKEYSTABLEWIDGET_VERSION   0x030000
 

详细描述

热键页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define HOTKEYSTABLEWIDGET_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_hotkeys_table_widget_8h_source.html ================================================ CZPlayer: HotkeysTableWidget.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotkeysTableWidget.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef HOTKEYSTABLEWIDGET_H
38 #define HOTKEYSTABLEWIDGET_H
39 
43 #define HOTKEYSTABLEWIDGET_VERSION 0x030000
44 
45 #include <QTableWidget>
46 
49 class HotKeysTableWidget : public QTableWidget
50 {
51  Q_OBJECT
52 
53 public:
57  HotKeysTableWidget(QWidget *parent = NULL);
58 
61 };
62 
63 #endif // HOTKEYSTABLEWIDGET_H
~HotKeysTableWidget()
Definition: HotkeysTableWidget.cpp:73
HotKeysTableWidget(QWidget *parent=NULL)
Definition: HotkeysTableWidget.cpp:49
Definition: HotkeysTableWidget.h:49

================================================ FILE: doc/_i_o_8h_source.html ================================================ CZPlayer: IO.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
IO.h
1 #ifndef INCLUDE_IO
2 #define INCLUDE_IO
3 
4 #include "AudioStream.h"
5 #include "CriticalSection.h"
6 #include "Stream.h"
7 /* libmad support */
8 #include "mad.h"
9 /* libogg support */
10 #include "ogg.h"
11 /* libvorbis support */
12 #include "codec.h"
13 #include "vorbisfile.h"
14 
15 #include <stdio.h>
16 #include <iostream>
17 using namespace std;
18 
19 /************************************************************************/
20 /* CInput */
21 /************************************************************************/
22 class CInput
23 {
24 public:
25  CInput(void);
26  ~CInput(void);
27 
28 public:
29  virtual void Reset(); //重置
30  virtual void Pause(); //暂停
31  virtual void Resume(); //恢复,重新开始
32  virtual DWORD GetTotalTime(); //获得总时间
33  virtual LARGE_INTEGER GetTotalSamples(); //获得总的采样率
34 
35  virtual WORD GetBitsPerSample() = 0; //获得每秒的采样率
36  virtual WORD GetChannels() = 0; //获得通道数
37  virtual DWORD GetSampleRate() = 0; //获得采样率
38 
39  LARGE_INTEGER GetSize(); //得到文件大小
40  LARGE_INTEGER GetPosition(); //获得位置
41  void GetData(void** buffer, DWORD* size); //得到数据
42  DWORD CopyData(void* buffer, DWORD size); //拷贝数据
43  DWORD FillBuffer(void* buffer, DWORD size, bool* eof); //填充缓冲区
44  void Init(); //初始化
45  void Flush(); //Flush缓冲区
46  void Lock(); //加锁
47  void Unlock(); //解锁
48 
49 protected:
50  LARGE_INTEGER m_Position; //位置
51  LARGE_INTEGER m_Size; //大小
52  WORD m_SampleSize; //采样率大小
53  bool m_Busy; //是否忙
54  DWORD m_BufferStart; //缓冲区开始
55  DWORD m_BufferEnd; //缓冲区结束
56  CCriticalSection* m_DataCS; //临界区
57  bool m_EndOfStream; //文件流是否结束
58 
59 protected:
60  virtual void InitInternal() = 0; //初始化内部数据
61  virtual void FlushInternal() = 0; //Flush内部数据
62  virtual void GetDataInternal(void** buffer, DWORD* bytes) = 0; //获取内部数据
63 };
64 
65 /************************************************************************/
66 /* CStreamedInput */
67 /************************************************************************/
68 class CStreamedInput : public CInput
69 {
70 public:
71  CStreamedInput(void);
72  ~CStreamedInput(void);
73 
74 public:
75  void GetData(void** buf, DWORD* Bytes); //获得数据
76  bool Seek(LARGE_INTEGER* SampleNum); //定位
77  CStream* GetStream() { return m_pStream; } //获得文件流
78 
79 protected:
80  CStream* m_pStream; //文件流指针
81  bool m_StreamAssigned; //文件流是否分配
82  bool m_Seekable; //是否可定位
83  LARGE_INTEGER m_StartSample; //采样开始位置
84  LARGE_INTEGER m_EndSample; //采样结束位置
85  bool m_Loop; //是否循环
86  LARGE_INTEGER m_TotalSamples; //总的采样率
87 
88 protected:
89  virtual void SetStream(CStream* pStream); //得到流
90  virtual bool SeekInternal(LARGE_INTEGER* SampleNum) = 0; //定位内部数据
91 };
92 
93 /************************************************************************/
94 /* CFileInput */
95 /************************************************************************/
96 class CFileInput : public CStreamedInput
97 {
98 public:
99  CFileInput(void);
100  ~CFileInput(void);
101 
102 public:
103  virtual void OpenFile() = 0; //打开文件
104  virtual void CloseFile() = 0; //关闭文件
105 
106  void SetFileName(TCHAR* pszFileName); //设置文件名字
107  size_t GetFileNameLen(); //获得文件名长度
108  WORD GetBitsPerSample(); //获得每秒采样率
109  DWORD GetSampleRate(); //获得采样率
110  WORD GetChannels(); //获得通道数
111  int GetOpened(); //文件是否被打开
112 
113  bool GetValid(); //文件是否是可得到的
114  LARGE_INTEGER GetTotalSamples(); //获得总的采样率
115  DWORD GetTotalTime(); //获得总时间
116 
117  bool SetStartTime(DWORD Minutes, DWORD Seconds); //设置开始时间
118  bool SetEndTime(DWORD Minutes, DWORD Seconds); //设置结束时间
119  void Reset(); //重置
120  void Jump(int offset); //跳到offset位置
121 
122 protected:
123  CCriticalSection* m_OpenCS; //临界区
124  TCHAR m_FileName[MAX_PATH]; //文件名
125  size_t m_FileNameLen; //文件名长度
126  int m_Opened; //文件是否打开
127  bool m_Valid; //文件流是否可获得
128  WORD m_BitsPerSample; //每秒采样率
129  DWORD m_SampleRate; //采样率
130  WORD m_Channels; //通道数
131  DWORD m_Time; //时间
132 
133 protected:
134  void SetStream(CStream* pStream); //设置流
135  void FlushInternal(); //Flush内部数据
136  void InitInternal(); //初始化内部数据
137 };
138 
139 /************************************************************************/
140 /* CWmaInput */
141 /************************************************************************/
142 typedef enum _ChannelsNumber
143 {
144  cnMaxAvailable = 0,
145  cnMonoOrStereo,
146  cn5dot1,
147  cn7dot1
148 } ChannelsNumber;
149 
150 const int wmfDefault = -2;
151 
152 class CWmaInput : public CFileInput
153 {
154 private:
155  WMA_SYNC_READER* m_Reader;
156  DWORD m_Duration;
157  bool m_HighPrecision;
158  ChannelsNumber m_OutputChannels;
159  int m_Format;
160 
161  SHORT CNToShortInt();
162 
163 protected:
164  void GetDataInternal(void** buffer, DWORD* bytes);
165  bool SeekInternal(LARGE_INTEGER* SampleNum);
166 
167 public:
168  CWmaInput(void);
169  ~CWmaInput(void);
170 
171  void OpenFile();
172  void CloseFile();
173 
174  void SetHighPrecision(bool HighPrecision);
175  void SetOutputChannels(ChannelsNumber OutputChannels);
176  bool GetHasAudio();
177  bool GetProtected();
178  DWORD GetBitrate();
179  bool GetIsVBR();
180  DWORD GetFormatsCount();
181  void GetFormatSpec(int index, WMAFormatSpec* pFormatSpec);
182  void SetFormat(int iFormat);
183  int GetFormat();
184 };
185 
186 /************************************************************************/
187 /* CWaveInput */
188 /************************************************************************/
189 #define BUF_SIZE 16000
190 
191 #define WaveHeaderOffs 44
192 #define DataSizeOffs 40
193 
194 //wav文件结构标志
195 #define LookingForRIFF 0
196 #define LookingForWave 1
197 #define LookingForFMT 2
198 #define LookingForFACT 3
199 #define LookingForDATA 4
200 
201 #define WAVE_FORMAT_MP3 85
202 
203 //wav文件的类型
204 typedef enum _WaveType
205 {
206  wtUnsupported = 1,
207  wtPCM = 2,
208  wtDVIADPCM = 3,
209  wtMSADPCM = 4,
210  wtACM = 5,
211  wtIEEEFloat = 6,
212  wtExtPCM = 7,
213  wtExtIEEEFloat = 8
214 } WaveType;
215 
217 typedef struct _WaveHeader
218 {
219  char RIFF[4]; /* 'RIFF' offset : 0000 */
220  DWORD FileSize; /* FileSize - 8 offset : 0004 */
221  char RIFFType[4]; /* 'WAVE' offset : 0008 */
222  char FmtChunkId[4]; /* 'fmt ' offset : 0012 */
223  DWORD FmtChunkSize; /* 16 offset : 0016 */
224  WORD FormatTag; /* One of WAVE_FORMAT_XXX constants offset : 0020 */
225  WORD Channels; /* 1 - mono = 2 - stereo offset : 0022 */
226  DWORD SampleRate; /* offset : 0024 */
227  DWORD BytesPerSecond; /* offset : 0028 */
228  WORD BlockAlign; /* offset : 0032 */
229  WORD BitsPerSample; /* 8, 16 or 32 Bits/sample offset : 0034 */
230  char DataChunkId[4]; /* 'data' offset : 0036*/
231  DWORD DataSize; /* Data size in bytes offset : 0040 */
233 
234 typedef struct _WaveHeaderEx
235 {
236  char RIFF[4];
237  DWORD FileSize;
238  char RIFFType[4];
239  char FmtChunkId[4];
240  DWORD FmtChunkSize;
241  WAVEFORMATEXTENSIBLE Format;
242  char DataChunkId[4];
243  DWORD DataSize;
245 
246 typedef struct _DVIADPCMHeader
247 {
248  char RIFF[4];
249  DWORD FileSize;
250  char RIFFType[4];
251  char FmtChunkId[4];
252  DWORD FmtChunkSize;
253  WORD FormatTag; //WAVE_FORMAT_DVI_ADPCM
254  WORD Channels;
255  DWORD SampleRate;
256  DWORD BytesPerSecond;
257  WORD BlockAlign;
258  WORD BitsPerSample;
259  WORD cbSize;
260  WORD SamplesPerBlock;
261  char FactChunkId[4];
262  DWORD FactChunkSize;
263  DWORD DataLength;
264  char DataChunkId[4];
265  DWORD DataSize;
267 
268 typedef struct _DVI_ADPCM_INFO
269 {
270  WORD BlockLength;
271  WORD SamplesPerBlock;
272  DWORD DataSize;
274 
276 {
277  SHORT valprev_l; // Previous output value
278  BYTE index_l; // Index into stepsize table
279  SHORT valprev_r; // Previous output value
280  BYTE index_r; // Index into stepsize table
282 
284 {
285  SHORT PredSamp_l;
286  BYTE Index_l;
287  SHORT PredSamp_r;
288  BYTE Index_r;
290 
291 typedef struct _MS_ADPCM_COEF_SET
292 {
293  SHORT Coef1;
294  SHORT Coef2;
296 
297 typedef struct _MS_ADPCM_INFO
298 {
299  WORD BlockLength;
300  WORD SamplesPerBlock;
301  DWORD DataSize;
302  WORD NumCoeff;
303  MS_ADPCM_COEF_SET CoefSets[32];
305 
307 {
308  BYTE predictor;
309  SHORT Delta;
310  SHORT Samp1;
311  SHORT Samp2;
313 
315 {
316  BYTE predictor[2];
317  SHORT Delta[2];
318  SHORT Samp1[2];
319  SHORT Samp2[2];
321 
322 typedef struct _DVIADPCMBlockHeader
323 {
324  SHORT Samp0;
325  BYTE StepTableIndex;
326  BYTE Reserved;
328 
330 
331 //读取wav文件的类
332 class CWaveInput : public CFileInput
333 {
334 public:
335  CWaveInput(void);
336  ~CWaveInput(void);
337 
338 public:
339  void OpenFile(); //打开文件
340  void CloseFile(); //关闭文件
341 
342 protected:
343  void GetDataInternal(void** buffer, DWORD* bytes); //获得内部数据
344  bool SeekInternal(LARGE_INTEGER* SampleNum); //定位内部数据
345 
346 private:
347  BYTE m_Buf[BUF_SIZE]; //缓冲区
348  WaveType m_WavType; //wav格式类型
349 
350  //wav格式类型
351  DVI_ADPCM_INFO m_DVI_ADPCM_INFO;
352  DVI_ADPCM_STATE_STEREO m_DVI_ADPCM_STATE;
353  MS_ADPCM_INFO m_MS_ADPCM_INFO;
354  MSADPCMBlockHeaderStereo m_MS_ADPCM_STATE;
355 
356  WORD m_HeaderSize; //wav头大小
357  CMemoryStream* m_MS;
358  CStream* m_OldStream;
359  bool m_OldStreamAssigned;
360  bool m_ShortIEEEFloat;
361 
362 private:
363  bool ReadDVIADPCMBlock(void* pData); //读取DVIADPCM块
364  bool ReadMSADPCMBlock(void* pData); //读取MSADPCM快
365  WaveType GetWavType(); //获取wav格式类型
366  void ReadRIFFHeader(); //读取RIFF头
367  void DecodeDVIADPCMMono(BYTE* pInData, SHORT* pOutData, DWORD *len); //对DVIADPCMMono类型进行解码
368  void DecodeDVIADPCMStereo(BYTE* pInData, SHORT* pOutData, DWORD* len); //对DVIADPCMStereo类型进行解码
369  void DecodeMSADPCMMono(BYTE* pInData, SHORT* pOutData, DWORD* len); //对MSADPCMMono类型进行解码
370  void DecodeMSADPCMStereo(BYTE* pInData, SHORT* pOutData, DWORD* len); //对MSADPCMStereo进行解码
371 };
372 
373 bool Compare4(CHAR* S1, CHAR* S2);
374 void ConvertIEEEFloatTo32(int* InOutBuf, int InSize);
375 void ConvertShortIEEEFloatTo32(int* InOutBuf, int InSize);
376 
377 /************************************************************************/
378 /* CMp3Input */
379 /************************************************************************/
380 # define SAMPLE_DEPTH 16
381 # define scale(x, y) dither((x), (y))
382 
383 struct xing
384 {
385  long flags;
386  unsigned long frames;
387  unsigned long bytes;
388  unsigned char toc[100];
389  long scale;
390 };
391 
392 enum
393 {
394  XING_FRAMES = 0x00000001L,
395  XING_BYTES = 0x00000002L,
396  XING_TOC = 0x00000004L,
397  XING_SCALE = 0x00000008L
398 };
399 
400 # define XING_MAGIC (('X' << 24) | ('i' << 16) | ('n' << 8) | 'g')
401 
402 struct dither
403 {
404  mad_fixed_t error[3];
405  mad_fixed_t random;
406 };
407 
408 typedef struct _ID3Tag
409 {
410  char m_cTAG[3]; // Must equal "TAG"
411  char m_cSong[30];
412  char m_cArtist[30];
413  char m_cAlbum[30];
414  char m_cYear[4];
415  char m_cComment[30];
416  unsigned char m_cGenre;
417 } ID3Tag;
418 
419 typedef struct _ID3v2Tag
420 {
421  char m_cTAG[3]; // Must equal ID3
422  unsigned char m_cVersion[2]; // Major / Minor
423  unsigned char m_cFlags;
424  unsigned char m_cSize_Encoded[4];
425 } ID3v2Tag;
426 
427 typedef struct _ID3v2Frame
428 {
429  char m_cFrameID[4];
430  unsigned char m_cSize_Encoded[4];
431  unsigned short m_cFlags;
432 } ID3v2Frame;
433 
434 int parse_xing(struct xing *xing, struct mad_bitptr ptr, unsigned int bitlen);
435 int scan_header(CStream* pStream, struct mad_header *header, struct xing *xing); //读取mp3头信息
436 void pack_pcm(unsigned char **pcm, unsigned int nsamples, mad_fixed_t const *ch1, mad_fixed_t const *ch2);
437 
438 class CMp3Input : public CFileInput
439 {
440 public:
441  CMp3Input(void);
442  ~CMp3Input(void);
443 
444 public:
445  void OpenFile();
446  void CloseFile();
447 
448 private:
449  unsigned long m_size;
450  unsigned long m_streamsize;
451  unsigned int m_samplecount;
452  mad_timer_t m_timer;
453  mad_timer_t m_length;
454  unsigned long m_rate;
455  unsigned long m_frames;
456 
457  struct mad_stream m_stream;
458  struct mad_frame m_frame;
459  struct mad_synth m_synth;
460  struct xing m_xing;
461  bool m_vbr; //cbr:常量位速率,vbr:可变位速率
462 
463  unsigned char m_buffer[40000];
464  unsigned int m_buflen;
465  unsigned char m_pcmbuffer[BUF_SIZE];
466 
467 protected:
468  void GetDataInternal(void** buffer, DWORD* bytes);
469  bool SeekInternal(LARGE_INTEGER* SampleNum);
470 };
471 
472 /************************************************************************/
473 /* CVorbisInput */
474 /************************************************************************/
475 class CVorbisInput : public CFileInput
476 {
477 private:
478  OggVorbis_File m_OggVorbisFile;
479  int m_CurrentSection;
480 
481  unsigned char m_buffer[40000];
482  unsigned int m_buflen;
483  unsigned char m_pcmbuffer[BUF_SIZE];
484 protected:
485  void GetDataInternal(void** buffer, DWORD* bytes);
486  bool SeekInternal(LARGE_INTEGER* SampleNum);
487 public:
488  CVorbisInput(void);
489  ~CVorbisInput(void);
490 
491  void OpenFile();
492  void CloseFile();
493 
494 };
495 
496 size_t vorbisRead(void *buffer, size_t size, size_t amount, void *file);
497 int vorbisSeek(void *file, ogg_int64_t newpos, int set);
498 int vorbisClose(void *file);
499 long vorbisTell(void *file);
500 
501 #endif
502 
Definition: IO.h:402
Definition: Stream.h:15
Definition: AudioStream.h:34
Definition: IO.h:68
Definition: IO.h:332
Definition: IO.h:383
Definition: IO.h:322
Definition: IO.h:427
Definition: IO.h:283
Definition: IO.h:96
Definition: IO.h:291
Definition: IO.h:314
Definition: AudioStream.h:16
Definition: IO.h:275
Definition: IO.h:268
Definition: IO.h:234
Definition: Stream.h:84
Definition: IO.h:217
Definition: IO.h:419
Definition: IO.h:306
Definition: IO.h:297
Definition: IO.h:475
Definition: IO.h:408
Definition: IO.h:438
Definition: Utils.h:95
Definition: IO.h:246
Definition: IO.h:152
Definition: CriticalSection.h:9
Definition: IO.h:22

================================================ FILE: doc/_load_music_thread_8cpp.html ================================================ CZPlayer: LoadMusicThread.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThread.cpp 文件参考

音乐加载线程实现文件。 更多...

#include "LoadMusicThread.h"
#include "DBModule.h"
#include "TR.h"
#include <Windows.h>
#include <QTime>
#include <QDir>
#include <QFileInfo>
#include <QTableWidgetItem>
#include <QHeaderView>
#include <QDateTime>
#include <QTextStream>

详细描述

音乐加载线程实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-28
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-28    by chengxuan
*
* 

================================================ FILE: doc/_load_music_thread_8h.html ================================================ CZPlayer: LoadMusicThread.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThread.h 文件参考

音乐加载线程头文件。 更多...

#include <QThread>
#include <QString>
#include <QList>
#include <QStringList>
#include <QLabel>
#include <QUrl>
#include "MusicInfoEntity.h"

浏览源代码.

class  LoadMusicThread
 
class  LoadMusicThreadEvent
 

宏定义

#define LOADMUSICTHREAD_VERSION   0x030000
 

详细描述

音乐加载线程头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-28
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-28    by chengxuan
*
* 

宏定义说明

#define LOADMUSICTHREAD_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_load_music_thread_8h_source.html ================================================ CZPlayer: LoadMusicThread.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThread.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef LOADMUSICTHREAD_H
38 #define LOADMUSICTHREAD_H
39 
43 #define LOADMUSICTHREAD_VERSION 0x030000
44 
45 #include <QThread>
46 #include <QString>
47 #include <QList>
48 #include <QStringList>
49 #include <QLabel>
50 #include <QUrl>
51 #include "MusicInfoEntity.h"
52 
55 class LoadMusicThread : public QThread
56 {
57  Q_OBJECT
58 
59 public:
63  LoadMusicThread(QObject *parent = NULL);
64 
66  ~LoadMusicThread(void);
67 
68 protected:
71  virtual void run();
72 };
73 
76 class LoadMusicThreadEvent : public QObject
77 {
78  Q_OBJECT
79 
80 public:
84  LoadMusicThreadEvent(QObject *parent = NULL);
85 
88 
89 signals:
92  void sigLoadMusicListError();
93 
97 
101  void sigAddMusic(const MusicInfoEntity &entity);
102 
103 private slots:
107  void handleStartloadMusic(const QStringList &musicList);
108 
112  void handleStartloadMusic(const QList<QUrl> &urls);
113 
117  void handleStartloadMusic(const QString &strFileOrDir);
118 
121  void handleStartloadMusic();
122 
123 private:
126  void startLoad();
127 
130  void openMusicModeLoad();
131 
134  void dragEnterMusicModeLoad();
135 
138  void openMusicFormatFileLoad();
139 
142  void readFromDBModeLoad();
143 
146  void openMusicDirectoryMode();
147 
151  void analyzeMusic(const QString &filePath);
152 
153 private:
154  QStringList m_musicList;
155  QList<QUrl> m_urls;
156  QString m_musicFormatFile;
157  QString m_musicDirectory;
160  enum LoadMusicMode
161  {
162  OpenMusic = 1,
163  DragEnterMusic = 2,
164  OpenMusicFormatFile = 3,
165  ReadFromDB = 4,
166  OpenDirectory = 5
167  };
168 
169  LoadMusicMode m_loadMusicMode;
170 };
171 
172 #endif //LOADMUSICTHREAD_H
173 
~LoadMusicThread(void)
Definition: LoadMusicThread.cpp:83
Definition: LoadMusicThread.h:76
Definition: MusicInfoEntity.h:35
virtual void run()
Definition: LoadMusicThread.cpp:88
void sigAddMusic(const MusicInfoEntity &entity)
~LoadMusicThreadEvent(void)
Definition: LoadMusicThread.cpp:99
Definition: LoadMusicThread.h:55
LoadMusicThreadEvent(QObject *parent=NULL)
Definition: LoadMusicThread.cpp:93
LoadMusicThread(QObject *parent=NULL)
Definition: LoadMusicThread.cpp:77
void sigLoadMusicListFinished()
音乐信息实体头文件。

================================================ FILE: doc/_lrc_demo_8cpp.html ================================================ CZPlayer: LrcDemo.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcDemo.cpp 文件参考

歌词模板实现文件。 更多...

#include "LrcDemo.h"
#include "TR.h"
#include <QPaintEvent>
#include <QPainter>

详细描述

歌词模板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_lrc_demo_8h.html ================================================ CZPlayer: LrcDemo.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcDemo.h 文件参考

歌词模板头文件。 更多...

#include <QLabel>
#include <QString>
#include <QLinearGradient>
#include <QFont>
#include <QColor>

浏览源代码.

class  LrcDemo
 

宏定义

#define LRCDEMO_VERSION   0x030000
 

详细描述

歌词模板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define LRCDEMO_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_lrc_demo_8h_source.html ================================================ CZPlayer: LrcDemo.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcDemo.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef LRCDEMO_H
38 #define LRCDEMO_H
39 
43 #define LRCDEMO_VERSION 0x030000
44 
45 #include <QLabel>
46 #include <QString>
47 #include <QLinearGradient>
48 #include <QFont>
49 #include <QColor>
50 
51 class QPaintEvent;
52 
55 class LrcDemo : public QLabel
56 {
57  Q_OBJECT
58 
59 public:
63  LrcDemo(QWidget *parent = NULL);
64 
66  ~LrcDemo();
67 
68 public:
72  void setFontName(const QString &fontName);
73 
77  void setFontSize(const QString &fontSize);
78 
82  void setFontType(const QString &fontType);
83 
87  void setLinearGradient(const QColor &color);
88 
92  void setLinearGradient2(const QColor &color);
93 
97  void setLinearGradient3(const QColor &color);
98 
102  void setMaskLinearGradient(const QColor &color);
103 
107  void setMaskLinearGradient2(const QColor &color);
108 
112  void setMaskLinearGradient3(const QColor &color);
113 
117  void setLrcDemoShadow(const int &shadow);
118 
119 protected:
123  virtual void paintEvent(QPaintEvent *event);
124 
125 private:
129  void setLrcMaskWidth(const double &maskWidth);
130 
131 private:
132  QLinearGradient m_linearGradient;
133  QLinearGradient m_maskLinearGradient;
134  QFont m_font;
135  double m_lrcMaskWidth;
136  int m_shadow;
137 };
138 
139 #endif // LRCDEMO_H
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
173 
void setMaskLinearGradient2(const QColor &color)
Definition: LrcDemo.cpp:167
LrcDemo(QWidget *parent=NULL)
Definition: LrcDemo.cpp:49
void setLinearGradient3(const QColor &color)
Definition: LrcDemo.cpp:155
void setLinearGradient(const QColor &color)
Definition: LrcDemo.cpp:143
void setLinearGradient2(const QColor &color)
Definition: LrcDemo.cpp:149
virtual void paintEvent(QPaintEvent *event)
Definition: LrcDemo.cpp:75
~LrcDemo()
Definition: LrcDemo.cpp:70
Definition: LrcDemo.h:55
void setMaskLinearGradient3(const QColor &color)
Definition: LrcDemo.cpp:173
void setFontSize(const QString &fontSize)
Definition: LrcDemo.cpp:100
void setMaskLinearGradient(const QColor &color)
Definition: LrcDemo.cpp:161
void setFontType(const QString &fontType)
Definition: LrcDemo.cpp:117
void setLrcDemoShadow(const int &shadow)
Definition: LrcDemo.cpp:179
void setFontName(const QString &fontName)
Definition: LrcDemo.cpp:94

================================================ FILE: doc/_lrc_portrait_panel_8cpp.html ================================================ CZPlayer: LrcPortraitPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcPortraitPanel.cpp 文件参考

歌词写真面板实现文件。 更多...

#include "LrcPortraitPanel.h"
#include "TR.h"
#include <QLabel>
#include <QVBoxLayout>

详细描述

歌词写真面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_lrc_portrait_panel_8h.html ================================================ CZPlayer: LrcPortraitPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcPortraitPanel.h 文件参考

歌词写真面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  LrcPortraitPanel
 

宏定义

#define LRCPORTRAITPANEL_VERSION   0x030000
 

详细描述

歌词写真面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define LRCPORTRAITPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_lrc_portrait_panel_8h_source.html ================================================ CZPlayer: LrcPortraitPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcPortraitPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef LRCPORTRAITPANEL_H
38 #define LRCPORTRAITPANEL_H
39 
43 #define LRCPORTRAITPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class LrcPortraitPanel : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  LrcPortraitPanel(QWidget *parent = NULL);
60 
63 
64 private:
67  void createUI();
68 
71  void createConnect();
72 
73 private:
74  QLabel *m_tipLabel;
75 };
76 
77 #endif // LRCPORTRAITPANEL_H
LrcPortraitPanel(QWidget *parent=NULL)
Definition: LrcPortraitPanel.cpp:49
Definition: LrcPortraitPanel.h:51
~LrcPortraitPanel()
Definition: LrcPortraitPanel.cpp:56

================================================ FILE: doc/_lrc_settings_page_8cpp.html ================================================ CZPlayer: LrcSettingsPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcSettingsPage.cpp 文件参考

歌词设置页面实现文件。 更多...

#include "LrcSettingsPage.h"
#include "LrcDemo.h"
#include "GlobalConfig.h"
#include "Global.h"
#include "TR.h"
#include <QLabel>
#include <QSpinBox>
#include <QLineEdit>
#include <QSlider>
#include <QPushButton>
#include <QAction>
#include <QGroupBox>
#include <QComboBox>
#include <QHBoxLayout>
#include <QColorDialog>
#include <QMenu>
#include <QFontDatabase>
#include <QMessageBox>

详细描述

歌词设置页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_lrc_settings_page_8h.html ================================================ CZPlayer: LrcSettingsPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcSettingsPage.h 文件参考

歌词设置页面头文件。 更多...

#include <QWidget>
#include <QString>
#include <QColor>
#include <QMenu>

浏览源代码.

class  LrcSettingsPage
 

宏定义

#define LRCSETTINGSPAGE_VERSION   0x030000
 

详细描述

歌词设置页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define LRCSETTINGSPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_lrc_settings_page_8h_source.html ================================================ CZPlayer: LrcSettingsPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcSettingsPage.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef LRCSETTINGSPAGE_H
38 #define LRCSETTINGSPAGE_H
39 
43 #define LRCSETTINGSPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 #include <QString>
47 #include <QColor>
48 #include <QMenu>
49 
50 class LrcDemo;
51 class QLabel;
52 class QSpinBox;
53 class QLineEdit;
54 class QSlider;
55 class QPushButton;
56 class QAction;
57 class QComboBox;
58 
61 class LrcSettingsPage : public QWidget
62 {
63  Q_OBJECT
64 
65 public:
69  LrcSettingsPage(QWidget *parent = NULL);
70 
73 
76  void init();
77 
80  void apply();
81 
82 signals:
85  void sigLrcSettingsChanged();
86 
87 private slots:
90  void handleChangeColor();
91 
95  void handleFontNameChanged(const QString &fontName);
96 
100  void handleFontSizeChanged(const QString &fontSize);
101 
105  void handleFontTypeChanged(const QString &fontType);
106 
109  void handleNoPlayShangColorChanged();
110 
113  void handleNoPlayZhongColorChanged();
114 
117  void handleNoPlayXiaColorChanged();
118 
121  void handlePlayedShangColorChanged();
122 
125  void handlePlayedZhongColorChanged();
126 
129  void handlePlayedXiaColorChanged();
130 
133  void handlePresetColor();
134 
137  void handleRecoverDefaultSetting();
138 
141  void handlePresetColorChanged();
142 
145  void handleShadowChanged(const int &shadow);
146 
147 private:
150  void createUI();
151 
154  void createConnect();
155 
160  void setLineEditColor(QLineEdit *lineEdit, const QColor &color);
161 
165  void setDefaultChoiceColor(const QString &color);
166 
167 private:
168  LrcDemo *m_lrcDemo;
170  QLabel *m_fontLabel;
171  QComboBox *m_fontNameCombo;
173  QLabel *m_fontSizeLabel;
174  QComboBox *m_fontSizeCombo;
176  QLabel *m_fontTypeLabel;
177  QComboBox *m_fontTypeCombo;
179  QLabel *m_shadowLabel;
180  QSlider *m_shadowSlider;
181  QSpinBox *m_shadowSpinBox;
183  QLineEdit *m_noPlayEdit;
184  QPushButton *m_changeNoPlayButton;
185  QColor m_noPlayShang;
187  QLineEdit *m_noPlayEdit2;
188  QPushButton *m_changeNoPlayButton2;
189  QColor m_noPlayZhong;
191  QLineEdit *m_noPlayEdit3;
192  QPushButton *m_changeNoPlayButton3;
193  QColor m_noPlayXia;
195  QLineEdit *m_playedEdit;
196  QPushButton *m_changePlayedButton;
197  QColor m_playedShang;
199  QLineEdit *m_playedEdit2;
200  QPushButton *m_changePlayedButton2;
201  QColor m_playedZhong;
203  QLineEdit *m_playedEdit3;
204  QPushButton *m_changePlayedButton3;
205  QColor m_playedXia;
207  QPushButton *m_yuSheButton;
208  QPushButton *m_recoverDefaultColorButton;
210  QMenu m_presetMenu;
211  QString m_defaultChoiceColor;
213  QAction *m_jingDianWhite;
214  QAction *m_haiYangBlue;
215  QAction *m_huoYanRed;
216  QAction *m_kuXuanBlack;
217  QAction *m_qiuSeYellow;
218  QAction *m_langManPurple;
219  QAction *m_ziRanGreen;
220 };
221 
222 #endif // LRCSETTINGSPAGE_H
~LrcSettingsPage()
Definition: LrcSettingsPage.cpp:87
LrcSettingsPage(QWidget *parent=NULL)
Definition: LrcSettingsPage.cpp:79
Definition: LrcDemo.h:55
void sigLrcSettingsChanged()
Definition: LrcSettingsPage.h:61
void apply()
Definition: LrcSettingsPage.cpp:120
void init()
Definition: LrcSettingsPage.cpp:97

================================================ FILE: doc/_lrc_thread_8cpp.html ================================================ CZPlayer: LrcThread.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcThread.cpp 文件参考

歌词下载线程头文件。 更多...

#include "LrcThread.h"
#include <QtXml>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QLabel>

详细描述

歌词下载线程头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-28
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-28    by chengxuan
*
* 

================================================ FILE: doc/_lrc_thread_8h.html ================================================ CZPlayer: LrcThread.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcThread.h 文件参考

歌词下载线程头文件。 更多...

#include <QThread>
#include <QFile>
#include <QUrl>
#include <QString>
#include "StatusDefine.h"

浏览源代码.

class  LrcThread
 

宏定义

#define LRCTHREAD_VERSION   0x030000
 

详细描述

歌词下载线程头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-28
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-28    by chengxuan
*
* 

宏定义说明

#define LRCTHREAD_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_lrc_thread_8h_source.html ================================================ CZPlayer: LrcThread.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcThread.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef LRCTHREAD_H
38 #define LRCTHREAD_H
39 
43 #define LRCTHREAD_VERSION 0x030000
44 
45 #include <QThread>
46 #include <QFile>
47 #include <QUrl>
48 #include <QString>
49 #include "StatusDefine.h"
50 
51 class QNetworkAccessManager;
52 class QNetworkReply;
53 class QLabel;
54 
57 class LrcThread : public QThread
58 {
59  Q_OBJECT
60 
61 public:
68  LrcThread(const QString &musicName,
69  const QString &musicArtist,
70  const QString &lrcFilePath,
71  QObject *parent = NULL);
72 
74  ~LrcThread();
75 
76 protected:
79  virtual void run();
80 
81 signals:
88  void sigLrcDownloadStatus(const QString &musicName,
89  const QString &musicArtist,
90  const QString &lrcFilePath,
91  LrcDownloadStatus status);
92 
93 private slots:
97  void handleGetMusicXML(QNetworkReply *replay);
98 
102  void handleSaveLrc(QNetworkReply *replay);
103 
104 private:
108  void setLrcFromURL(const QUrl &url);
109 
110 private:
111  QFile m_lrcFile;
112  QString m_musicName;
113  QString m_musicArtist;
114  QString m_lrcFilePath;
116  QNetworkAccessManager *m_lrcManager;
117  QNetworkAccessManager *m_lrcManager2;
118 };
119 
120 #endif // LRCTHREAD_H
Definition: LrcThread.h:57
virtual void run()
Definition: LrcThread.cpp:77
LrcDownloadStatus
Definition: StatusDefine.h:53
状态代码定义头文件。
LrcThread(const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, QObject *parent=NULL)
Definition: LrcThread.cpp:46
void sigLrcDownloadStatus(const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, LrcDownloadStatus status)
~LrcThread()
Definition: LrcThread.cpp:60

================================================ FILE: doc/_main_widget_8h.html ================================================ CZPlayer: MainWidget.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MainWidget.h 文件参考

播放器主界面头文件。 更多...

#include <vector>
#include <QWidget>
#include <QString>
#include <QMap>
#include <QPoint>
#include <QUrl>
#include <QSystemTrayIcon>
#include "signal_slot.h"
#include "StatusDefine.h"
#include "MusicInfoEntity.h"

浏览源代码.

class  MainWidget
 

宏定义

#define MAINWIDGET_VERSION   0x030000
 

详细描述

播放器主界面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define MAINWIDGET_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_main_widget_8h_source.html ================================================ CZPlayer: MainWidget.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MainWidget.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MAINWIDGET_H
38 #define MAINWIDGET_H
39 
43 #define MAINWIDGET_VERSION 0x030000
44 
45 #include <vector>
46 using namespace std;
47 #include <QWidget>
48 #include <QString>
49 #include <QMap>
50 #include <QPoint>
51 #include <QUrl>
52 #include <QSystemTrayIcon>
53 #include "signal_slot.h"
54 #include "StatusDefine.h"
55 #include "MusicInfoEntity.h"
56 
57 class QPushButton;
58 class QLabel;
59 class QMenu;
60 class QAction;
61 class QSlider;
62 class QTimer;
63 class QPaintEvent;
64 class QMouseEvent;
65 class QContextMenuEvent;
66 class QDragEnterEvent;
67 class QDropEvent;
68 
69 class CBasicPlayer;
70 class Spectrograph;
71 class MinMusicWidget;
72 class MusicList;
73 class MusicListWidget;
74 class MusicLrc;
75 class MediaWidget;
76 class ConfigDialog;
77 class SharedDialog;
78 class AboutPanel;
79 class GlobalHotKey;
80 class LoadMusicThread;
82 
83 /*****************************************************************************
84  这里用来检查版本的对应
85  *****************************************************************************/
86 
89 class MainWidget : public QWidget
90 {
91  Q_OBJECT
92 
93 public:
98  MainWidget(const char *argvMusicPath, QWidget *parent = NULL);
99 
101  ~MainWidget();
102 
103 protected:
107  virtual void paintEvent(QPaintEvent *event);
108 
112  virtual void mousePressEvent(QMouseEvent *event);
113 
117  virtual void mouseMoveEvent(QMouseEvent *event);
118 
122  virtual void contextMenuEvent(QContextMenuEvent *event);
123 
127  virtual void dragEnterEvent(QDragEnterEvent *event);
128 
132  virtual void dropEvent(QDropEvent *event);
133 
134 signals:
137  void sigShowMainWidget();
138 
142  void sigSpectrumChanged(const vector<float> &vecFrequency);
143 
147  void sigStartloadMusic(const QStringList &musicList);
148 
152  void sigStartloadMusic(const QList<QUrl> &urls);
153 
157  void sigStartloadMusic(const QString &strFileOrDir);
158 
161  void sigStartloadMusic();
162 
163 private slots:
166  void handleUpdateTime();
167 
170  void handleOpenMinWidget();
171 
174  void handleOpenFile();
175 
178  void handleAddMusicList();
179 
182  void handleAddMusicDir();
183 
186  void handleOpenMusicList();
187 
190  void handleOpenMusicLrc();
191 
194  void handleOpenMediaWidget();
195 
198  void handleHideMediaWidget();
199 
202  void handleHideMusicList();
203 
206  void handleHideMainWidget();
207 
210  void handleShowMusicPanel();
211 
214  void handleConfigCZPlayer();
215 
218  void handleAboutCZPlayer();
219 
222  void handleAboutQt();
223 
226  void handleSetPlayPaused();
227 
230  void handleSetPlay();
231 
234  void handleSetPause();
235 
238  void handleSetStop();
239 
242  void handleSetPre();
243 
246  void handleSetNext();
247 
252  void handleTableDoubleClicked(const int &row, const int &column);
253 
256  void handleClearSources();
257 
262  void handleDelSelectSource(const int &row, const QString &musicName);
263 
267  void handleTrayIconActivated(QSystemTrayIcon::ActivationReason activationReason);
268 
271  void handleShowMinSize();
272 
275  void handleMinToTray();
276 
279  void handleShowLrcLocked();
280 
283  void handleShowLrcUnlocked();
284 
287  void handleUnlockLrc();
288 
291  void handleCloseAllProgress();
292 
295  void handleTimeOut();
296 
299  void handleAutoUpdate();
300 
303  void handleConfigOptions();
304 
307  void handleShowHideMainWidget();
308 
311  void handleMinMainWidget();
312 
316  void handleSetVolume(const int &value);
317 
320  void handleSetMute();
321 
324  void handleShowModeMenu();
325 
328  void handleCyclePlay();
329 
332  void handleRandomPlay();
333 
338  void handleAlbumDownloadFinished(const QString &musicName, const QString &albumUrl);
339 
343  void handleSharedCurrentMusic(const QString &musicName);
344 
347  void handleLoadMusicListFinished();
348 
351  void handleLoadMusicListError();
352 
356  void handleMusicDirChanged(const QString &path);
357 
361  void handleAlbumDirChanged(const QString &path);
362 
366  void handleLrcDirChanged(const QString &path);
367 
371  void handleAddMusic(const MusicInfoEntity &entity);
372 
379  void handleAlbumDownloadStatus(const QString &fileName,
380  const QString &albumUrl,
381  const QString &albumFilePath,
382  AlbumDownloadStatus status);
383 
390  void handleLrcDownloadStatus(const QString &musicName,
391  const QString &musicArtist,
392  const QString &lrcFilePath,
393  LrcDownloadStatus status);
394 
397  void handleConfigDialogClosed();
398 
402  void handleMuteChanged(const bool &isMute);
403 
407  void handleVolumeChanged(const int &volume);
408 
412  void handlePlayModeChanged(enum PlayModeType playMode);
413 
414 private c_slots:
418  void handleSpectrumChanged(vector<float> vecFrequency);
419 
422  void handleFinished();
423 
424 private:
426  enum State
427  {
428  NoState,
429  Play,
430  Pause,
431  Stop
432  };
433 
435  enum Mode
436  {
437  CyclePlay,
438  RandomPlay
439  };
440 
441 private:
444  void createUI();
445 
448  void createMenus();
449 
452  void createConnect();
453 
456  void createMusicloadThread();
457 
460  void releaseResource();
461 
464  void savePlayControlSettingsInfo();
465 
468  void terminateAllThread();
469 
472  void playGreetings();
473 
477  void resolveLrc(const QString &lrcFilePath);
478 
481  void showAlbumImage();
482 
486  void updateMap(const QString &musicName);
487 
490  void stateChanged();
491 
494  void rowChanged();
495 
499  void loadMusicList(const QString &filePath);
500 
505  void findAndPlay(const QString &currentMusicName, const int &currentMusicRow);
506 
513  void play(const QString &currentFilePath,
514  const QString &currentMusicName,
515  const int &currentMusicRow,
516  const QString &currentMusicTime);
517 
521  void setState(State state);
522 
526  void setMode(Mode mode);
527 
530  void reset();
531 
534  void play();
535 
539  void play(const QString &currentFilePath);
540 
543  void pause();
544 
547  void changeWorkDir();
548 
552  void changeAlbumImage(const QString &albumFilePath);
553 
560  void downloadAlbum(const QString &fileName,
561  const QString &musicName,
562  const QString &musicArtist,
563  const QString &albumFilePath);
564 
570  void downloadLrc(const QString &musicName, const QString &musicArtist, const QString &lrcFilePath);
571 
572 private:
573  bool m_musicListShowFlag;
574  bool m_musicDownloadShowFlag;
576  QPoint m_dragPosition;
577  QTimer *m_timer;
578  QTimer *m_upDateTimer;
580  QList<QThread *> m_albumThreads;
581  QList<QThread *> m_lrcThreads;
583  MinMusicWidget *m_minMusicWidget;
584  MusicList *m_playList;
585  MusicListWidget *m_musicListWidget;
586  MusicLrc *m_lrc;
587  MediaWidget *m_mediaWidget;
588  ConfigDialog *m_configDialog;
589  SharedDialog *m_sharedDialog;
590  AboutPanel *m_aboutPanel;
591  GlobalHotKey *m_globalHotKey;
592  LoadMusicThread *m_loadMusicThread;
593  LoadMusicThreadEvent *m_loadMusicThreadEvent;
595  QMap<qint64, QString> m_lrcMap;
596  QMap<QString, int> m_mapMusicRows;
597  QMap<QString, QString> m_mapMusicFilePath;
599  State m_state;
600  Mode m_mode;
602  CBasicPlayer *m_basicPlayer;
603  Spectrograph *m_spectrograph;
605  QSlider *m_seekSlider;
606  QSlider *m_volumeSlider;
607  bool m_isMute;
609  QLabel *m_albumImage;
610  QLabel *m_timeLabel;
611  QLabel *m_infoLabel;
612  QLabel *m_currentMusicLabel;
614  QAction *m_closeAction;
615  QAction *m_pauseAction;
616  QAction *m_stopAction;
617  QAction *m_lastAction;
618  QAction *m_nextAction;
619  QAction *m_minAction;
620  QAction *m_quitAction;
621  QAction *m_unlockLrcAction;
622  QAction *m_openFileAction;
623  QAction *m_openMusicListAction;
624  QAction *m_openMediaWidgetAction;
625  QAction *m_openLrcAction;
626  QAction *m_autoUpdateAction;
627  QAction *m_configAction;
628  QAction *m_aboutAction;
629  QAction *m_aboutQtAction;
630  QAction *m_cycleAction;
631  QAction *m_randomAction;
633  QMenu *m_trayMenu;
634  QSystemTrayIcon *m_trayIcon;
635  QMenu *m_rightHandMenu;
636  QMenu *m_playModeMenu;
638  QPushButton *m_playButton;
639  QPushButton *m_endButton;
640  QPushButton *m_preButton;
641  QPushButton *m_nextButton;
642  QPushButton *m_openFileButton;
643  QPushButton *m_musicListButton;
644  QPushButton *m_lrcButton;
645  QPushButton *m_showButton;
646  QPushButton *m_volumeButton;
647  QPushButton *m_modeButton;
649  QString m_musicName;
650  QString m_musicArtist;
651  QString m_title;
652  QString m_artist;
653  int m_pos;
655  QString m_currentFilePath;
656  QString m_currentMusicName;
657  QString m_currentMusicTime;
658  int m_currentMusicRow;
659  int m_time;
661  bool m_isStarupLoadMusic;
662  QString m_argvMusicPath;
664  QString m_musicPath;
665  QString m_albumPath;
666  QString m_lrcPath;
667 };
668 
669 #endif // MAINWIDGET_H
Definition: LoadMusicThread.h:76
Definition: MusicInfoEntity.h:35
Definition: MinMusicWidget.h:57
Definition: MainWidget.h:89
Definition: SpectroGraph.h:56
Definition: MediaWidget.h:60
Definition: AboutPanel.h:56
LrcDownloadStatus
Definition: StatusDefine.h:53
状态代码定义头文件。
Definition: LoadMusicThread.h:55
AlbumDownloadStatus
Definition: StatusDefine.h:46
Definition: MusicList.h:55
Definition: MusicLrc.h:59
Definition: ConfigDialog.h:60
Definition: MusicListWidget.h:56
Definition: BasicPlayer.h:231
Definition: GlobalHotkey.h:52
Definition: SharedDialog.h:55
音乐信息实体头文件。

================================================ FILE: doc/_media_widget_8cpp.html ================================================ CZPlayer: MediaWidget.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MediaWidget.cpp 文件参考

媒体界面实现文件。 更多...

#include "MediaWidget.h"
#include "SearchPanel.h"
#include "RadioPanel.h"
#include "RankingPanel.h"
#include "DownloadListPanel.h"
#include "CollectionPanel.h"
#include "LrcPortraitPanel.h"
#include "Global.h"
#include "TR.h"
#include <QStackedWidget>
#include <QPushButton>
#include <QLabel>
#include <QPaintEvent>
#include <QPainter>
#include <QPixmap>
#include <QBitmap>
#include <QVBoxLayout>
#include <QSpacerItem>

详细描述

媒体界面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_media_widget_8h.html ================================================ CZPlayer: MediaWidget.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MediaWidget.h 文件参考

媒体界面头文件。 更多...

#include <QWidget>

浏览源代码.

class  MediaWidget
 

宏定义

#define MEDIAWIDGET_VERSION   0x030000
 

详细描述

媒体界面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define MEDIAWIDGET_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_media_widget_8h_source.html ================================================ CZPlayer: MediaWidget.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MediaWidget.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MEDIAWIDGET_H
38 #define MEDIAWIDGET_H
39 
43 #define MEDIAWIDGET_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class SearchPanel;
48 class RadioPanel;
49 class RankingPanel;
50 class DownloadListPanel;
51 class CollectionPanel;
52 class LrcPortraitPanel;
53 class QStackedWidget;
54 class QPushButton;
55 class QLabel;
56 class QPaintEvent;
57 
60 class MediaWidget : public QWidget
61 {
62  Q_OBJECT
63 
64 public:
68  MediaWidget(QWidget *parent = NULL);
69 
71  ~MediaWidget();
72 
73 protected:
77  virtual void paintEvent(QPaintEvent *event);
78 
79 private slots:
82  void handleSearchButton();
83 
86  void handleRadioButton();
87 
90  void handleRankingButton();
91 
94  void handleDownloadListButton();
95 
98  void handleCollectionButton();
99 
102  void handleLrcPortraitButton();
103 
104 private:
107  void createUI();
108 
111  void createConnect();
112 
115  void recoverButtonStyle();
116 
117 private:
118  QStackedWidget *m_pagesWidget;
120  SearchPanel *m_searchPanel;
121  RadioPanel *m_radioPanel;
122  RankingPanel *m_rankingPanel;
123  DownloadListPanel *m_downloadListPanel;
124  CollectionPanel *m_collectionPanel;
125  LrcPortraitPanel *m_lrcPortraitPanel;
127  QLabel *m_navigationBarLabel;
128  QPushButton *m_searchButton;
129  QPushButton *m_radioButton;
130  QPushButton *m_rankingButton;
131  QPushButton *m_downLoadListButton;
132  QPushButton *m_collectionButton;
133  QPushButton *m_lrcPortraitButton;
135  bool m_isSearchButtonClicked;
136  bool m_isRadioButtonClicked;
137  bool m_isRankingButtonClicked;
138  bool m_isDownloadListButtonClicked;
139  bool m_isCollectionButtonClicked;
140  bool m_isLrcPortraitButtonClicked;
141 };
142 
143 #endif // MEDIAWIDGET_H
Definition: SearchPanel.h:55
~MediaWidget()
Definition: MediaWidget.cpp:113
Definition: MediaWidget.h:60
Definition: CollectionPanel.h:51
Definition: RankingPanel.h:51
MediaWidget(QWidget *parent=NULL)
Definition: MediaWidget.cpp:94
Definition: RadioPanel.h:51
Definition: LrcPortraitPanel.h:51
Definition: DownloadListPanel.h:51
virtual void paintEvent(QPaintEvent *event)
Definition: MediaWidget.cpp:158

================================================ FILE: doc/_min_music_widget_8cpp.html ================================================ CZPlayer: MinMusicWidget.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MinMusicWidget.cpp 文件参考

迷你界面实现文件。 更多...

#include "MinMusicWidget.h"
#include "TR.h"
#include "Global.h"
#include <QPropertyAnimation>
#include <QMenu>
#include <QPainter>
#include <QPixmap>
#include <QBitmap>
#include <QPushButton>
#include <QLabel>
#include <QPaintEvent>
#include <QMouseEvent>
#include <QContextMenuEvent>

变量

const int Radius = 112
 

详细描述

迷你界面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

变量说明

const int Radius = 112

专辑图片半径


================================================ FILE: doc/_min_music_widget_8h.html ================================================ CZPlayer: MinMusicWidget.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MinMusicWidget.h 文件参考

迷你界面头文件。 更多...

#include <QWidget>
#include <QPoint>

浏览源代码.

class  MinMusicWidget
 

宏定义

#define MINMUSICWIDGET_VERSION   0x030000
 

详细描述

迷你界面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define MINMUSICWIDGET_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_min_music_widget_8h_source.html ================================================ CZPlayer: MinMusicWidget.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MinMusicWidget.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MINMUSICWIDGET_H
38 #define MINMUSICWIDGET_H
39 
43 #define MINMUSICWIDGET_VERSION 0x030000
44 
45 #include <QWidget>
46 #include <QPoint>
47 
48 class QPaintEvent;
49 class QMouseEvent;
50 class QContextMenuEvent;
51 class QPushButton;
52 class QLabel;
53 class QMenu;
54 
57 class MinMusicWidget : public QWidget
58 {
59  Q_OBJECT
60 
61 public:
66  MinMusicWidget(QWidget *mainWidget, QWidget *parent = NULL);
67 
70 
74  void setWork(bool isWork);
75 
79  void setMinMusicLrcActionText(const QString &text);
80 
84  void changeAlbumImage(const QString &albumFilePath);
85 
86 protected:
90  virtual void paintEvent(QPaintEvent *event);
91 
95  virtual void mousePressEvent(QMouseEvent *event);
96 
100  virtual void mouseMoveEvent(QMouseEvent *event);
101 
105  virtual void contextMenuEvent(QContextMenuEvent *event);
106 
107 signals:
110  void sigShowMusicPanel();
111 
112 private slots:
115  void handleOpenMainWidget();
116 
117 private:
120  void createUI();
121 
124  void createConnect();
125 
126 private:
127  QWidget *m_mainWidget;
128  QPoint m_dragPosition;
130  QLabel *m_albumImage;
132  QPushButton *m_minPlayButton;
133  QPushButton *m_minPauseButton;
134  QPushButton *m_minStopButton;
135  QPushButton *m_minNextButton;
136  QPushButton *m_minLastButton;
137  QPushButton *m_minOpenFileButton;
138  QAction *m_minMusicLrcAction;
139  QMenu *m_rightHandMenu;
140 };
141 
142 #endif // MINMUSICWIDGET_H
Definition: MinMusicWidget.h:57
virtual void mouseMoveEvent(QMouseEvent *event)
Definition: MinMusicWidget.cpp:131
MinMusicWidget(QWidget *mainWidget, QWidget *parent=NULL)
Definition: MinMusicWidget.cpp:67
virtual void contextMenuEvent(QContextMenuEvent *event)
Definition: MinMusicWidget.cpp:102
void sigShowMusicPanel()
virtual void mousePressEvent(QMouseEvent *event)
Definition: MinMusicWidget.cpp:121
void setWork(bool isWork)
Definition: MinMusicWidget.cpp:141
void changeAlbumImage(const QString &albumFilePath)
Definition: MinMusicWidget.cpp:229
~MinMusicWidget()
Definition: MinMusicWidget.cpp:75
void setMinMusicLrcActionText(const QString &text)
Definition: MinMusicWidget.cpp:150
virtual void paintEvent(QPaintEvent *event)
Definition: MinMusicWidget.cpp:109

================================================ FILE: doc/_music_info_entity_8cpp.html ================================================ CZPlayer: MusicInfoEntity.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicInfoEntity.cpp 文件参考

音乐信息实体实现文件。 更多...

#include "MusicInfoEntity.h"

详细描述

音乐信息实体实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

================================================ FILE: doc/_music_info_entity_8h.html ================================================ CZPlayer: MusicInfoEntity.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicInfoEntity.h 文件参考

音乐信息实体头文件。 更多...

#include <QString>

浏览源代码.

class  MusicInfoEntity
 

宏定义

#define MUSICINFOENTITY_VERSION   0x030000
 

详细描述

音乐信息实体头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define MUSICINFOENTITY_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_music_info_entity_8h_source.html ================================================ CZPlayer: MusicInfoEntity.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicInfoEntity.h
浏览该文件的文档.
1 /****************************************************************
2  * Copyright (C),2012-2015 Highway-9 Studio.
3  * All rights reserved.
4  *
5  ****************************************************************/
6 
23 #ifndef MUSICINFOENTITY_H
24 #define MUSICINFOENTITY_H
25 
29 #define MUSICINFOENTITY_VERSION 0x030000
30 
31 #include <QString>
32 
36 {
37 public:
40 
46  MusicInfoEntity(const QString &fileName, const QString &time, const QString &filePath);
47 
50 
54  QString fileName() const;
55 
59  void setFileName(const QString &fileName);
60 
64  QString time() const;
65 
69  void setTime(const QString &time);
70 
74  QString filePath() const;
75 
79  void setFilePath(const QString &filePath);
80 
81 private:
82  QString m_fileName;
83  QString m_time;
84  QString m_filePath;
85 };
86 
87 #endif // MUSICINFOENTITY_H
88 
Definition: MusicInfoEntity.h:35
QString fileName() const
Definition: MusicInfoEntity.cpp:47
QString filePath() const
Definition: MusicInfoEntity.cpp:67
MusicInfoEntity()
Definition: MusicInfoEntity.cpp:25
~MusicInfoEntity()
Definition: MusicInfoEntity.cpp:40
QString time() const
Definition: MusicInfoEntity.cpp:57
void setFileName(const QString &fileName)
Definition: MusicInfoEntity.cpp:52
void setTime(const QString &time)
Definition: MusicInfoEntity.cpp:62
void setFilePath(const QString &filePath)
Definition: MusicInfoEntity.cpp:72

================================================ FILE: doc/_music_list_8cpp.html ================================================ CZPlayer: MusicList.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicList.cpp 文件参考

音乐列表实现文件。 更多...

#include "MusicList.h"
#include "NoFocusDelegate.h"
#include "DBModule.h"
#include "MusicListSaveFormatEntity.h"
#include "Global.h"
#include "TR.h"
#include <QHeaderView>
#include <QContextMenuEvent>
#include <QMenu>
#include <QMessageBox>
#include <QFileDialog>
#include <QTime>
#include <QTextStream>

详细描述

音乐列表实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-07
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-07    by chengxuan
*
* 

================================================ FILE: doc/_music_list_8h.html ================================================ CZPlayer: MusicList.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicList.h 文件参考

音乐列表头文件。 更多...

#include <QTableWidget>
#include <QString>
#include <QPoint>
#include <QColor>

浏览源代码.

class  MusicList
 

宏定义

#define MUSICLIST_VERSION   0x030000
 

详细描述

音乐列表头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-07
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-07    by chengxuan
*
* 

宏定义说明

#define MUSICLIST_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_music_list_8h_source.html ================================================ CZPlayer: MusicList.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicList.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MUSICLIST_H
38 #define MUSICLIST_H
39 
43 #define MUSICLIST_VERSION 0x030000
44 
45 #include <QTableWidget>
46 #include <QString>
47 #include <QPoint>
48 #include <QColor>
49 
50 class QContextMenuEvent;
51 class QMenu;
52 
55 class MusicList : public QTableWidget
56 {
57  Q_OBJECT
58 
59 public:
63  MusicList(QWidget *parent = NULL);
64 
66  ~MusicList();
67 
68 public:
72  void setCurrentMusicRow(const int &row);
73 
74 protected:
78  virtual void contextMenuEvent(QContextMenuEvent *event);
79 
80 signals:
84 
89  void sigRowSelected(const int &row, const QString &title);
90 
94  void sigSharedCurrentMusic(const QString &musicName);
95 
96 private slots:
99  void handleClearAllMusicList();
100 
103  void handleDelCurrentMusic();
104 
108  void handleTableClicked(const int &index);
109 
114  void handleTableRowEnter(const int &row, const int &col);
115 
118  void handleLocateCurrentMusic();
119 
122  void handleSaveList();
123 
126  void handleShareCurrentMusic();
127 
128 private:
131  void updateMusicList();
132 
137  void setRowColor(const int &row, const QColor &color);
138 
141  void createUI();
142 
145  void createConnect();
146 
147 private:
148  QWidget *m_parent;
149  int m_row;
150  int m_currentMusicRow;
151  int m_perviousColorRow;
152  QMenu *m_rightHandMenu;
153 };
154 
155 #endif // MUSICLIST_H
void sigRowSelected(const int &row, const QString &title)
void sigSharedCurrentMusic(const QString &musicName)
void sigPlayListCleanFinshed()
~MusicList()
Definition: MusicList.cpp:84
MusicList(QWidget *parent=NULL)
Definition: MusicList.cpp:73
void setCurrentMusicRow(const int &row)
Definition: MusicList.cpp:290
Definition: MusicList.h:55
virtual void contextMenuEvent(QContextMenuEvent *event)
Definition: MusicList.cpp:190

================================================ FILE: doc/_music_list_save_format_entity_8cpp.html ================================================ CZPlayer: MusicListSaveFormatEntity.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListSaveFormatEntity.cpp 文件参考

音乐列表保存格式实体实现文件。 更多...

详细描述

音乐列表保存格式实体实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

================================================ FILE: doc/_music_list_save_format_entity_8h.html ================================================ CZPlayer: MusicListSaveFormatEntity.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListSaveFormatEntity.h 文件参考

音乐列表保存格式实体头文件。 更多...

#include <QString>

浏览源代码.

class  MusicListSaveFormatEntity
 

宏定义

#define MUSICLISTSAVEFORMATENTITY_VERSION   0x030000
 

详细描述

音乐列表保存格式实体头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define MUSICLISTSAVEFORMATENTITY_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_music_list_save_format_entity_8h_source.html ================================================ CZPlayer: MusicListSaveFormatEntity.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListSaveFormatEntity.h
浏览该文件的文档.
1 /****************************************************************
2  * Copyright (C),2012-2015 Highway-9 Studio.
3  * All rights reserved.
4  *
5  ****************************************************************/
6 
23 #ifndef MUSICLISTSAVEFORMATENTITY_H
24 #define MUSICLISTSAVEFORMATENTITY_H
25 
29 #define MUSICLISTSAVEFORMATENTITY_VERSION 0x030000
30 
31 #include <QString>
32 
36 {
37 public:
40 
46  MusicListSaveFormatEntity(const QString &fileName, const QString &time, const QString &filePath);
47 
50 
54  QString fileName() const;
55 
59  void setFileName(const QString &fileName);
60 
64  QString time() const;
65 
69  void setTime(const QString &time);
70 
74  QString filePath() const;
75 
79  void setFilePath(const QString &filePath);
80 
81 private:
82  QString m_fileName;
83  QString m_time;
84  QString m_filePath;
85 };
86 
87 #endif //MUSICLISTSAVEFORMATENTITY_H
void setFileName(const QString &fileName)
Definition: MusicListSaveFormatEntity.cpp:52
QString filePath() const
Definition: MusicListSaveFormatEntity.cpp:67
Definition: MusicListSaveFormatEntity.h:35
~MusicListSaveFormatEntity()
Definition: MusicListSaveFormatEntity.cpp:40
MusicListSaveFormatEntity()
Definition: MusicListSaveFormatEntity.cpp:25
void setTime(const QString &time)
Definition: MusicListSaveFormatEntity.cpp:62
QString time() const
Definition: MusicListSaveFormatEntity.cpp:57
void setFilePath(const QString &filePath)
Definition: MusicListSaveFormatEntity.cpp:72
QString fileName() const
Definition: MusicListSaveFormatEntity.cpp:47

================================================ FILE: doc/_music_list_widget_8cpp.html ================================================ CZPlayer: MusicListWidget.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListWidget.cpp 文件参考

歌曲列表面板实现文件。 更多...

#include "MusicListWidget.h"
#include "MusicList.h"
#include "Global.h"
#include "TR.h"
#include <QPaintEvent>
#include <QTimer>
#include <QMenu>
#include <QLineEdit>
#include <QPushButton>
#include <QSpacerItem>
#include <QVBoxLayout>
#include <QPainter>
#include <QBitmap>

详细描述

歌曲列表面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-08
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-08    by chengxuan
*
* 

================================================ FILE: doc/_music_list_widget_8h.html ================================================ CZPlayer: MusicListWidget.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListWidget.h 文件参考

歌曲列表面板头文件。 更多...

#include <QWidget>
#include <QMap>

浏览源代码.

class  MusicListWidget
 

宏定义

#define MUSICLISTWIDGET_VERSION   0x030000
 

详细描述

歌曲列表面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-08
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-08    by chengxuan
*
* 

宏定义说明

#define MUSICLISTWIDGET_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_music_list_widget_8h_source.html ================================================ CZPlayer: MusicListWidget.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListWidget.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MUSICLISTWIDGET_H
38 #define MUSICLISTWIDGET_H
39 
43 #define MUSICLISTWIDGET_VERSION 0x030000
44 
45 #include <QWidget>
46 #include <QMap>
47 
48 class MusicList;
49 class QPaintEvent;
50 class QTimer;
51 class QLineEdit;
52 class QPushButton;
53 class QMenu;
54 
55 //歌曲列表面板
56 class MusicListWidget : public QWidget
57 {
58  Q_OBJECT
59 
60 public:
66  MusicListWidget(MusicList *playList,
67  QMap<QString, int> *mapMusicRows,
68  QWidget *parent = NULL);
69 
72 
73 protected:
77  virtual void paintEvent(QPaintEvent *event);
78 
84  virtual bool eventFilter(QObject *target, QEvent *event);
85 
86 private slots:
89  void handleOnClickedAddMusic();
90 
93  void handleSearchMusic();
94 
97  void handleLineEditFocus();
98 
101  void handleBackMusicList();
102 
103 private:
106  void createUI();
107 
110  void createConnect();
111 
112 private:
113  QWidget *m_parent;
114  MusicList *m_playList;
115  QTimer *m_editFocusTimer;
116  QMap<QString, int> *m_mapMusicRows;
118  QLineEdit *m_searchLineEdit;
119  QPushButton *m_searchButton;
120  QPushButton *m_addMusicButton;
121  QPushButton *m_localeButton;
122  QPushButton *m_delMusicButton;
123  QPushButton *m_findButton;
124  QPushButton *m_backButton;
125  QMenu *m_addMusicMenu;
126 };
127 
128 #endif // MUSICLISTWIDGET_H
~MusicListWidget()
Definition: MusicListWidget.cpp:74
virtual void paintEvent(QPaintEvent *event)
Definition: MusicListWidget.cpp:129
virtual bool eventFilter(QObject *target, QEvent *event)
Definition: MusicListWidget.cpp:140
Definition: MusicList.h:55
MusicListWidget(MusicList *playList, QMap< QString, int > *mapMusicRows, QWidget *parent=NULL)
Definition: MusicListWidget.cpp:62
Definition: MusicListWidget.h:56

================================================ FILE: doc/_music_lrc_8cpp.html ================================================ CZPlayer: MusicLrc.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicLrc.cpp 文件参考

歌词界面实现文件。 更多...

#include "MusicLrc.h"
#include "TR.h"
#include "GlobalConfig.h"
#include "Global.h"
#include <QApplication>
#include <QMenu>
#include <QIcon>
#include <QDesktopWidget>
#include <QMessagebox>
#include <QPaintEvent>
#include <QMouseEvent>
#include <QContextMenuEvent>
#include <QTimer>

详细描述

歌词界面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

================================================ FILE: doc/_music_lrc_8h.html ================================================ CZPlayer: MusicLrc.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicLrc.h 文件参考

歌词界面头文件。 更多...

#include <QString>
#include <QPoint>
#include <QPainter>
#include <QLinearGradient>
#include <QFont>
#include <QLabel>

浏览源代码.

class  MusicLrc
 

宏定义

#define MUSICLRC_VERSION   0x030000
 

详细描述

歌词界面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

宏定义说明

#define MUSICLRC_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_music_lrc_8h_source.html ================================================ CZPlayer: MusicLrc.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicLrc.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef MUSICLRC_H
38 #define MUSICLRC_H
39 
43 #define MUSICLRC_VERSION 0x030000
44 
45 #include <QString>
46 #include <QPoint>
47 #include <QPainter>
48 #include <QLinearGradient>
49 #include <QFont>
50 #include <QLabel>
51 
52 class QTimer;
53 class QPaintEvent;
54 class QMouseEvent;
55 class QContextMenuEvent;
56 
59 class MusicLrc : public QLabel
60 {
61  Q_OBJECT
62 
63 public:
67  MusicLrc(QWidget *parent = NULL);
68 
70  ~MusicLrc();
71 
72 public:
76  void startLrcMask(qint64 intervalTime);
77 
80  void stopLrcMask();
81 
84  void unlockLrc();
85 
86 
87 protected:
91  virtual void paintEvent(QPaintEvent *event);
92 
96  virtual void mousePressEvent(QMouseEvent *event);
97 
101  virtual void mouseMoveEvent(QMouseEvent *event);
102 
106  virtual void contextMenuEvent(QContextMenuEvent *event);
107 
108 signals:
111  void sigLrcLocked();
112 
115  void sigLrcUnlocked();
116 
119  void sigHideLrc();
120 
121 private slots:
124  void handleTimeOut();
125 
128  void handleLockLrc();
129 
133  void handleFontNameChanged(const QString &fontName);
134 
138  void handleFontSizeChanged(const QString &fontSize);
139 
143  void handleFontTypeChanged(const QString &fontType);
144 
148  void handleNoPlayShangChanged(const QColor &color);
149 
153  void handleNoPlayZhongChanged(const QColor &color);
154 
158  void handleNoPlayXiaChanged(const QColor &color);
159 
163  void handlePlayedShangChanged(const QColor &color);
164 
168  void handlePlayedZhongChanged(const QColor &color);
169 
173  void handlePlayedXiaChanged(const QColor &color);
174 
178  void handleShadowChanged(const int &shadow);
179 
180 private:
183  void createUI();
184 
187  void createConnect();
188 
189 private:
190  QTimer *m_timer;
191  qreal m_lrcMaskWidth;
192  qreal m_lrcMaskWidthInterval;
193  QPoint m_dragPosition;
194  bool m_isLrcLock;
196  QLinearGradient m_linearGradient;
197  QLinearGradient m_maskLinearGradient;
198  QFont m_font;
199  int m_shadow;
200 };
201 
202 #endif // MUSICLRC_H
203 
204 
205 
206 
207 
208 
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229 
230 
231 
232 
233 
234 
235 
236 
~MusicLrc()
Definition: MusicLrc.cpp:80
virtual void mouseMoveEvent(QMouseEvent *event)
Definition: MusicLrc.cpp:184
virtual void paintEvent(QPaintEvent *event)
Definition: MusicLrc.cpp:151
virtual void contextMenuEvent(QContextMenuEvent *event)
Definition: MusicLrc.cpp:199
void sigHideLrc()
void startLrcMask(qint64 intervalTime)
Definition: MusicLrc.cpp:132
void unlockLrc()
Definition: MusicLrc.cpp:218
MusicLrc(QWidget *parent=NULL)
Definition: MusicLrc.cpp:69
Definition: MusicLrc.h:59
virtual void mousePressEvent(QMouseEvent *event)
Definition: MusicLrc.cpp:170
void sigLrcUnlocked()
void stopLrcMask()
Definition: MusicLrc.cpp:144
void sigLrcLocked()

================================================ FILE: doc/_no_focus_delegate_8h_source.html ================================================ CZPlayer: NoFocusDelegate.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
NoFocusDelegate.h
1 #ifndef NOFOCUSDELEGATE_H
2 #define NOFOCUSDELEGATE_H
3 
4 #include <QStyledItemDelegate>
5 #include <QModelIndex>
6 #include <QPainter>
7 
8 class NoFocusDelegate : public QStyledItemDelegate
9 {
10  Q_OBJECT
11 
12 public:
13  NoFocusDelegate(QStyledItemDelegate *parent = 0);
14  ~NoFocusDelegate();
15 
16 protected:
17  void paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex &index) const
18  {
19  QStyleOptionViewItem itemOption(option);
20  if (itemOption.state & QStyle::State_HasFocus)
21  {
22  itemOption.state = itemOption.state ^ QStyle::State_HasFocus;
23  }
24 
25  QStyledItemDelegate::paint(painter, itemOption, index);
26  }
27 
28 private:
29  QStyledItemDelegate *m_parent;
30 };
31 
32 #endif // NOFOCUSDELEGATE_H
Definition: NoFocusDelegate.h:8

================================================ FILE: doc/_radio_panel_8cpp.html ================================================ CZPlayer: RadioPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RadioPanel.cpp 文件参考

电台面板实现文件。 更多...

#include "RadioPanel.h"
#include "TR.h"
#include <QLabel>
#include <QVBoxLayout>

详细描述

电台面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_radio_panel_8h.html ================================================ CZPlayer: RadioPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RadioPanel.h 文件参考

电台面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  RadioPanel
 

宏定义

#define RADIOPANEL_VERSION   0x030000
 

详细描述

电台面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define RADIOPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_radio_panel_8h_source.html ================================================ CZPlayer: RadioPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RadioPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef RADIOPANEL_H
38 #define RADIOPANEL_H
39 
43 #define RADIOPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class RadioPanel : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  RadioPanel(QWidget *parent = NULL);
60 
62  ~RadioPanel();
63 
64 private:
67  void createUI();
68 
71  void createConnect();
72 
73 private:
74  QLabel *m_tipLabel;
75 };
76 
77 #endif // RADIOPANEL_H
RadioPanel(QWidget *parent=NULL)
Definition: RadioPanel.cpp:49
~RadioPanel()
Definition: RadioPanel.cpp:56
Definition: RadioPanel.h:51

================================================ FILE: doc/_ranking_panel_8cpp.html ================================================ CZPlayer: RankingPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RankingPanel.cpp 文件参考

榜单面板实现文件。 更多...

#include "RankingPanel.h"
#include "TR.h"
#include <QLabel>
#include <QVBoxLayout>

详细描述

榜单面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_ranking_panel_8h.html ================================================ CZPlayer: RankingPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RankingPanel.h 文件参考

榜单面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  RankingPanel
 

宏定义

#define RANKINGPANEL_VERSION   0x030000
 

详细描述

榜单面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define RANKINGPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_ranking_panel_8h_source.html ================================================ CZPlayer: RankingPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RankingPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef RANKINGPANEL_H
38 #define RANKINGPANEL_H
39 
43 #define RANKINGPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class RankingPanel : public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  RankingPanel(QWidget *parent = NULL);
60 
62  ~RankingPanel();
63 
64 private:
67  void createUI();
68 
71  void createConnect();
72 
73 private:
74  QLabel *m_tipLabel;
75 };
76 
77 #endif // RANKINGPANEL_H
~RankingPanel()
Definition: RankingPanel.cpp:56
RankingPanel(QWidget *parent=NULL)
Definition: RankingPanel.cpp:49
Definition: RankingPanel.h:51

================================================ FILE: doc/_search_panel_8cpp.html ================================================ CZPlayer: SearchPanel.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SearchPanel.cpp 文件参考

搜索面板实现文件。 更多...

#include "SearchPanel.h"
#include "NoFocusDelegate.h"
#include "Global.h"
#include "TR.h"
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QCheckBox>
#include <QTableWidget>
#include <QHeaderView>
#include <QTableWidgetItem>

详细描述

搜索面板实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

================================================ FILE: doc/_search_panel_8h.html ================================================ CZPlayer: SearchPanel.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SearchPanel.h 文件参考

搜索面板头文件。 更多...

#include <QWidget>

浏览源代码.

class  SearchPanel
 

宏定义

#define SEARCHPANEL_VERSION   0x030000
 

详细描述

搜索面板头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-23
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-23    by chengxuan
*
* 

宏定义说明

#define SEARCHPANEL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_search_panel_8h_source.html ================================================ CZPlayer: SearchPanel.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SearchPanel.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef SEARCHPANEL_H
38 #define SEARCHPANEL_H
39 
43 #define SEARCHPANEL_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 class QLineEdit;
49 class QPushButton;
50 class QCheckBox;
51 class QTableWidget;
52 
55 class SearchPanel : public QWidget
56 {
57  Q_OBJECT
58 
59 public:
63  SearchPanel(QWidget *parent = NULL);
64 
66  ~SearchPanel();
67 
68 private slots:
71  void handleDownloadMusic();
72 
75  void handleCollectMusic();
76 
77 private:
80  void createUI();
81 
84  void createConnect();
85 
88  void setTableWidgetStyle();
89 
90 private:
91  QLineEdit *m_searchEdit;
92  QPushButton *m_searchButton;
93  QLabel *m_searchInfoLabel;
94  QCheckBox *m_allChecked;
95  QPushButton *m_downloadButton;
96  QPushButton *m_collectButton;
97  QTableWidget *m_searchTable;
98 };
99 
100 #endif // SEARCHPANEL_H
SearchPanel(QWidget *parent=NULL)
Definition: SearchPanel.cpp:64
~SearchPanel()
Definition: SearchPanel.cpp:71
Definition: SearchPanel.h:55

================================================ FILE: doc/_shared_dialog_8cpp.html ================================================ CZPlayer: SharedDialog.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SharedDialog.cpp 文件参考

歌曲分享对话框实现文件。 更多...

#include "SharedDialog.h"
#include "Global.h"
#include "TR.h"
#include <QLabel>
#include <QTextEdit>
#include <QCheckBox>
#include <QPushButton>
#include <QMessageBox>
#include <QDesktopServices>
#include <QUrl>

详细描述

歌曲分享对话框实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-06    by chengxuan
*
* 

================================================ FILE: doc/_shared_dialog_8h.html ================================================ CZPlayer: SharedDialog.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SharedDialog.h 文件参考

歌曲分享对话框头文件。 更多...

#include <QDialog>
#include <QString>

浏览源代码.

class  SharedDialog
 

宏定义

#define SHAREDDIALOG_VERSION   0x030000
 

详细描述

歌曲分享对话框头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-06    by chengxuan
*
* 

宏定义说明

#define SHAREDDIALOG_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_shared_dialog_8h_source.html ================================================ CZPlayer: SharedDialog.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SharedDialog.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef SHAREDDIALOG_H
38 #define SHAREDDIALOG_H
39 
43 #define SHAREDDIALOG_VERSION 0x030000
44 
45 #include <QDialog>
46 #include <QString>
47 
48 class QLabel;
49 class QTextEdit;
50 class QCheckBox;
51 class QPushButton;
52 
55 class SharedDialog : public QDialog
56 {
57  Q_OBJECT
58 
59 public:
63  SharedDialog(QWidget *parent = NULL);
64 
66  ~SharedDialog(void);
67 
68 public:
74  void init(const QString &albumImagePath,
75  const QString &musicName,
76  const QString &albumUrlPath);
77 
78 private slots:
82  void handleCheckBoxStateChanged(int state);
83 
86  void handleSharedMusic();
87 
88 private:
89  QString m_albumUrlPath;
90  QString m_musicName;
92  QLabel *m_albumLabel;
93  QTextEdit *m_textEdit;
94  QLabel *m_sharedLabel;
96  QCheckBox *m_xinlangweiboCheckBox;
97  QLabel *m_xinlangweiboLabel;
99  QCheckBox *m_tengxunweiboCheckBox;
100  QLabel *m_tengxunweiboLabel;
102  QCheckBox *m_qqkongjianCheckBox;
103  QLabel *m_qqkongjianLabel;
105  QCheckBox *m_renrenCheckBox;
106  QLabel *m_renrenLabel;
108  QCheckBox *m_kaixinCheckBox;
109  QLabel *m_kaixinLabel;
111  QCheckBox *m_doubanCheckBox;
112  QLabel *m_doubanLabel;
114  QCheckBox *m_souhuweiboCheckBox;
115  QLabel *m_souhuweiboLabel;
117  QCheckBox *m_qqhaoyouCheckBox;
118  QLabel *m_qqhaoyouLabel;
120  QPushButton *m_shareButton;
121  QPushButton *m_cancelButton;
123 private:
127  void openBrowser(const QString &url);
128 
131  void createUI();
132 
135  void createConnect();
136 };
137 
138 #endif //SHAREDDIALOG_H
139 
SharedDialog(QWidget *parent=NULL)
Definition: SharedDialog.cpp:62
void init(const QString &albumImagePath, const QString &musicName, const QString &albumUrlPath)
Definition: SharedDialog.cpp:74
~SharedDialog(void)
Definition: SharedDialog.cpp:69
Definition: SharedDialog.h:55

================================================ FILE: doc/_sound_control_8cpp.html ================================================ CZPlayer: SoundControl.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SoundControl.cpp 文件参考

音量控制类实现文件。 更多...

#include <Windows.h>
#include <mmreg.h>
#include <mmsystem.h>
#include "SoundControl.h"

详细描述

音量控制类实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-06    by chengxuan
*
* 

================================================ FILE: doc/_sound_control_8h.html ================================================ CZPlayer: SoundControl.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SoundControl.h 文件参考

音量控制类头文件。 更多...

浏览源代码.

class  SoundControl
 

宏定义

#define SOUNDCONTROL_VERSION   0x030000
 

详细描述

音量控制类头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-06
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-06    by chengxuan
*
* 

宏定义说明

#define SOUNDCONTROL_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_sound_control_8h_source.html ================================================ CZPlayer: SoundControl.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SoundControl.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef SOUNDCONTROL_H
38 #define SOUNDCONTROL_H
39 
43 #define SOUNDCONTROL_VERSION 0x030000
44 
48 {
49 public:
55  static bool setVolume(long volume, long device = 0);
56 
61  static unsigned getVolume(int dev);
62 
63 private:
65  SoundControl();
66 
68  ~SoundControl();
69 
77  static bool getVolumeControl(HMIXER hmixer , long componentType, long ctrlType, MIXERCONTROL *mxc);
78 
84  static unsigned getVolumeValue(HMIXER hmixer, MIXERCONTROL *mxc);
85 
92  static bool setVolumeValue(HMIXER hmixer, MIXERCONTROL *mxc, long volume);
93 };
94 
95 #endif
Definition: SoundControl.h:47
static unsigned getVolume(int dev)
Definition: SoundControl.cpp:52
static bool setVolume(long volume, long device=0)
Definition: SoundControl.cpp:96

================================================ FILE: doc/_spectro_graph_8cpp.html ================================================ CZPlayer: SpectroGraph.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SpectroGraph.cpp 文件参考

频谱绘制实现文件。 更多...

#include "spectrograph.h"
#include <QPaintEvent>
#include <QPainter>
#include <QColor>
#include <QBitmap>

详细描述

频谱绘制实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-03
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-03    by chengxuan
*
* 

================================================ FILE: doc/_spectro_graph_8h.html ================================================ CZPlayer: SpectroGraph.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SpectroGraph.h 文件参考

频谱绘制头文件。 更多...

#include <QLabel>
#include <QString>
#include <vector>

浏览源代码.

class  Spectrograph
 

宏定义

#define SPECTROGRAPH_VERSION   0x030000
 

详细描述

频谱绘制头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-02-03
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-02-03    by chengxuan
*
* 

宏定义说明

#define SPECTROGRAPH_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_spectro_graph_8h_source.html ================================================ CZPlayer: SpectroGraph.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SpectroGraph.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef SPECTROGRAPH_H
38 #define SPECTROGRAPH_H
39 
43 #define SPECTROGRAPH_VERSION 0x030000
44 
45 #include <QLabel>
46 #include <QString>
47 #include <vector>
48 using namespace std;
49 
50 class QPaintEvent;
51 
52 QT_FORWARD_DECLARE_CLASS(QMouseEvent)
53 
54 
56 class Spectrograph : public QLabel
57 {
58  Q_OBJECT
59 
60 public:
64  Spectrograph(QWidget *parent = NULL);
65 
67  ~Spectrograph();
68 
69 public:
74  void setParams(const double &lowFreq, const double &highFreq);
75 
78  void reset();
79 
80 protected:
84  virtual void paintEvent(QPaintEvent *event);
85 
86 public slots:
90  void handleSpectrumChanged(const vector<float> &vecFrequency);
91 
92 private:
93  double m_lowFreq;
94  double m_highFreq;
95  vector<float> m_vecFrequency;
96 };
97 
98 #endif // SPECTROGRAPH_H
Definition: SpectroGraph.h:56

================================================ FILE: doc/_status_define_8h.html ================================================ CZPlayer: StatusDefine.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
StatusDefine.h 文件参考

状态代码定义头文件。 更多...

浏览源代码.

宏定义

#define STATUSDEFINE_VERSION   0x000100
 

枚举

enum  AlbumDownloadStatus { AlbumDownloadFailed = 1, AlbumDownloadSuccess = 2 }
 
enum  LrcDownloadStatus { LrcDownloadFailed = 1, LrcDownloadSuccess = 2 }
 

详细描述

状态代码定义头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-25
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-25    by chengxuan
*
* 

宏定义说明

#define STATUSDEFINE_VERSION   0x000100

版本控制宏,对应v0.1.0版本.

枚举类型说明

专辑下载状态

枚举值
AlbumDownloadFailed 

专辑下载失败

AlbumDownloadSuccess 

专辑下载成功

歌词下载状态

枚举值
LrcDownloadFailed 

歌词下载失败

LrcDownloadSuccess 

歌词下载成功


================================================ FILE: doc/_status_define_8h_source.html ================================================ CZPlayer: StatusDefine.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
StatusDefine.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef STATUSDEFINE_H
38 #define STATUSDEFINE_H
39 
43 #define STATUSDEFINE_VERSION 0x000100
44 
47 {
50 };
51 
54 {
57 };
58 
59 #endif // STATUSDEFINE_H
Definition: StatusDefine.h:55
LrcDownloadStatus
Definition: StatusDefine.h:53
Definition: StatusDefine.h:56
Definition: StatusDefine.h:49
AlbumDownloadStatus
Definition: StatusDefine.h:46
Definition: StatusDefine.h:48

================================================ FILE: doc/_stream_8h_source.html ================================================ CZPlayer: Stream.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Stream.h
1 #pragma once
2 
3 #include <stdlib.h>
4 #include <windows.h>
5 
6 #ifndef INCLUDE_CSTREAM
7 #define INCLUDE_CSTREAM
8 
9 #pragma warning(disable : 4006)
10 #pragma warning(disable : 4995)
11 
12 /************************************************************************/
13 /* CStream */
14 /************************************************************************/
15 class CStream
16 {
17 public:
18  CStream(void) {}
19  ~CStream(void) {}
20 
21 public:
22  virtual DWORD Read(void* buf, DWORD size) = 0; //读取流
23  virtual DWORD Write(void* buf, DWORD size) = 0; //写入流
24  virtual DWORD Seek(int offset, WORD origin) = 0; //定位流
25 
26  INT64 GetPosition(void); //获得位置
27  void SetPosition(INT64 position); //设置位置
28 
29  virtual INT64 GetSize(void); //获得流大小
30  virtual void SetSize(const INT64 size); //设置流大小
31  virtual void SetSize(DWORD size); //设置流大小
32 };
33 
34 /************************************************************************/
35 /* CHandleStream:处理流 */
36 /************************************************************************/
37 class CHandleStream : public CStream
38 {
39 public:
40  CHandleStream(void) : m_handle(0) {}
41  ~CHandleStream(void) {}
42 
43 public:
44  DWORD Read(void* buf, DWORD size);
45  DWORD Write(void* buf, DWORD size);
46  DWORD Seek(int offset, WORD origin);
47  HANDLE GetHandle() { return m_handle; }
48 
49 protected:
50  HANDLE m_handle;
51 
52 protected:
53  void SetSize(const INT64 size);
54  void SetSize(int size);
55 };
56 
57 /************************************************************************/
58 /* CCustomMemoryStream:自定义内存流 */
59 /************************************************************************/
61 {
62 public:
63  CCustomMemoryStream(void);
64  ~CCustomMemoryStream(void);
65 
66 public:
67  DWORD Read(void* buf, DWORD size);
68  DWORD Seek(int offset, WORD origin);
69  void SaveToStream(CStream* pStream);
70  void SaveToFile(TCHAR* pszFileName);
71 
72 protected:
73  void* m_Memory;
74  DWORD m_Size;
75  DWORD m_Position;
76 
77 protected:
78  void SetPointer(void* Ptr, DWORD Size);
79 };
80 
81 /************************************************************************/
82 /* CMemoryStream:内存流 */
83 /************************************************************************/
85 {
86 public:
87  CMemoryStream(void);
88  ~CMemoryStream(void);
89 
90 public:
91  void Clear();
92  void LoadFromStream(CStream* pStream);
93  void LoadFromFile(TCHAR* pszFileName);
94  void SetSize(DWORD NewSize);
95  DWORD Write(void* buf, DWORD size);
96  void SetCapacity(DWORD NewCapacity);
97 
98 private:
99  DWORD m_Capacity;
100 
101 protected:
102  void* Realloc(DWORD NewCapacity);
103 };
104 
105 /************************************************************************/
106 /* CFileStream:文件流 */
107 /************************************************************************/
108 typedef enum _FILE_MODE
109 {
110  FILE_OPEN = 0,
111  FILE_CREATE = 1
112 } FILE_MODE;
114 {
115 public:
116  CFileStream(TCHAR* pszFileName, FILE_MODE mode, DWORD rights = 0);
117  ~CFileStream(void);
118 };
119 
120 /************************************************************************/
121 /* CWaveConverter:波转换器 */
122 /************************************************************************/
123 typedef struct _RiffHeader
124 {
125  char ID[4];
126  DWORD BytesFollowing;
128 
129 typedef struct _ACMWaveFormat
130 {
131  union
132  {
133  WAVEFORMATEX format;
134  BYTE RawData[128];
135  };
137 
139 {
140 private:
141  DWORD m_MaxFmtSize;
142 public:
143  CWaveConverter(void);
144  ~CWaveConverter(void);
145 
146  ACMWaveFormat CurrentFormat;
147  ACMWaveFormat NewFormat;
148  int LoadStream(CStream* pStream);
149  int Convert();
150  int SaveWavToStream(CStream* pStream);
151 };
152 
153 #endif
Definition: Stream.h:15
Definition: Stream.h:60
Definition: Stream.h:37
Definition: Stream.h:138
Definition: Stream.h:113
Definition: Stream.h:84
Definition: Stream.h:129
Definition: Stream.h:123

================================================ FILE: doc/_t_r_8h.html ================================================ CZPlayer: TR.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
TR.h 文件参考

转码文件。 更多...

#include <QTextCodec>
#include <QString>
#include <QByteArray>

浏览源代码.

宏定义

#define TR_VERSION   0x030000
 

详细描述

转码文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-22    by chengxuan
*
* 

宏定义说明

#define TR_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_t_r_8h_source.html ================================================ CZPlayer: TR.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
TR.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef TR_H
38 #define TR_H
39 
43 #define TR_VERSION 0x030000
44 
45 #include <QTextCodec>
46 #include <QString>
47 #include <QByteArray>
48 
53 inline static QString TR(const char *chars)
54 {
55  static QTextCodec *codec = QTextCodec::codecForName("GBK");
56  return codec->toUnicode(chars);
57 }
58 
63 inline static QString TR(const QByteArray &chars)
64 {
65  static QTextCodec *codec = QTextCodec::codecForName("GBK");
66  return codec->toUnicode(chars);
67 }
68 
69 #endif //TR_H

================================================ FILE: doc/_thanks_page_8cpp.html ================================================ CZPlayer: ThanksPage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ThanksPage.cpp 文件参考

感谢页面实现文件。 更多...

#include "ThanksPage.h"
#include "TR.h"
#include <QVBoxLayout>
#include <QLabel>

详细描述

感谢页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

================================================ FILE: doc/_thanks_page_8h.html ================================================ CZPlayer: ThanksPage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ThanksPage.h 文件参考

感谢页面头文件。 更多...

#include <QWidget>

浏览源代码.

class  ThanksPage
 

宏定义

#define THANKSPAGE_VERSION   0x030000
 

详细描述

感谢页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-22
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-22    by chengxuan
*
* 

宏定义说明

#define THANKSPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_thanks_page_8h_source.html ================================================ CZPlayer: ThanksPage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ThanksPage.h
浏览该文件的文档.
1 /***************************************************************************
2  * Copyright (C) 2012-2015 Highway-9 Studio. *
3  * 787280310@qq.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * CUIT Highway-9 Studio, China. *
19  ***************************************************************************/
20 
37 #ifndef THANKSPAGE_H
38 #define THANKSPAGE_H
39 
43 #define THANKSPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 
51 class ThanksPage: public QWidget
52 {
53  Q_OBJECT
54 
55 public:
59  ThanksPage(QWidget *parent = NULL);
60 
62  ~ThanksPage(void);
63 
64  QLabel *m_thanksLabel;
65 };
66 
67 #endif //THANKSPAGE_H
68 
~ThanksPage(void)
Definition: ThanksPage.cpp:63
QLabel * m_thanksLabel
Definition: ThanksPage.h:64
ThanksPage(QWidget *parent=NULL)
Definition: ThanksPage.cpp:49
Definition: ThanksPage.h:51

================================================ FILE: doc/_thread_8h_source.html ================================================ CZPlayer: Thread.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Thread.h
1 #ifndef INCLUDE_THREAD
2 #define INCLUDE_THREAD
3 
4 /************************************************************************/
5 /* CThread */
6 /************************************************************************/
7 class CThread
8 {
9 private:
10  HANDLE m_hThread;
11  DWORD m_dwThreadId;
12  bool m_Suspended;
13 
14  static DWORD CALLBACK ThreadProc(LPVOID lpParameter)
15  {
16  CThread* pThread = (CThread*)lpParameter;
17  if(pThread == NULL)
18  {
19  return 0;
20  }
21 
22  pThread->Execute();
23  return 0;
24  }
25 
26 protected:
27  bool m_Stop;
28  virtual void Execute() = 0; /* this pure virtual function should be implemented by child class
29  which inherited from this class
30  */
31 public:
32  CThread(bool pCreateSuspened = true) : m_hThread(NULL), m_dwThreadId(0), m_Stop(false), m_Suspended(false)
33  {
34  m_hThread = CreateThread(NULL, 0, ThreadProc, (void*)this,
35  (pCreateSuspened == true) ? CREATE_SUSPENDED : 0, &m_dwThreadId);
36  m_Suspended = true;
37  }
38 
39  ~CThread()
40  {
41  if(m_hThread != NULL)
42  {
43  CloseHandle(m_hThread);
44  }
45  }
46 
47  //恢复该线程
48  void Resume()
49  {
50  if(m_hThread != NULL && m_Suspended == true && !m_Stop)
51  {
52  ResumeThread(m_hThread);
53  m_Suspended = false;
54  }
55  }
56 
57  //暂停该线程
58  void Suspend()
59  {
60  if(m_hThread != NULL && m_Suspended == false && !m_Stop)
61  {
62  SuspendThread(m_hThread);
63  m_Suspended = true;
64  }
65  }
66 
67  //判断是否是暂停状态
68  bool Suspended()
69  {
70  return m_Suspended;
71  }
72 
73  //停止该线程
74  void Stop()
75  {
76  m_Stop = true;
77  if(!Suspended())
78  {
79  Suspend();
80  }
81  }
82 
83  //等待线程回收资源
84  void wait()
85  {
86  WaitForSingleObject(m_hThread, INFINITE);
87  }
88 };
89 
90 #endif
Definition: Thread.h:7

================================================ FILE: doc/_update_page_8cpp.html ================================================ CZPlayer: UpdatePage.cpp 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
UpdatePage.cpp 文件参考

软件更新页面实现文件。 更多...

#include "UpdatePage.h"
#include "TR.h"
#include <QLabel>
#include <QPushButton>
#include <QGroupBox>
#include <QHBoxLayout>

详细描述

软件更新页面实现文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

================================================ FILE: doc/_update_page_8h.html ================================================ CZPlayer: UpdatePage.h 文件参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
UpdatePage.h 文件参考

软件更新页面头文件。 更多...

#include <QWidget>

浏览源代码.

class  UpdatePage
 

宏定义

#define UPDATEPAGE_VERSION   0x030000
 

详细描述

软件更新页面头文件。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2015-01-24
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2015-01-24    by chengxuan
*
* 

宏定义说明

#define UPDATEPAGE_VERSION   0x030000

版本控制宏,对应v3.0.0版本.


================================================ FILE: doc/_update_page_8h_source.html ================================================ CZPlayer: UpdatePage.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
UpdatePage.h
浏览该文件的文档.
1 /***************************************************************************
2 * Copyright (C) 2012-2015 Highway-9 Studio. *
3 * 787280310@qq.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * CUIT Highway-9 Studio, China. *
19 ***************************************************************************/
20 
37 #ifndef UPDATEPAGE_H
38 #define UPDATEPAGE_H
39 
43 #define UPDATEPAGE_VERSION 0x030000
44 
45 #include <QWidget>
46 
47 class QLabel;
48 class QPushButton;
49 
52 class UpdatePage : public QWidget
53 {
54  Q_OBJECT
55 
56 public:
60  UpdatePage(QWidget *parent = NULL);
61 
63  ~UpdatePage(void);
64 
65 private slots:
68  void handleUpdate();
69 
70 private:
73  void createUI();
74 
77  void createConnect();
78 
79 private:
80  QLabel *m_updateInfoLabel;
81  QPushButton *m_updateButton;
82 };
83 
84 #endif //UPDATEPAGE_H
85 
Definition: UpdatePage.h:52
~UpdatePage(void)
Definition: UpdatePage.cpp:61
UpdatePage(QWidget *parent=NULL)
Definition: UpdatePage.cpp:54

================================================ FILE: doc/_utils_8h_source.html ================================================ CZPlayer: Utils.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Utils.h
1 #ifndef UTILS_H
2 #define UTILS_H
3 
4 #include <tchar.h>
5 #include <windows.h>
6 #include <dsound.h>
7 #include <strsafe.h>
8 
9 #define USE_DAUDIO TRUE
10 #define USE_ERROR
11 #define USE_TRACE
12 
13 #define DAUDIO_PCM 0
14 #define DAUDIO_ULAW 1
15 #define DAUDIO_ALAW 2
16 
17 typedef unsigned char UBYTE;
18 typedef char SBYTE;
19 
20 #define DAUDIO_STRING_LENGTH 200
21 
22 #if 0
23 typedef struct tag_DirectAudioDeviceDescription {
24  // optional deviceID (complementary to deviceIndex)
25  signed int deviceID;
26  signed int maxSimulLines;
27  TCHAR name[DAUDIO_STRING_LENGTH+1];
28  TCHAR vendor[DAUDIO_STRING_LENGTH+1];
29  TCHAR description[DAUDIO_STRING_LENGTH+1];
30  TCHAR version[DAUDIO_STRING_LENGTH+1];
32 #else
34  // optional deviceID (complementary to deviceIndex)
35  signed int deviceID;
36  signed int maxSimulLines;
37  WCHAR name[DAUDIO_STRING_LENGTH+1];
38  WCHAR vendor[DAUDIO_STRING_LENGTH+1];
39  WCHAR description[DAUDIO_STRING_LENGTH+1];
40  WCHAR version[DAUDIO_STRING_LENGTH+1];
42 #endif
43 
44 typedef struct {
45  signed int mixerIndex;
46  bool isSource;
47  /* either LPDIRECTSOUND8 or LPDIRECTSOUNDCAPTURE8 */
48  void* dev;
49  /* how many instances use the dev */
50  signed int refCount;
51  GUID guid;
53 
54 typedef struct {
55  signed int currMixerIndex;
56  bool isSource;
58 
59 typedef struct {
60  int deviceID;
61  /* for convenience */
62  bool isSource;
63  /* the secondary buffer (Playback) */
64  LPDIRECTSOUNDBUFFER8 playBuffer;
65  /* the secondary buffer (Capture) */
66  LPDIRECTSOUNDCAPTUREBUFFER8 captureBuffer;
67 
68  /* size of the directsound buffer, usually 2 seconds */
69  int dsBufferSizeInBytes;
70 
71  /* size of the read/write-ahead, as specified by Java */
72  int bufferSizeInBytes;
73  int bitsPerSample;
74  int frameSize; // storage size in Bytes
75 
76  unsigned long long framePos;
77  /* where to write into the buffer.
78  * -1 if at current position (Playback)
79  * For Capture, this is the read position
80  */
81  int writePos;
82 
83  /* if start() had been called */
84  bool started;
85 
86  /* how many bytes there is silence from current write position */
87  int silencedBytes;
88 
89  bool underrun;
90 
91 } DS_Info;
92 
93 #ifndef _WAVEFORMATEXTENSIBLE_
94 #define _WAVEFORMATEXTENSIBLE_
95 typedef struct {
96  WAVEFORMATEX Format;
97  union {
98  WORD wValidBitsPerSample; /* bits of precision */
99  WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */
100  WORD wReserved; /* If neither applies, set to zero. */
101  } Samples;
102  DWORD dwChannelMask; /* which channels are */
103  /* present in stream */
104  GUID SubFormat;
106 #endif // !_WAVEFORMATEXTENSIBLE_
107 
108 #if !defined(WAVE_FORMAT_EXTENSIBLE)
109 #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
110 #endif // !defined(WAVE_FORMAT_EXTENSIBLE)
111 
112 #if !defined(DEFINE_WAVEFORMATEX_GUID)
113 #define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
114 #endif
115 #ifndef STATIC_KSDATAFORMAT_SUBTYPE_PCM
116 #define STATIC_KSDATAFORMAT_SUBTYPE_PCM\
117  DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)
118 #endif
119 
120 #ifdef USE_ERROR
121 #define ERROR0(string) fprintf(stdout, (string)); fflush(stdout);
122 #define ERROR1(string, p1) fprintf(stdout, (string), (p1)); fflush(stdout);
123 #define ERROR2(string, p1, p2) fprintf(stdout, (string), (p1), (p2)); fflush(stdout);
124 #define ERROR3(string, p1, p2, p3) fprintf(stdout, (string), (p1), (p2), (p3)); fflush(stdout);
125 #define ERROR4(string, p1, p2, p3, p4) fprintf(stdout, (string), (p1), (p2), (p3), (p4)); fflush(stdout);
126 #else
127 #define ERROR0(string)
128 #define ERROR1(string, p1)
129 #define ERROR2(string, p1, p2)
130 #define ERROR3(string, p1, p2, p3)
131 #define ERROR4(string, p1, p2, p3, p4)
132 #endif
133 
134 
135 // TRACE PRINTS
136 #ifdef USE_TRACE
137 #define TRACE0(string) fprintf(stdout, (string)); fflush(stdout);
138 #define TRACE1(string, p1) fprintf(stdout, (string), (p1)); fflush(stdout);
139 #define TRACE2(string, p1, p2) fprintf(stdout, (string), (p1), (p2)); fflush(stdout);
140 #define TRACE3(string, p1, p2, p3) fprintf(stdout, (string), (p1), (p2), (p3)); fflush(stdout);
141 #define TRACE4(string, p1, p2, p3, p4) fprintf(stdout, (string), (p1), (p2), (p3), (p4)); fflush(stdout);
142 #define TRACE5(string, p1, p2, p3, p4, p5) fprintf(stdout, (string), (p1), (p2), (p3), (p4), (p5)); fflush(stdout);
143 #else
144 #define TRACE0(string)
145 #define TRACE1(string, p1)
146 #define TRACE2(string, p1, p2)
147 #define TRACE3(string, p1, p2, p3)
148 #define TRACE4(string, p1, p2, p3, p4)
149 #define TRACE5(string, p1, p2, p3, p4, p5)
150 #endif
151 
152 
153 // VERBOSE TRACE PRINTS
154 #ifdef USE_VERBOSE_TRACE
155 #define VTRACE0(string) fprintf(stdout, (string));
156 #define VTRACE1(string, p1) fprintf(stdout, (string), (p1));
157 #define VTRACE2(string, p1, p2) printf(stdout, (string), (p1), (p2));
158 #define VTRACE3(string, p1, p2, p3) fprintf(stdout, (string), (p1), (p2), (p3));
159 #define VTRACE4(string, p1, p2, p3, p4) fprintf(stdout, (string), (p1), (p2), (p3), (p4));
160 #else
161 #define VTRACE0(string)
162 #define VTRACE1(string, p1)
163 #define VTRACE2(string, p1, p2)
164 #define VTRACE3(string, p1, p2, p3)
165 #define VTRACE4(string, p1, p2, p3, p4)
166 #endif
167 
168 //#if (USE_DAUDIO == TRUE)
169 // callback from GetFormats, implemented in DirectAudioDevice.c
170 void DAUDIO_AddAudioFormat(void* creator, int significantBits, int frameSizeInBytes,
171  int channels, float sampleRate,
172  int encoding, int isSigned,
173  int bigEndian);
174 
175 
176 // the following methods need to be implemented by the platform dependent code
177 
178 /* returns the number of mixer devices */
179 signed int DAUDIO_GetDirectAudioDeviceCount();
180 
181 /* returns true on success, false otherwise */
182 signed int DAUDIO_GetDirectAudioDeviceDescription(signed int mixerIndex,
183  DirectAudioDeviceDescription* description);
184 
185 // SourceDataLine and TargetDataLine
186 
187 void DAUDIO_GetFormats(signed int mixerIndex, signed int deviceID, int isSource, void* creator);
188 
189 void* DAUDIO_Open(signed int mixerIndex, signed int deviceID, int isSource,
190  int encoding, float sampleRate, int sampleSizeInBits,
191  int frameSize, int channels,
192  int isSigned, int isBigEndian, int bufferSizeInBytes);
193 int DAUDIO_Start(void* id, int isSource);
194 int DAUDIO_Stop(void* id, int isSource);
195 void DAUDIO_Close(void* id, int isSource);
196 int DAUDIO_Write(void* id, char* data, int byteSize); // returns -1 on error
197 int DAUDIO_Read(void* id, char* data, int byteSize); // returns -1 on error
198 
199 int DAUDIO_GetBufferSize(void* id, int isSource);
200 int DAUDIO_StillDraining(void* id, int isSource);
201 int DAUDIO_Flush(void* id, int isSource);
202 /* in bytes */
203 int DAUDIO_GetAvailable(void* id, int isSource);
204 INT64 DAUDIO_GetBytePosition(void* id, int isSource, INT64 javaBytePos);
205 void DAUDIO_SetBytePosition(void* id, int isSource, INT64 javaBytePos);
206 
207 int DAUDIO_RequiresServicing(void* id, int isSource);
208 void DAUDIO_Service(void* id, int isSource);
209 
210 void DAUDIO_AddAudioFormat(void* creatorV, int significantBits, int frameSizeInBytes,
211  int channels, float sampleRate,
212  int encoding, int isSigned,
213  int bigEndian);
214 
215 //#endif
216 
217 #endif
Definition: Utils.h:54
Definition: Utils.h:33
Definition: Utils.h:59
Definition: Utils.h:44
Definition: Utils.h:95

================================================ FILE: doc/annotated.html ================================================ CZPlayer: 类列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类列表
这里列出了所有类、结构、联合以及接口定义等,并附带简要说明:
[详情级别 12]
oC_ACMWaveFormat
oC_DVI_ADPCM_ENCODE_STATE_STEREO
oC_DVI_ADPCM_INFO
oC_DVI_ADPCM_STATE_STEREO
oC_DVIADPCMBlockHeader
oC_DVIADPCMHeader
oC_ID3Tag
oC_ID3v2Frame
oC_ID3v2Tag
oC_MS_ADPCM_COEF_SET
oC_MS_ADPCM_INFO
oC_MSADPCMBlockHeaderMono
oC_MSADPCMBlockHeaderStereo
oC_RiffHeader
oC_WaveHeader
oC_WaveHeaderEx
oC_WMA_SYNC_READER
oC_WMAFormatSpec
oCAboutPage
oCAboutPanel
oCAlbumThread
oCAuthorPage
oCCAudioStream
oCCBasicPlayer
oCCCriticalSection
oCCCustomMemoryStream
oCCFastFourierTransform
oCCFileInput
oCCFileStream
oCCHandleStream
oCCInput
oCCMemoryStream
oCCMp3Input
oCCollectionPanel
oCConfigDialog
oCCPlayThread
oCCSpectrumAnalyser
oCCSpectrumAnalyserThread
oCCStream
oCCStreamedInput
oCCSystem
oCCThread
oCCVorbisInput
oCCWaveConverter
oCCWaveInput
oCCWmaInput
oCDBModule
oCdither
oCDownloadListPanel
oCDownloadSettingsPage
oCDS_AudioDeviceCache
oCDS_Info
oCDS_RefreshCacheStruct
oCDS_StartBufferHelper
oCEditHotkeyDialog
oCGeneralSettingsPage
oCGlobalConfig
oCGlobalHotKey
oCHotKeysSettingsPage
oCHotKeysTableWidget
oCLoadMusicThread
oCLoadMusicThreadEvent
oCLrcDemo
oCLrcPortraitPanel
oCLrcSettingsPage
oCLrcThread
oCMainWidget
oCMediaWidget
oCMinMusicWidget
oCMusicInfoEntity
oCMusicList
oCMusicListSaveFormatEntity
oCMusicListWidget
oCMusicLrc
oCNoFocusDelegate
oCRadioPanel
oCRankingPanel
oCSearchPanel
oCSharedDialog
oCSignal
oCSignal1
oCSignal2
oCSignal3
oCSignal4
oCSignal5
oCSignal6
oCSignal7
oCSignal8
oCSignal9
oCSlot
oCSlot1
oCSlot2
oCSlot3
oCSlot4
oCSlot5
oCSlot6
oCSlot7
oCSlot8
oCSlot9
oCSlotBase
oCSlotBase1
oCSlotBase2
oCSlotBase3
oCSlotBase4
oCSlotBase5
oCSlotBase6
oCSlotBase7
oCSlotBase8
oCSlotBase9
oCSlotImpl
oCSlotImpl1
oCSlotImpl2
oCSlotImpl3
oCSlotImpl4
oCSlotImpl5
oCSlotImpl6
oCSlotImpl7
oCSlotImpl8
oCSlotImpl9
oCSoundControl
oCSpectrograph
oCtag_DirectAudioDeviceDescription
oCThanksPage
oCUpdatePage
oCWAVEFORMATEXTENSIBLE
\Cxing

================================================ FILE: doc/class_about_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPage 成员列表

成员的完整列表,这些成员属于 AboutPage,包括所有继承而来的类成员

AboutPage(QWidget *parent=NULL)AboutPage
m_labelAboutPage
~AboutPage(void)AboutPage

================================================ FILE: doc/class_about_page.html ================================================ CZPlayer: AboutPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <AboutPage.h>

类 AboutPage 继承关系图:

Public 成员函数

 AboutPage (QWidget *parent=NULL)
 
 ~AboutPage (void)
 

Public 属性

QLabel * m_label
 

详细描述

关于页面

构造及析构函数说明

AboutPage::AboutPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
AboutPage::~AboutPage ( void  )

析构函数.

类成员变量说明

QLabel* AboutPage::m_label

关于label


================================================ FILE: doc/class_about_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel 成员列表

成员的完整列表,这些成员属于 AboutPanel,包括所有继承而来的类成员

AboutPanel(QWidget *parent=NULL)AboutPanel
init()AboutPanel
~AboutPanel(void)AboutPanel

================================================ FILE: doc/class_about_panel.html ================================================ CZPlayer: AboutPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel类 参考

#include <AboutPanel.h>

类 AboutPanel 继承关系图:

Public 成员函数

 AboutPanel (QWidget *parent=NULL)
 
 ~AboutPanel (void)
 
void init ()
 

详细描述

关于面板

构造及析构函数说明

AboutPanel::AboutPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
AboutPanel::~AboutPanel ( void  )

析构函数.

成员函数说明

void AboutPanel::init ( )

初始化关于对话框.


================================================ FILE: doc/class_album_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AlbumThread 成员列表

成员的完整列表,这些成员属于 AlbumThread,包括所有继承而来的类成员

AlbumThread(const QString &fileName, const QString &musicName, const QString &musicArtist, const QString &albumFilePath, QObject *parent=NULL)AlbumThread
run()AlbumThreadprotectedvirtual
sigAlbumDownloadStatus(const QString &fileName, const QString &albumUrl, const QString &albumFilePath, AlbumDownloadStatus status)AlbumThreadsignal
~AlbumThread()AlbumThread

================================================ FILE: doc/class_album_thread.html ================================================ CZPlayer: AlbumThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <AlbumThread.h>

类 AlbumThread 继承关系图:

信号

void sigAlbumDownloadStatus (const QString &fileName, const QString &albumUrl, const QString &albumFilePath, AlbumDownloadStatus status)
 

Public 成员函数

 AlbumThread (const QString &fileName, const QString &musicName, const QString &musicArtist, const QString &albumFilePath, QObject *parent=NULL)
 
 ~AlbumThread ()
 

Protected 成员函数

virtual void run ()
 

详细描述

专辑下载线程

构造及析构函数说明

AlbumThread::AlbumThread ( const QString &  fileName,
const QString &  musicName,
const QString &  musicArtist,
const QString &  albumFilePath,
QObject *  parent = NULL 
)

构造函数

参数
fileName音乐文件名
musicName音乐名称
musicArtist音乐艺术家
albumFilePath专辑文件路径
parentQObject类型,默认为NULL
AlbumThread::~AlbumThread ( )

析构函数.

成员函数说明

void AlbumThread::run ( )
protectedvirtual

虚函数,继承自QThread

void AlbumThread::sigAlbumDownloadStatus ( const QString &  fileName,
const QString &  albumUrl,
const QString &  albumFilePath,
AlbumDownloadStatus  status 
)
signal

下载专辑状态

参数
fileName音乐文件名
albumUrl专辑Url
albumFilePath专辑文件路径
status下载状态

================================================ FILE: doc/class_author_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AuthorPage 成员列表

成员的完整列表,这些成员属于 AuthorPage,包括所有继承而来的类成员

AuthorPage(QWidget *parent=NULL)AuthorPage
~AuthorPage(void)AuthorPage

================================================ FILE: doc/class_author_page.html ================================================ CZPlayer: AuthorPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AuthorPage类 参考

#include <AuthorPage.h>

类 AuthorPage 继承关系图:

Public 成员函数

 AuthorPage (QWidget *parent=NULL)
 
 ~AuthorPage (void)
 

详细描述

作者页面

构造及析构函数说明

AuthorPage::AuthorPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
AuthorPage::~AuthorPage ( void  )

析构函数.


================================================ FILE: doc/class_c_audio_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CAudioStream 成员列表

成员的完整列表,这些成员属于 CAudioStream,包括所有继承而来的类成员

AddRef(void) (定义于 CAudioStream)CAudioStream
CAudioStream() (定义于 CAudioStream)CAudioStream
Clone(IStream **ppstm) (定义于 CAudioStream)CAudioStream
Commit(DWORD grfCommitFlags) (定义于 CAudioStream)CAudioStream
CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) (定义于 CAudioStream)CAudioStream
LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) (定义于 CAudioStream)CAudioStream
QueryInterface(REFIID riid, void **ppvObject) (定义于 CAudioStream)CAudioStream
Read(void *pv, ULONG cb, ULONG *pcbRead) (定义于 CAudioStream)CAudioStream
Release(void) (定义于 CAudioStream)CAudioStream
Revert(void) (定义于 CAudioStream)CAudioStream
Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) (定义于 CAudioStream)CAudioStream
SetSize(ULARGE_INTEGER libNewSize) (定义于 CAudioStream)CAudioStream
SetStream(CStream *pStream) (定义于 CAudioStream)CAudioStreaminline
Stat(STATSTG *pstatstg, DWORD grfStatFlag) (定义于 CAudioStream)CAudioStream
UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) (定义于 CAudioStream)CAudioStream
Write(const void *pv, ULONG cb, ULONG *pcbWritten) (定义于 CAudioStream)CAudioStream
~CAudioStream(void) (定义于 CAudioStream)CAudioStream

================================================ FILE: doc/class_c_audio_stream.html ================================================ CZPlayer: CAudioStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CAudioStream类 参考
类 CAudioStream 继承关系图:

Public 成员函数

void SetStream (CStream *pStream)
 
HRESULT STDMETHODCALLTYPE QueryInterface (REFIID riid, void **ppvObject)
 
ULONG STDMETHODCALLTYPE AddRef (void)
 
ULONG STDMETHODCALLTYPE Release (void)
 
HRESULT STDMETHODCALLTYPE Read (void *pv, ULONG cb, ULONG *pcbRead)
 
HRESULT STDMETHODCALLTYPE Write (const void *pv, ULONG cb, ULONG *pcbWritten)
 
HRESULT STDMETHODCALLTYPE Seek (LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
HRESULT STDMETHODCALLTYPE SetSize (ULARGE_INTEGER libNewSize)
 
HRESULT STDMETHODCALLTYPE CopyTo (IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
HRESULT STDMETHODCALLTYPE Commit (DWORD grfCommitFlags)
 
HRESULT STDMETHODCALLTYPE Revert (void)
 
HRESULT STDMETHODCALLTYPE LockRegion (ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
HRESULT STDMETHODCALLTYPE UnlockRegion (ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
HRESULT STDMETHODCALLTYPE Stat (STATSTG *pstatstg, DWORD grfStatFlag)
 
HRESULT STDMETHODCALLTYPE Clone (IStream **ppstm)
 

================================================ FILE: doc/class_c_basic_player-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CBasicPlayer 成员列表

================================================ FILE: doc/class_c_basic_player.html ================================================ CZPlayer: CBasicPlayer类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <BasicPlayer.h>

Public 成员函数

 CBasicPlayer (TCHAR *fileName)
 
 ~CBasicPlayer (void)
 
CFileInputGetInput ()
 
bool isVaild ()
 
void Start ()
 
void Stop ()
 
void Pause ()
 
void Play ()
 
jlong GetLongFramePosition ()
 
void handleFinished ()
 

Public 属性

c_signals __pad0__: Signal1<vector<float>> sigSpectrumChanged
 
Signal sigFinished
 
private c_slots: void handleSpectrumChanged(vector<float> vecFrequency)
 

友元

class CPlayThread
 
class CSpectrumAnalyser
 

详细描述

播放引擎类

构造及析构函数说明

CBasicPlayer::CBasicPlayer ( TCHAR *  fileName)

构造函数

参数
fileName文件路径
CBasicPlayer::~CBasicPlayer ( void  )

析构函数.

成员函数说明

CFileInput * CBasicPlayer::GetInput ( )

获得Input文件流

jlong CBasicPlayer::GetLongFramePosition ( )

获取帧位置

void CBasicPlayer::handleFinished ( )

播放完成

bool CBasicPlayer::isVaild ( )

是否可以获取播放源

void CBasicPlayer::Pause ( )

暂停

void CBasicPlayer::Play ( )

恢复播放

void CBasicPlayer::Start ( )

开始播放

void CBasicPlayer::Stop ( )

停止播放

类成员变量说明

c_signals CBasicPlayer::__pad0__

频谱改变

Signal CBasicPlayer::sigFinished

播放完成


================================================ FILE: doc/class_c_critical_section-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CCriticalSection 成员列表

成员的完整列表,这些成员属于 CCriticalSection,包括所有继承而来的类成员

CCriticalSection() (定义于 CCriticalSection)CCriticalSectioninline
Enter() (定义于 CCriticalSection)CCriticalSectioninline
Leave() (定义于 CCriticalSection)CCriticalSectioninline
m_CriticalSection (定义于 CCriticalSection)CCriticalSectionprotected
~CCriticalSection() (定义于 CCriticalSection)CCriticalSectioninline

================================================ FILE: doc/class_c_critical_section.html ================================================ CZPlayer: CCriticalSection类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

Public 成员函数

void Enter ()
 
void Leave ()
 

Protected 属性

CRITICAL_SECTION m_CriticalSection
 

================================================ FILE: doc/class_c_custom_memory_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CCustomMemoryStream 成员列表

成员的完整列表,这些成员属于 CCustomMemoryStream,包括所有继承而来的类成员

CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
CStream(void) (定义于 CStream)CStreaminline
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
m_Memory (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Position (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Size (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
Read(void *buf, DWORD size) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
SaveToFile(TCHAR *pszFileName) (定义于 CCustomMemoryStream)CCustomMemoryStream
SaveToStream(CStream *pStream) (定义于 CCustomMemoryStream)CCustomMemoryStream
Seek(int offset, WORD origin) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
SetPointer(void *Ptr, DWORD Size) (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(const INT64 size) (定义于 CStream)CStreamvirtual
SetSize(DWORD size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size)=0 (定义于 CStream)CStreampure virtual
~CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
~CStream(void) (定义于 CStream)CStreaminline

================================================ FILE: doc/class_c_custom_memory_stream.html ================================================ CZPlayer: CCustomMemoryStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CCustomMemoryStream 继承关系图:
CStream CMemoryStream CWaveConverter

Public 成员函数

DWORD Read (void *buf, DWORD size)
 
DWORD Seek (int offset, WORD origin)
 
void SaveToStream (CStream *pStream)
 
void SaveToFile (TCHAR *pszFileName)
 
- Public 成员函数 继承自 CStream
virtual DWORD Write (void *buf, DWORD size)=0
 
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (const INT64 size)
 
virtual void SetSize (DWORD size)
 

Protected 成员函数

void SetPointer (void *Ptr, DWORD Size)
 

Protected 属性

void * m_Memory
 
DWORD m_Size
 
DWORD m_Position
 

================================================ FILE: doc/class_c_fast_fourier_transform-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CFastFourierTransform 成员列表

成员的完整列表,这些成员属于 CFastFourierTransform,包括所有继承而来的类成员

Calculate(float *pSample, size_t pSampleSize) (定义于 CFastFourierTransform)CFastFourierTransform
CFastFourierTransform(int pSampleSize) (定义于 CFastFourierTransform)CFastFourierTransform
~CFastFourierTransform(void) (定义于 CFastFourierTransform)CFastFourierTransform

================================================ FILE: doc/class_c_fast_fourier_transform.html ================================================ CZPlayer: CFastFourierTransform类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CFastFourierTransform类 参考

Public 成员函数

 CFastFourierTransform (int pSampleSize)
 
float * Calculate (float *pSample, size_t pSampleSize)
 

================================================ FILE: doc/class_c_file_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CFileInput 成员列表

成员的完整列表,这些成员属于 CFileInput,包括所有继承而来的类成员

CFileInput(void) (定义于 CFileInput)CFileInput
CInput(void) (定义于 CInput)CInput
CloseFile()=0 (定义于 CFileInput)CFileInputpure virtual
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal() (定义于 CFileInput)CFileInputprotectedvirtual
GetBitsPerSample() (定义于 CFileInput)CFileInputvirtual
GetChannels() (定义于 CFileInput)CFileInputvirtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes)=0 (定义于 CInput)CInputprotectedpure virtual
GetFileNameLen() (定义于 CFileInput)CFileInput
GetOpened() (定义于 CFileInput)CFileInput
GetPosition() (定义于 CInput)CInput
GetSampleRate() (定义于 CFileInput)CFileInputvirtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CFileInput)CFileInputvirtual
GetTotalTime() (定义于 CFileInput)CFileInputvirtual
GetValid() (定义于 CFileInput)CFileInput
Init() (定义于 CInput)CInput
InitInternal() (定义于 CFileInput)CFileInputprotectedvirtual
Jump(int offset) (定义于 CFileInput)CFileInput
Lock() (定义于 CInput)CInput
m_BitsPerSample (定义于 CFileInput)CFileInputprotected
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_Channels (定义于 CFileInput)CFileInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_FileName (定义于 CFileInput)CFileInputprotected
m_FileNameLen (定义于 CFileInput)CFileInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_OpenCS (定义于 CFileInput)CFileInputprotected
m_Opened (定义于 CFileInput)CFileInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleRate (定义于 CFileInput)CFileInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_Time (定义于 CFileInput)CFileInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
m_Valid (定义于 CFileInput)CFileInputprotected
OpenFile()=0 (定义于 CFileInput)CFileInputpure virtual
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CFileInput)CFileInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum)=0 (定义于 CStreamedInput)CStreamedInputprotectedpure virtual
SetEndTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetFileName(TCHAR *pszFileName) (定义于 CFileInput)CFileInput
SetStartTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetStream(CStream *pStream) (定义于 CFileInput)CFileInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CFileInput(void) (定义于 CFileInput)CFileInput
~CInput(void) (定义于 CInput)CInput
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput

================================================ FILE: doc/class_c_file_input.html ================================================ CZPlayer: CFileInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CFileInput 继承关系图:
CStreamedInput CInput CMp3Input CVorbisInput CWaveInput CWmaInput

Public 成员函数

virtual void OpenFile ()=0
 
virtual void CloseFile ()=0
 
void SetFileName (TCHAR *pszFileName)
 
size_t GetFileNameLen ()
 
WORD GetBitsPerSample ()
 
DWORD GetSampleRate ()
 
WORD GetChannels ()
 
int GetOpened ()
 
bool GetValid ()
 
LARGE_INTEGER GetTotalSamples ()
 
DWORD GetTotalTime ()
 
bool SetStartTime (DWORD Minutes, DWORD Seconds)
 
bool SetEndTime (DWORD Minutes, DWORD Seconds)
 
void Reset ()
 
void Jump (int offset)
 
- Public 成员函数 继承自 CStreamedInput
void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Pause ()
 
virtual void Resume ()
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

void SetStream (CStream *pStream)
 
void FlushInternal ()
 
void InitInternal ()
 
- Protected 成员函数 继承自 CStreamedInput
virtual bool SeekInternal (LARGE_INTEGER *SampleNum)=0
 
- Protected 成员函数 继承自 CInput
virtual void GetDataInternal (void **buffer, DWORD *bytes)=0
 

Protected 属性

CCriticalSectionm_OpenCS
 
TCHAR m_FileName [MAX_PATH]
 
size_t m_FileNameLen
 
int m_Opened
 
bool m_Valid
 
WORD m_BitsPerSample
 
DWORD m_SampleRate
 
WORD m_Channels
 
DWORD m_Time
 
- Protected 属性 继承自 CStreamedInput
CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_file_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CFileStream 成员列表

成员的完整列表,这些成员属于 CFileStream,包括所有继承而来的类成员

CFileStream(TCHAR *pszFileName, FILE_MODE mode, DWORD rights=0) (定义于 CFileStream)CFileStream
CHandleStream(void) (定义于 CHandleStream)CHandleStreaminline
CStream(void) (定义于 CStream)CStreaminline
GetHandle() (定义于 CHandleStream)CHandleStreaminline
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
m_handle (定义于 CHandleStream)CHandleStreamprotected
Read(void *buf, DWORD size) (定义于 CHandleStream)CHandleStreamvirtual
Seek(int offset, WORD origin) (定义于 CHandleStream)CHandleStreamvirtual
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(const INT64 size) (定义于 CHandleStream)CHandleStreamprotectedvirtual
SetSize(int size) (定义于 CHandleStream)CHandleStreamprotected
SetSize(DWORD size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size) (定义于 CHandleStream)CHandleStreamvirtual
~CFileStream(void) (定义于 CFileStream)CFileStream
~CHandleStream(void) (定义于 CHandleStream)CHandleStreaminline
~CStream(void) (定义于 CStream)CStreaminline

================================================ FILE: doc/class_c_file_stream.html ================================================ CZPlayer: CFileStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CFileStream类 参考
类 CFileStream 继承关系图:
CHandleStream CStream

Public 成员函数

 CFileStream (TCHAR *pszFileName, FILE_MODE mode, DWORD rights=0)
 
- Public 成员函数 继承自 CHandleStream
DWORD Read (void *buf, DWORD size)
 
DWORD Write (void *buf, DWORD size)
 
DWORD Seek (int offset, WORD origin)
 
HANDLE GetHandle ()
 
- Public 成员函数 继承自 CStream
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (DWORD size)
 

额外继承的成员函数

- Protected 成员函数 继承自 CHandleStream
void SetSize (const INT64 size)
 
void SetSize (int size)
 
- Protected 属性 继承自 CHandleStream
HANDLE m_handle
 

================================================ FILE: doc/class_c_handle_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CHandleStream 成员列表

成员的完整列表,这些成员属于 CHandleStream,包括所有继承而来的类成员

CHandleStream(void) (定义于 CHandleStream)CHandleStreaminline
CStream(void) (定义于 CStream)CStreaminline
GetHandle() (定义于 CHandleStream)CHandleStreaminline
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
m_handle (定义于 CHandleStream)CHandleStreamprotected
Read(void *buf, DWORD size) (定义于 CHandleStream)CHandleStreamvirtual
Seek(int offset, WORD origin) (定义于 CHandleStream)CHandleStreamvirtual
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(const INT64 size) (定义于 CHandleStream)CHandleStreamprotectedvirtual
SetSize(int size) (定义于 CHandleStream)CHandleStreamprotected
SetSize(DWORD size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size) (定义于 CHandleStream)CHandleStreamvirtual
~CHandleStream(void) (定义于 CHandleStream)CHandleStreaminline
~CStream(void) (定义于 CStream)CStreaminline

================================================ FILE: doc/class_c_handle_stream.html ================================================ CZPlayer: CHandleStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CHandleStream 继承关系图:
CStream CFileStream

Public 成员函数

DWORD Read (void *buf, DWORD size)
 
DWORD Write (void *buf, DWORD size)
 
DWORD Seek (int offset, WORD origin)
 
HANDLE GetHandle ()
 
- Public 成员函数 继承自 CStream
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (DWORD size)
 

Protected 成员函数

void SetSize (const INT64 size)
 
void SetSize (int size)
 

Protected 属性

HANDLE m_handle
 

================================================ FILE: doc/class_c_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CInput 成员列表

成员的完整列表,这些成员属于 CInput,包括所有继承而来的类成员

CInput(void) (定义于 CInput)CInput
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal()=0 (定义于 CInput)CInputprotectedpure virtual
GetBitsPerSample()=0 (定义于 CInput)CInputpure virtual
GetChannels()=0 (定义于 CInput)CInputpure virtual
GetData(void **buffer, DWORD *size) (定义于 CInput)CInput
GetDataInternal(void **buffer, DWORD *bytes)=0 (定义于 CInput)CInputprotectedpure virtual
GetPosition() (定义于 CInput)CInput
GetSampleRate()=0 (定义于 CInput)CInputpure virtual
GetSize() (定义于 CInput)CInput
GetTotalSamples() (定义于 CInput)CInputvirtual
GetTotalTime() (定义于 CInput)CInputvirtual
Init() (定义于 CInput)CInput
InitInternal()=0 (定义于 CInput)CInputprotectedpure virtual
Lock() (定义于 CInput)CInput
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_Position (定义于 CInput)CInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Size (定义于 CInput)CInputprotected
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CInput)CInputvirtual
Resume() (定义于 CInput)CInputvirtual
Unlock() (定义于 CInput)CInput
~CInput(void) (定义于 CInput)CInput

================================================ FILE: doc/class_c_input.html ================================================ CZPlayer: CInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CInput 继承关系图:
CStreamedInput CFileInput CMp3Input CVorbisInput CWaveInput CWmaInput

Public 成员函数

virtual void Reset ()
 
virtual void Pause ()
 
virtual void Resume ()
 
virtual DWORD GetTotalTime ()
 
virtual LARGE_INTEGER GetTotalSamples ()
 
virtual WORD GetBitsPerSample ()=0
 
virtual WORD GetChannels ()=0
 
virtual DWORD GetSampleRate ()=0
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

virtual void InitInternal ()=0
 
virtual void FlushInternal ()=0
 
virtual void GetDataInternal (void **buffer, DWORD *bytes)=0
 

Protected 属性

LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_memory_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CMemoryStream 成员列表

成员的完整列表,这些成员属于 CMemoryStream,包括所有继承而来的类成员

CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
Clear() (定义于 CMemoryStream)CMemoryStream
CMemoryStream(void) (定义于 CMemoryStream)CMemoryStream
CStream(void) (定义于 CStream)CStreaminline
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
LoadFromFile(TCHAR *pszFileName) (定义于 CMemoryStream)CMemoryStream
LoadFromStream(CStream *pStream) (定义于 CMemoryStream)CMemoryStream
m_Memory (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Position (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Size (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
Read(void *buf, DWORD size) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
Realloc(DWORD NewCapacity) (定义于 CMemoryStream)CMemoryStreamprotected
SaveToFile(TCHAR *pszFileName) (定义于 CCustomMemoryStream)CCustomMemoryStream
SaveToStream(CStream *pStream) (定义于 CCustomMemoryStream)CCustomMemoryStream
Seek(int offset, WORD origin) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
SetCapacity(DWORD NewCapacity) (定义于 CMemoryStream)CMemoryStream
SetPointer(void *Ptr, DWORD Size) (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(DWORD NewSize) (定义于 CMemoryStream)CMemoryStreamvirtual
SetSize(const INT64 size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size) (定义于 CMemoryStream)CMemoryStreamvirtual
~CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
~CMemoryStream(void) (定义于 CMemoryStream)CMemoryStream
~CStream(void) (定义于 CStream)CStreaminline

================================================ FILE: doc/class_c_memory_stream.html ================================================ CZPlayer: CMemoryStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CMemoryStream 继承关系图:
CCustomMemoryStream CStream CWaveConverter

Public 成员函数

void Clear ()
 
void LoadFromStream (CStream *pStream)
 
void LoadFromFile (TCHAR *pszFileName)
 
void SetSize (DWORD NewSize)
 
DWORD Write (void *buf, DWORD size)
 
void SetCapacity (DWORD NewCapacity)
 
- Public 成员函数 继承自 CCustomMemoryStream
DWORD Read (void *buf, DWORD size)
 
DWORD Seek (int offset, WORD origin)
 
void SaveToStream (CStream *pStream)
 
void SaveToFile (TCHAR *pszFileName)
 
- Public 成员函数 继承自 CStream
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (const INT64 size)
 

Protected 成员函数

void * Realloc (DWORD NewCapacity)
 
- Protected 成员函数 继承自 CCustomMemoryStream
void SetPointer (void *Ptr, DWORD Size)
 

额外继承的成员函数

- Protected 属性 继承自 CCustomMemoryStream
void * m_Memory
 
DWORD m_Size
 
DWORD m_Position
 

================================================ FILE: doc/class_c_mp3_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CMp3Input 成员列表

成员的完整列表,这些成员属于 CMp3Input,包括所有继承而来的类成员

CFileInput(void) (定义于 CFileInput)CFileInput
CInput(void) (定义于 CInput)CInput
CloseFile() (定义于 CMp3Input)CMp3Inputvirtual
CMp3Input(void) (定义于 CMp3Input)CMp3Input
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal() (定义于 CFileInput)CFileInputprotectedvirtual
GetBitsPerSample() (定义于 CFileInput)CFileInputvirtual
GetChannels() (定义于 CFileInput)CFileInputvirtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes) (定义于 CMp3Input)CMp3Inputprotectedvirtual
GetFileNameLen() (定义于 CFileInput)CFileInput
GetOpened() (定义于 CFileInput)CFileInput
GetPosition() (定义于 CInput)CInput
GetSampleRate() (定义于 CFileInput)CFileInputvirtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CFileInput)CFileInputvirtual
GetTotalTime() (定义于 CFileInput)CFileInputvirtual
GetValid() (定义于 CFileInput)CFileInput
Init() (定义于 CInput)CInput
InitInternal() (定义于 CFileInput)CFileInputprotectedvirtual
Jump(int offset) (定义于 CFileInput)CFileInput
Lock() (定义于 CInput)CInput
m_BitsPerSample (定义于 CFileInput)CFileInputprotected
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_Channels (定义于 CFileInput)CFileInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_FileName (定义于 CFileInput)CFileInputprotected
m_FileNameLen (定义于 CFileInput)CFileInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_OpenCS (定义于 CFileInput)CFileInputprotected
m_Opened (定义于 CFileInput)CFileInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleRate (定义于 CFileInput)CFileInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_Time (定义于 CFileInput)CFileInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
m_Valid (定义于 CFileInput)CFileInputprotected
OpenFile() (定义于 CMp3Input)CMp3Inputvirtual
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CFileInput)CFileInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum) (定义于 CMp3Input)CMp3Inputprotectedvirtual
SetEndTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetFileName(TCHAR *pszFileName) (定义于 CFileInput)CFileInput
SetStartTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetStream(CStream *pStream) (定义于 CFileInput)CFileInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CFileInput(void) (定义于 CFileInput)CFileInput
~CInput(void) (定义于 CInput)CInput
~CMp3Input(void) (定义于 CMp3Input)CMp3Input
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput

================================================ FILE: doc/class_c_mp3_input.html ================================================ CZPlayer: CMp3Input类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CMp3Input 继承关系图:
CFileInput CStreamedInput CInput

Public 成员函数

void OpenFile ()
 
void CloseFile ()
 
- Public 成员函数 继承自 CFileInput
void SetFileName (TCHAR *pszFileName)
 
size_t GetFileNameLen ()
 
WORD GetBitsPerSample ()
 
DWORD GetSampleRate ()
 
WORD GetChannels ()
 
int GetOpened ()
 
bool GetValid ()
 
LARGE_INTEGER GetTotalSamples ()
 
DWORD GetTotalTime ()
 
bool SetStartTime (DWORD Minutes, DWORD Seconds)
 
bool SetEndTime (DWORD Minutes, DWORD Seconds)
 
void Reset ()
 
void Jump (int offset)
 
- Public 成员函数 继承自 CStreamedInput
void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Pause ()
 
virtual void Resume ()
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

void GetDataInternal (void **buffer, DWORD *bytes)
 
bool SeekInternal (LARGE_INTEGER *SampleNum)
 
- Protected 成员函数 继承自 CFileInput
void SetStream (CStream *pStream)
 
void FlushInternal ()
 
void InitInternal ()
 

额外继承的成员函数

- Protected 属性 继承自 CFileInput
CCriticalSectionm_OpenCS
 
TCHAR m_FileName [MAX_PATH]
 
size_t m_FileNameLen
 
int m_Opened
 
bool m_Valid
 
WORD m_BitsPerSample
 
DWORD m_SampleRate
 
WORD m_Channels
 
DWORD m_Time
 
- Protected 属性 继承自 CStreamedInput
CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_play_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CPlayThread 成员列表

成员的完整列表,这些成员属于 CPlayThread,包括所有继承而来的类成员

__pad0__ (定义于 CPlayThread)CPlayThreadprotected
CPlayThread(CBasicPlayer *pPlayer) (定义于 CPlayThread)CPlayThread
CThread(bool pCreateSuspened=true) (定义于 CThread)CThreadinline
Execute() (定义于 CPlayThread)CPlayThreadprotectedvirtual
m_Stop (定义于 CThread)CThreadprotected
Resume() (定义于 CThread)CThreadinline
Stop() (定义于 CThread)CThreadinline
Suspend() (定义于 CThread)CThreadinline
Suspended() (定义于 CThread)CThreadinline
wait() (定义于 CThread)CThreadinline
~CPlayThread(void) (定义于 CPlayThread)CPlayThread
~CThread() (定义于 CThread)CThreadinline

================================================ FILE: doc/class_c_play_thread.html ================================================ CZPlayer: CPlayThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <BasicPlayer.h>

类 CPlayThread 继承关系图:
CThread

Public 成员函数

 CPlayThread (CBasicPlayer *pPlayer)
 
- Public 成员函数 继承自 CThread
 CThread (bool pCreateSuspened=true)
 
void Resume ()
 
void Suspend ()
 
bool Suspended ()
 
void Stop ()
 
void wait ()
 

Protected 成员函数

void Execute ()
 

Protected 属性

c_signals __pad0__: Signal sigFinished
 
- Protected 属性 继承自 CThread
bool m_Stop
 

详细描述

播放线程


================================================ FILE: doc/class_c_spectrum_analyser-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CSpectrumAnalyser 成员列表

成员的完整列表,这些成员属于 CSpectrumAnalyser,包括所有继承而来的类成员

__pad0__ (定义于 CSpectrumAnalyser)CSpectrumAnalyser
CSpectrumAnalyser(CBasicPlayer *pPlayer) (定义于 CSpectrumAnalyser)CSpectrumAnalyser
CSpectrumAnalyserThread (定义于 CSpectrumAnalyser)CSpectrumAnalyserfriend
GetAudioDataBuffer() (定义于 CSpectrumAnalyser)CSpectrumAnalyserinline
GetAudioDataBufferLength() (定义于 CSpectrumAnalyser)CSpectrumAnalyserinline
GetPosition() (定义于 CSpectrumAnalyser)CSpectrumAnalyserinline
Process(float pFrameRateRatioHint) (定义于 CSpectrumAnalyser)CSpectrumAnalyser
SetAudioDataBufferLength(DWORD pAudioDataBufferLength) (定义于 CSpectrumAnalyser)CSpectrumAnalyserinline
SetPosition(int pPosition) (定义于 CSpectrumAnalyser)CSpectrumAnalyserinline
Start() (定义于 CSpectrumAnalyser)CSpectrumAnalyser
Stop() (定义于 CSpectrumAnalyser)CSpectrumAnalyser
~CSpectrumAnalyser(void) (定义于 CSpectrumAnalyser)CSpectrumAnalyser

================================================ FILE: doc/class_c_spectrum_analyser.html ================================================ CZPlayer: CSpectrumAnalyser类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CSpectrumAnalyser类 参考

#include <BasicPlayer.h>

Public 成员函数

 CSpectrumAnalyser (CBasicPlayer *pPlayer)
 
void Start ()
 
void Stop ()
 
void Process (float pFrameRateRatioHint)
 
jbyte * GetAudioDataBuffer ()
 
int GetPosition ()
 
void SetPosition (int pPosition)
 
DWORD GetAudioDataBufferLength ()
 
void SetAudioDataBufferLength (DWORD pAudioDataBufferLength)
 

Public 属性

c_signals __pad0__: Signal1<vector<float>> sigSpectrumChanged
 

友元

class CSpectrumAnalyserThread
 

详细描述

频谱分析仪


================================================ FILE: doc/class_c_spectrum_analyser_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CSpectrumAnalyserThread 成员列表

成员的完整列表,这些成员属于 CSpectrumAnalyserThread,包括所有继承而来的类成员

CSpectrumAnalyserThread(CSpectrumAnalyser *pSpectrumAnalyser) (定义于 CSpectrumAnalyserThread)CSpectrumAnalyserThread
CThread(bool pCreateSuspened=true) (定义于 CThread)CThreadinline
Execute() (定义于 CSpectrumAnalyserThread)CSpectrumAnalyserThreadprotectedvirtual
m_Stop (定义于 CThread)CThreadprotected
Resume() (定义于 CThread)CThreadinline
Stop() (定义于 CThread)CThreadinline
Suspend() (定义于 CThread)CThreadinline
Suspended() (定义于 CThread)CThreadinline
wait() (定义于 CThread)CThreadinline
~CSpectrumAnalyserThread(void) (定义于 CSpectrumAnalyserThread)CSpectrumAnalyserThread
~CThread() (定义于 CThread)CThreadinline

================================================ FILE: doc/class_c_spectrum_analyser_thread.html ================================================ CZPlayer: CSpectrumAnalyserThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CSpectrumAnalyserThread类 参考

#include <BasicPlayer.h>

类 CSpectrumAnalyserThread 继承关系图:
CThread

Public 成员函数

 CSpectrumAnalyserThread (CSpectrumAnalyser *pSpectrumAnalyser)
 
- Public 成员函数 继承自 CThread
 CThread (bool pCreateSuspened=true)
 
void Resume ()
 
void Suspend ()
 
bool Suspended ()
 
void Stop ()
 
void wait ()
 

Protected 成员函数

void Execute ()
 

额外继承的成员函数

- Protected 属性 继承自 CThread
bool m_Stop
 

详细描述

频谱分析线程


================================================ FILE: doc/class_c_stream-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CStream 成员列表

成员的完整列表,这些成员属于 CStream,包括所有继承而来的类成员

CStream(void) (定义于 CStream)CStreaminline
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
Read(void *buf, DWORD size)=0 (定义于 CStream)CStreampure virtual
Seek(int offset, WORD origin)=0 (定义于 CStream)CStreampure virtual
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(const INT64 size) (定义于 CStream)CStreamvirtual
SetSize(DWORD size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size)=0 (定义于 CStream)CStreampure virtual
~CStream(void) (定义于 CStream)CStreaminline

================================================ FILE: doc/class_c_stream.html ================================================ CZPlayer: CStream类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CStream类 参考abstract
类 CStream 继承关系图:
CCustomMemoryStream CHandleStream CMemoryStream CFileStream CWaveConverter

Public 成员函数

virtual DWORD Read (void *buf, DWORD size)=0
 
virtual DWORD Write (void *buf, DWORD size)=0
 
virtual DWORD Seek (int offset, WORD origin)=0
 
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (const INT64 size)
 
virtual void SetSize (DWORD size)
 

================================================ FILE: doc/class_c_streamed_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CStreamedInput 成员列表

成员的完整列表,这些成员属于 CStreamedInput,包括所有继承而来的类成员

CInput(void) (定义于 CInput)CInput
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal()=0 (定义于 CInput)CInputprotectedpure virtual
GetBitsPerSample()=0 (定义于 CInput)CInputpure virtual
GetChannels()=0 (定义于 CInput)CInputpure virtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes)=0 (定义于 CInput)CInputprotectedpure virtual
GetPosition() (定义于 CInput)CInput
GetSampleRate()=0 (定义于 CInput)CInputpure virtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CInput)CInputvirtual
GetTotalTime() (定义于 CInput)CInputvirtual
Init() (定义于 CInput)CInput
InitInternal()=0 (定义于 CInput)CInputprotectedpure virtual
Lock() (定义于 CInput)CInput
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CInput)CInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum)=0 (定义于 CStreamedInput)CStreamedInputprotectedpure virtual
SetStream(CStream *pStream) (定义于 CStreamedInput)CStreamedInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CInput(void) (定义于 CInput)CInput
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput

================================================ FILE: doc/class_c_streamed_input.html ================================================ CZPlayer: CStreamedInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CStreamedInput 继承关系图:
CInput CFileInput CMp3Input CVorbisInput CWaveInput CWmaInput

Public 成员函数

void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Reset ()
 
virtual void Pause ()
 
virtual void Resume ()
 
virtual DWORD GetTotalTime ()
 
virtual LARGE_INTEGER GetTotalSamples ()
 
virtual WORD GetBitsPerSample ()=0
 
virtual WORD GetChannels ()=0
 
virtual DWORD GetSampleRate ()=0
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

virtual void SetStream (CStream *pStream)
 
virtual bool SeekInternal (LARGE_INTEGER *SampleNum)=0
 
- Protected 成员函数 继承自 CInput
virtual void InitInternal ()=0
 
virtual void FlushInternal ()=0
 
virtual void GetDataInternal (void **buffer, DWORD *bytes)=0
 

Protected 属性

CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_system-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CSystem 成员列表

成员的完整列表,这些成员属于 CSystem,包括所有继承而来的类成员

nanoTime() (定义于 CSystem)CSysteminlinestatic

================================================ FILE: doc/class_c_system.html ================================================ CZPlayer: CSystem类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

静态 Public 成员函数

static jlong nanoTime ()
 

================================================ FILE: doc/class_c_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CThread 成员列表

成员的完整列表,这些成员属于 CThread,包括所有继承而来的类成员

CThread(bool pCreateSuspened=true) (定义于 CThread)CThreadinline
Execute()=0 (定义于 CThread)CThreadprotectedpure virtual
m_Stop (定义于 CThread)CThreadprotected
Resume() (定义于 CThread)CThreadinline
Stop() (定义于 CThread)CThreadinline
Suspend() (定义于 CThread)CThreadinline
Suspended() (定义于 CThread)CThreadinline
wait() (定义于 CThread)CThreadinline
~CThread() (定义于 CThread)CThreadinline

================================================ FILE: doc/class_c_thread.html ================================================ CZPlayer: CThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CThread 继承关系图:
CPlayThread CSpectrumAnalyserThread

Public 成员函数

 CThread (bool pCreateSuspened=true)
 
void Resume ()
 
void Suspend ()
 
bool Suspended ()
 
void Stop ()
 
void wait ()
 

Protected 成员函数

virtual void Execute ()=0
 

Protected 属性

bool m_Stop
 

================================================ FILE: doc/class_c_vorbis_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CVorbisInput 成员列表

成员的完整列表,这些成员属于 CVorbisInput,包括所有继承而来的类成员

CFileInput(void) (定义于 CFileInput)CFileInput
CInput(void) (定义于 CInput)CInput
CloseFile() (定义于 CVorbisInput)CVorbisInputvirtual
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
CVorbisInput(void) (定义于 CVorbisInput)CVorbisInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal() (定义于 CFileInput)CFileInputprotectedvirtual
GetBitsPerSample() (定义于 CFileInput)CFileInputvirtual
GetChannels() (定义于 CFileInput)CFileInputvirtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes) (定义于 CVorbisInput)CVorbisInputprotectedvirtual
GetFileNameLen() (定义于 CFileInput)CFileInput
GetOpened() (定义于 CFileInput)CFileInput
GetPosition() (定义于 CInput)CInput
GetSampleRate() (定义于 CFileInput)CFileInputvirtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CFileInput)CFileInputvirtual
GetTotalTime() (定义于 CFileInput)CFileInputvirtual
GetValid() (定义于 CFileInput)CFileInput
Init() (定义于 CInput)CInput
InitInternal() (定义于 CFileInput)CFileInputprotectedvirtual
Jump(int offset) (定义于 CFileInput)CFileInput
Lock() (定义于 CInput)CInput
m_BitsPerSample (定义于 CFileInput)CFileInputprotected
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_Channels (定义于 CFileInput)CFileInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_FileName (定义于 CFileInput)CFileInputprotected
m_FileNameLen (定义于 CFileInput)CFileInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_OpenCS (定义于 CFileInput)CFileInputprotected
m_Opened (定义于 CFileInput)CFileInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleRate (定义于 CFileInput)CFileInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_Time (定义于 CFileInput)CFileInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
m_Valid (定义于 CFileInput)CFileInputprotected
OpenFile() (定义于 CVorbisInput)CVorbisInputvirtual
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CFileInput)CFileInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum) (定义于 CVorbisInput)CVorbisInputprotectedvirtual
SetEndTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetFileName(TCHAR *pszFileName) (定义于 CFileInput)CFileInput
SetStartTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetStream(CStream *pStream) (定义于 CFileInput)CFileInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CFileInput(void) (定义于 CFileInput)CFileInput
~CInput(void) (定义于 CInput)CInput
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
~CVorbisInput(void) (定义于 CVorbisInput)CVorbisInput

================================================ FILE: doc/class_c_vorbis_input.html ================================================ CZPlayer: CVorbisInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CVorbisInput 继承关系图:
CFileInput CStreamedInput CInput

Public 成员函数

void OpenFile ()
 
void CloseFile ()
 
- Public 成员函数 继承自 CFileInput
void SetFileName (TCHAR *pszFileName)
 
size_t GetFileNameLen ()
 
WORD GetBitsPerSample ()
 
DWORD GetSampleRate ()
 
WORD GetChannels ()
 
int GetOpened ()
 
bool GetValid ()
 
LARGE_INTEGER GetTotalSamples ()
 
DWORD GetTotalTime ()
 
bool SetStartTime (DWORD Minutes, DWORD Seconds)
 
bool SetEndTime (DWORD Minutes, DWORD Seconds)
 
void Reset ()
 
void Jump (int offset)
 
- Public 成员函数 继承自 CStreamedInput
void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Pause ()
 
virtual void Resume ()
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

void GetDataInternal (void **buffer, DWORD *bytes)
 
bool SeekInternal (LARGE_INTEGER *SampleNum)
 
- Protected 成员函数 继承自 CFileInput
void SetStream (CStream *pStream)
 
void FlushInternal ()
 
void InitInternal ()
 

额外继承的成员函数

- Protected 属性 继承自 CFileInput
CCriticalSectionm_OpenCS
 
TCHAR m_FileName [MAX_PATH]
 
size_t m_FileNameLen
 
int m_Opened
 
bool m_Valid
 
WORD m_BitsPerSample
 
DWORD m_SampleRate
 
WORD m_Channels
 
DWORD m_Time
 
- Protected 属性 继承自 CStreamedInput
CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_wave_converter-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CWaveConverter 成员列表

成员的完整列表,这些成员属于 CWaveConverter,包括所有继承而来的类成员

CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
Clear() (定义于 CMemoryStream)CMemoryStream
CMemoryStream(void) (定义于 CMemoryStream)CMemoryStream
Convert() (定义于 CWaveConverter)CWaveConverter
CStream(void) (定义于 CStream)CStreaminline
CurrentFormat (定义于 CWaveConverter)CWaveConverter
CWaveConverter(void) (定义于 CWaveConverter)CWaveConverter
GetPosition(void) (定义于 CStream)CStream
GetSize(void) (定义于 CStream)CStreamvirtual
LoadFromFile(TCHAR *pszFileName) (定义于 CMemoryStream)CMemoryStream
LoadFromStream(CStream *pStream) (定义于 CMemoryStream)CMemoryStream
LoadStream(CStream *pStream) (定义于 CWaveConverter)CWaveConverter
m_Memory (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Position (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
m_Size (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
NewFormat (定义于 CWaveConverter)CWaveConverter
Read(void *buf, DWORD size) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
Realloc(DWORD NewCapacity) (定义于 CMemoryStream)CMemoryStreamprotected
SaveToFile(TCHAR *pszFileName) (定义于 CCustomMemoryStream)CCustomMemoryStream
SaveToStream(CStream *pStream) (定义于 CCustomMemoryStream)CCustomMemoryStream
SaveWavToStream(CStream *pStream) (定义于 CWaveConverter)CWaveConverter
Seek(int offset, WORD origin) (定义于 CCustomMemoryStream)CCustomMemoryStreamvirtual
SetCapacity(DWORD NewCapacity) (定义于 CMemoryStream)CMemoryStream
SetPointer(void *Ptr, DWORD Size) (定义于 CCustomMemoryStream)CCustomMemoryStreamprotected
SetPosition(INT64 position) (定义于 CStream)CStream
SetSize(DWORD NewSize) (定义于 CMemoryStream)CMemoryStreamvirtual
SetSize(const INT64 size) (定义于 CStream)CStreamvirtual
Write(void *buf, DWORD size) (定义于 CMemoryStream)CMemoryStreamvirtual
~CCustomMemoryStream(void) (定义于 CCustomMemoryStream)CCustomMemoryStream
~CMemoryStream(void) (定义于 CMemoryStream)CMemoryStream
~CStream(void) (定义于 CStream)CStreaminline
~CWaveConverter(void) (定义于 CWaveConverter)CWaveConverter

================================================ FILE: doc/class_c_wave_converter.html ================================================ CZPlayer: CWaveConverter类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CWaveConverter 继承关系图:
CMemoryStream CCustomMemoryStream CStream

Public 成员函数

int LoadStream (CStream *pStream)
 
int Convert ()
 
int SaveWavToStream (CStream *pStream)
 
- Public 成员函数 继承自 CMemoryStream
void Clear ()
 
void LoadFromStream (CStream *pStream)
 
void LoadFromFile (TCHAR *pszFileName)
 
void SetSize (DWORD NewSize)
 
DWORD Write (void *buf, DWORD size)
 
void SetCapacity (DWORD NewCapacity)
 
- Public 成员函数 继承自 CCustomMemoryStream
DWORD Read (void *buf, DWORD size)
 
DWORD Seek (int offset, WORD origin)
 
void SaveToStream (CStream *pStream)
 
void SaveToFile (TCHAR *pszFileName)
 
- Public 成员函数 继承自 CStream
INT64 GetPosition (void)
 
void SetPosition (INT64 position)
 
virtual INT64 GetSize (void)
 
virtual void SetSize (const INT64 size)
 

Public 属性

ACMWaveFormat CurrentFormat
 
ACMWaveFormat NewFormat
 

额外继承的成员函数

- Protected 成员函数 继承自 CMemoryStream
void * Realloc (DWORD NewCapacity)
 
- Protected 成员函数 继承自 CCustomMemoryStream
void SetPointer (void *Ptr, DWORD Size)
 
- Protected 属性 继承自 CCustomMemoryStream
void * m_Memory
 
DWORD m_Size
 
DWORD m_Position
 

================================================ FILE: doc/class_c_wave_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CWaveInput 成员列表

成员的完整列表,这些成员属于 CWaveInput,包括所有继承而来的类成员

CFileInput(void) (定义于 CFileInput)CFileInput
CInput(void) (定义于 CInput)CInput
CloseFile() (定义于 CWaveInput)CWaveInputvirtual
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
CWaveInput(void) (定义于 CWaveInput)CWaveInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal() (定义于 CFileInput)CFileInputprotectedvirtual
GetBitsPerSample() (定义于 CFileInput)CFileInputvirtual
GetChannels() (定义于 CFileInput)CFileInputvirtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes) (定义于 CWaveInput)CWaveInputprotectedvirtual
GetFileNameLen() (定义于 CFileInput)CFileInput
GetOpened() (定义于 CFileInput)CFileInput
GetPosition() (定义于 CInput)CInput
GetSampleRate() (定义于 CFileInput)CFileInputvirtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CFileInput)CFileInputvirtual
GetTotalTime() (定义于 CFileInput)CFileInputvirtual
GetValid() (定义于 CFileInput)CFileInput
Init() (定义于 CInput)CInput
InitInternal() (定义于 CFileInput)CFileInputprotectedvirtual
Jump(int offset) (定义于 CFileInput)CFileInput
Lock() (定义于 CInput)CInput
m_BitsPerSample (定义于 CFileInput)CFileInputprotected
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_Channels (定义于 CFileInput)CFileInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_FileName (定义于 CFileInput)CFileInputprotected
m_FileNameLen (定义于 CFileInput)CFileInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_OpenCS (定义于 CFileInput)CFileInputprotected
m_Opened (定义于 CFileInput)CFileInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleRate (定义于 CFileInput)CFileInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_Time (定义于 CFileInput)CFileInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
m_Valid (定义于 CFileInput)CFileInputprotected
OpenFile() (定义于 CWaveInput)CWaveInputvirtual
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CFileInput)CFileInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum) (定义于 CWaveInput)CWaveInputprotectedvirtual
SetEndTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetFileName(TCHAR *pszFileName) (定义于 CFileInput)CFileInput
SetStartTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetStream(CStream *pStream) (定义于 CFileInput)CFileInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CFileInput(void) (定义于 CFileInput)CFileInput
~CInput(void) (定义于 CInput)CInput
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
~CWaveInput(void) (定义于 CWaveInput)CWaveInput

================================================ FILE: doc/class_c_wave_input.html ================================================ CZPlayer: CWaveInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CWaveInput 继承关系图:
CFileInput CStreamedInput CInput

Public 成员函数

void OpenFile ()
 
void CloseFile ()
 
- Public 成员函数 继承自 CFileInput
void SetFileName (TCHAR *pszFileName)
 
size_t GetFileNameLen ()
 
WORD GetBitsPerSample ()
 
DWORD GetSampleRate ()
 
WORD GetChannels ()
 
int GetOpened ()
 
bool GetValid ()
 
LARGE_INTEGER GetTotalSamples ()
 
DWORD GetTotalTime ()
 
bool SetStartTime (DWORD Minutes, DWORD Seconds)
 
bool SetEndTime (DWORD Minutes, DWORD Seconds)
 
void Reset ()
 
void Jump (int offset)
 
- Public 成员函数 继承自 CStreamedInput
void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Pause ()
 
virtual void Resume ()
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

void GetDataInternal (void **buffer, DWORD *bytes)
 
bool SeekInternal (LARGE_INTEGER *SampleNum)
 
- Protected 成员函数 继承自 CFileInput
void SetStream (CStream *pStream)
 
void FlushInternal ()
 
void InitInternal ()
 

额外继承的成员函数

- Protected 属性 继承自 CFileInput
CCriticalSectionm_OpenCS
 
TCHAR m_FileName [MAX_PATH]
 
size_t m_FileNameLen
 
int m_Opened
 
bool m_Valid
 
WORD m_BitsPerSample
 
DWORD m_SampleRate
 
WORD m_Channels
 
DWORD m_Time
 
- Protected 属性 继承自 CStreamedInput
CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_c_wma_input-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CWmaInput 成员列表

成员的完整列表,这些成员属于 CWmaInput,包括所有继承而来的类成员

CFileInput(void) (定义于 CFileInput)CFileInput
CInput(void) (定义于 CInput)CInput
CloseFile() (定义于 CWmaInput)CWmaInputvirtual
CopyData(void *buffer, DWORD size) (定义于 CInput)CInput
CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
CWmaInput(void) (定义于 CWmaInput)CWmaInput
FillBuffer(void *buffer, DWORD size, bool *eof) (定义于 CInput)CInput
Flush() (定义于 CInput)CInput
FlushInternal() (定义于 CFileInput)CFileInputprotectedvirtual
GetBitrate() (定义于 CWmaInput)CWmaInput
GetBitsPerSample() (定义于 CFileInput)CFileInputvirtual
GetChannels() (定义于 CFileInput)CFileInputvirtual
GetData(void **buf, DWORD *Bytes) (定义于 CStreamedInput)CStreamedInput
GetDataInternal(void **buffer, DWORD *bytes) (定义于 CWmaInput)CWmaInputprotectedvirtual
GetFileNameLen() (定义于 CFileInput)CFileInput
GetFormat() (定义于 CWmaInput)CWmaInput
GetFormatsCount() (定义于 CWmaInput)CWmaInput
GetFormatSpec(int index, WMAFormatSpec *pFormatSpec) (定义于 CWmaInput)CWmaInput
GetHasAudio() (定义于 CWmaInput)CWmaInput
GetIsVBR() (定义于 CWmaInput)CWmaInput
GetOpened() (定义于 CFileInput)CFileInput
GetPosition() (定义于 CInput)CInput
GetProtected() (定义于 CWmaInput)CWmaInput
GetSampleRate() (定义于 CFileInput)CFileInputvirtual
GetSize() (定义于 CInput)CInput
GetStream() (定义于 CStreamedInput)CStreamedInputinline
GetTotalSamples() (定义于 CFileInput)CFileInputvirtual
GetTotalTime() (定义于 CFileInput)CFileInputvirtual
GetValid() (定义于 CFileInput)CFileInput
Init() (定义于 CInput)CInput
InitInternal() (定义于 CFileInput)CFileInputprotectedvirtual
Jump(int offset) (定义于 CFileInput)CFileInput
Lock() (定义于 CInput)CInput
m_BitsPerSample (定义于 CFileInput)CFileInputprotected
m_BufferEnd (定义于 CInput)CInputprotected
m_BufferStart (定义于 CInput)CInputprotected
m_Busy (定义于 CInput)CInputprotected
m_Channels (定义于 CFileInput)CFileInputprotected
m_DataCS (定义于 CInput)CInputprotected
m_EndOfStream (定义于 CInput)CInputprotected
m_EndSample (定义于 CStreamedInput)CStreamedInputprotected
m_FileName (定义于 CFileInput)CFileInputprotected
m_FileNameLen (定义于 CFileInput)CFileInputprotected
m_Loop (定义于 CStreamedInput)CStreamedInputprotected
m_OpenCS (定义于 CFileInput)CFileInputprotected
m_Opened (定义于 CFileInput)CFileInputprotected
m_Position (定义于 CInput)CInputprotected
m_pStream (定义于 CStreamedInput)CStreamedInputprotected
m_SampleRate (定义于 CFileInput)CFileInputprotected
m_SampleSize (定义于 CInput)CInputprotected
m_Seekable (定义于 CStreamedInput)CStreamedInputprotected
m_Size (定义于 CInput)CInputprotected
m_StartSample (定义于 CStreamedInput)CStreamedInputprotected
m_StreamAssigned (定义于 CStreamedInput)CStreamedInputprotected
m_Time (定义于 CFileInput)CFileInputprotected
m_TotalSamples (定义于 CStreamedInput)CStreamedInputprotected
m_Valid (定义于 CFileInput)CFileInputprotected
OpenFile() (定义于 CWmaInput)CWmaInputvirtual
Pause() (定义于 CInput)CInputvirtual
Reset() (定义于 CFileInput)CFileInputvirtual
Resume() (定义于 CInput)CInputvirtual
Seek(LARGE_INTEGER *SampleNum) (定义于 CStreamedInput)CStreamedInput
SeekInternal(LARGE_INTEGER *SampleNum) (定义于 CWmaInput)CWmaInputprotectedvirtual
SetEndTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetFileName(TCHAR *pszFileName) (定义于 CFileInput)CFileInput
SetFormat(int iFormat) (定义于 CWmaInput)CWmaInput
SetHighPrecision(bool HighPrecision) (定义于 CWmaInput)CWmaInput
SetOutputChannels(ChannelsNumber OutputChannels) (定义于 CWmaInput)CWmaInput
SetStartTime(DWORD Minutes, DWORD Seconds) (定义于 CFileInput)CFileInput
SetStream(CStream *pStream) (定义于 CFileInput)CFileInputprotectedvirtual
Unlock() (定义于 CInput)CInput
~CFileInput(void) (定义于 CFileInput)CFileInput
~CInput(void) (定义于 CInput)CInput
~CStreamedInput(void) (定义于 CStreamedInput)CStreamedInput
~CWmaInput(void) (定义于 CWmaInput)CWmaInput

================================================ FILE: doc/class_c_wma_input.html ================================================ CZPlayer: CWmaInput类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 CWmaInput 继承关系图:
CFileInput CStreamedInput CInput

Public 成员函数

void OpenFile ()
 
void CloseFile ()
 
void SetHighPrecision (bool HighPrecision)
 
void SetOutputChannels (ChannelsNumber OutputChannels)
 
bool GetHasAudio ()
 
bool GetProtected ()
 
DWORD GetBitrate ()
 
bool GetIsVBR ()
 
DWORD GetFormatsCount ()
 
void GetFormatSpec (int index, WMAFormatSpec *pFormatSpec)
 
void SetFormat (int iFormat)
 
int GetFormat ()
 
- Public 成员函数 继承自 CFileInput
void SetFileName (TCHAR *pszFileName)
 
size_t GetFileNameLen ()
 
WORD GetBitsPerSample ()
 
DWORD GetSampleRate ()
 
WORD GetChannels ()
 
int GetOpened ()
 
bool GetValid ()
 
LARGE_INTEGER GetTotalSamples ()
 
DWORD GetTotalTime ()
 
bool SetStartTime (DWORD Minutes, DWORD Seconds)
 
bool SetEndTime (DWORD Minutes, DWORD Seconds)
 
void Reset ()
 
void Jump (int offset)
 
- Public 成员函数 继承自 CStreamedInput
void GetData (void **buf, DWORD *Bytes)
 
bool Seek (LARGE_INTEGER *SampleNum)
 
CStreamGetStream ()
 
- Public 成员函数 继承自 CInput
virtual void Pause ()
 
virtual void Resume ()
 
LARGE_INTEGER GetSize ()
 
LARGE_INTEGER GetPosition ()
 
void GetData (void **buffer, DWORD *size)
 
DWORD CopyData (void *buffer, DWORD size)
 
DWORD FillBuffer (void *buffer, DWORD size, bool *eof)
 
void Init ()
 
void Flush ()
 
void Lock ()
 
void Unlock ()
 

Protected 成员函数

void GetDataInternal (void **buffer, DWORD *bytes)
 
bool SeekInternal (LARGE_INTEGER *SampleNum)
 
- Protected 成员函数 继承自 CFileInput
void SetStream (CStream *pStream)
 
void FlushInternal ()
 
void InitInternal ()
 

额外继承的成员函数

- Protected 属性 继承自 CFileInput
CCriticalSectionm_OpenCS
 
TCHAR m_FileName [MAX_PATH]
 
size_t m_FileNameLen
 
int m_Opened
 
bool m_Valid
 
WORD m_BitsPerSample
 
DWORD m_SampleRate
 
WORD m_Channels
 
DWORD m_Time
 
- Protected 属性 继承自 CStreamedInput
CStreamm_pStream
 
bool m_StreamAssigned
 
bool m_Seekable
 
LARGE_INTEGER m_StartSample
 
LARGE_INTEGER m_EndSample
 
bool m_Loop
 
LARGE_INTEGER m_TotalSamples
 
- Protected 属性 继承自 CInput
LARGE_INTEGER m_Position
 
LARGE_INTEGER m_Size
 
WORD m_SampleSize
 
bool m_Busy
 
DWORD m_BufferStart
 
DWORD m_BufferEnd
 
CCriticalSectionm_DataCS
 
bool m_EndOfStream
 

================================================ FILE: doc/class_collection_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CollectionPanel 成员列表

成员的完整列表,这些成员属于 CollectionPanel,包括所有继承而来的类成员

CollectionPanel(QWidget *parent=NULL)CollectionPanel
~CollectionPanel()CollectionPanel

================================================ FILE: doc/class_collection_panel.html ================================================ CZPlayer: CollectionPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CollectionPanel类 参考

#include <CollectionPanel.h>

类 CollectionPanel 继承关系图:

Public 成员函数

 CollectionPanel (QWidget *parent=NULL)
 
 ~CollectionPanel ()
 

详细描述

收藏面板

构造及析构函数说明

CollectionPanel::CollectionPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
CollectionPanel::~CollectionPanel ( )

析构函数.


================================================ FILE: doc/class_config_dialog-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ConfigDialog 成员列表

成员的完整列表,这些成员属于 ConfigDialog,包括所有继承而来的类成员

closeEvent(QCloseEvent *event)ConfigDialogprotectedvirtual
ConfigDialog(QWidget *parent=NULL)ConfigDialog
init()ConfigDialog
sigConfigDialogClosed()ConfigDialogsignal
~ConfigDialog()ConfigDialog

================================================ FILE: doc/class_config_dialog.html ================================================ CZPlayer: ConfigDialog类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <ConfigDialog.h>

类 ConfigDialog 继承关系图:

信号

void sigConfigDialogClosed ()
 

Public 成员函数

 ConfigDialog (QWidget *parent=NULL)
 
 ~ConfigDialog ()
 
void init ()
 

Protected 成员函数

virtual void closeEvent (QCloseEvent *event)
 

详细描述

配置对话框

构造及析构函数说明

ConfigDialog::ConfigDialog ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
ConfigDialog::~ConfigDialog ( )

析构函数.

成员函数说明

void ConfigDialog::closeEvent ( QCloseEvent *  event)
protectedvirtual

虚函数,重新实现closeEvent函数

参数
eventQPaintEvent类型
void ConfigDialog::init ( )

初始化配置界面

void ConfigDialog::sigConfigDialogClosed ( )
signal

配置对话框关闭


================================================ FILE: doc/class_d_b_module-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DBModule 成员列表

成员的完整列表,这些成员属于 DBModule,包括所有继承而来的类成员

clearDB()DBModulestatic
createConnection()DBModulestatic
createTable()DBModulestatic
delLine(const QString &fileName)DBModulestatic
initDB()DBModulestatic
insertLine(const QString &fileName, const QString &time, const QString &filePath)DBModulestatic
readAlbumUrlPathFromDB(const QString &fileName, QString &albumUrlPath)DBModulestatic
readFilePath(QStringList &list)DBModulestatic
readMusicInfoEntity(QList< MusicInfoEntity > &list)DBModulestatic
readMusicListSaveFormatEntity(QList< MusicListSaveFormatEntity > &list)DBModulestatic
updateAlbumUrlPath(const QString &fileName, const QString &albumUrlPath)DBModulestatic

================================================ FILE: doc/class_d_b_module.html ================================================ CZPlayer: DBModule类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

静态 Public 成员函数

static void initDB ()
 
static bool createConnection ()
 
static void createTable ()
 
static bool readFilePath (QStringList &list)
 
static bool readMusicListSaveFormatEntity (QList< MusicListSaveFormatEntity > &list)
 
static bool readMusicInfoEntity (QList< MusicInfoEntity > &list)
 
static bool clearDB ()
 
static bool delLine (const QString &fileName)
 
static bool insertLine (const QString &fileName, const QString &time, const QString &filePath)
 
static bool updateAlbumUrlPath (const QString &fileName, const QString &albumUrlPath)
 
static bool readAlbumUrlPathFromDB (const QString &fileName, QString &albumUrlPath)
 

成员函数说明

bool DBModule::clearDB ( )
static

清空数据库

返回
true代表成功,否则失败
bool DBModule::createConnection ( )
static

连接数据库

返回
true代表成功,否则失败
void DBModule::createTable ( )
static

创建表

bool DBModule::delLine ( const QString &  fileName)
static

删除一条记录

参数
fileName文件名
返回
true代表成功,否则失败
void DBModule::initDB ( )
static

初始化数据库

bool DBModule::insertLine ( const QString &  fileName,
const QString &  time,
const QString &  filePath 
)
static

插入一行记录

参数
fileName文件名
time播放时间
filePath文件路径
返回
true代表成功,否则失败
bool DBModule::readAlbumUrlPathFromDB ( const QString &  fileName,
QString &  albumUrlPath 
)
static

从数据库中读出歌曲名对应的专辑url

参数
fileName文件名
albumUrlPath专辑url
返回
true代表成功,否则失败
bool DBModule::readFilePath ( QStringList &  list)
static

从数据库中读出数据显示到音乐里列表中

参数
list文件路径
返回
true代表成功,否则失败
bool DBModule::readMusicInfoEntity ( QList< MusicInfoEntity > &  list)
static

从数据库读取音乐信息

参数
list音乐信息集合
返回
true代表成功,否则失败
bool DBModule::readMusicListSaveFormatEntity ( QList< MusicListSaveFormatEntity > &  list)
static

从数据库中读出数据显示到m3u文件中

参数
list音乐列表格式集合
返回
true代表成功,否则失败
bool DBModule::updateAlbumUrlPath ( const QString &  fileName,
const QString &  albumUrlPath 
)
static

更新专辑url

参数
fileName文件名
albumUrlPath专辑url
返回
true代表成功,否则失败

================================================ FILE: doc/class_d_s___start_buffer_helper-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_StartBufferHelper 成员列表

成员的完整列表,这些成员属于 DS_StartBufferHelper,包括所有继承而来的类成员

data (定义于 DS_StartBufferHelper)DS_StartBufferHelperprotected
DS_StartBufferHelper() (定义于 DS_StartBufferHelper)DS_StartBufferHelperinlineprotected
isInitialized() (定义于 DS_StartBufferHelper)DS_StartBufferHelperinlinestatic
StartBuffer(DS_Info *info) (定义于 DS_StartBufferHelper)DS_StartBufferHelperstatic
ThreadProc(void *param) (定义于 DS_StartBufferHelper)DS_StartBufferHelperprotectedstatic

================================================ FILE: doc/class_d_s___start_buffer_helper.html ================================================ CZPlayer: DS_StartBufferHelper类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

class  Data
 

静态 Public 成员函数

static HRESULT StartBuffer (DS_Info *info)
 
static bool isInitialized ()
 

静态 Protected 成员函数

static DWORD WINAPI __stdcall ThreadProc (void *param)
 

Protected 属性

class DS_StartBufferHelper::Data data
 

================================================ FILE: doc/class_d_s___start_buffer_helper_1_1_data-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_StartBufferHelper::Data 成员列表

================================================ FILE: doc/class_d_s___start_buffer_helper_1_1_data.html ================================================ CZPlayer: DS_StartBufferHelper::Data类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_StartBufferHelper::Data类 参考

Public 属性

CRITICAL_SECTION crit_sect
 
volatile HANDLE threadHandle
 
volatile HANDLE startEvent
 
volatile HANDLE startedEvent
 
volatile DS_Infoline2Start
 
volatile HRESULT startResult
 

================================================ FILE: doc/class_download_list_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadListPanel 成员列表

成员的完整列表,这些成员属于 DownloadListPanel,包括所有继承而来的类成员

DownloadListPanel(QWidget *parent=NULL)DownloadListPanel
~DownloadListPanel()DownloadListPanel

================================================ FILE: doc/class_download_list_panel.html ================================================ CZPlayer: DownloadListPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadListPanel类 参考

#include <DownloadListPanel.h>

类 DownloadListPanel 继承关系图:

Public 成员函数

 DownloadListPanel (QWidget *parent=NULL)
 
 ~DownloadListPanel ()
 

详细描述

下载面板

构造及析构函数说明

DownloadListPanel::DownloadListPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
DownloadListPanel::~DownloadListPanel ( )

析构函数.


================================================ FILE: doc/class_download_settings_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadSettingsPage 成员列表

================================================ FILE: doc/class_download_settings_page.html ================================================ CZPlayer: DownloadSettingsPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DownloadSettingsPage类 参考

#include <DownloadSettingsPage.h>

类 DownloadSettingsPage 继承关系图:

信号

void sigDownloadSettingsChanged ()
 

Public 成员函数

 DownloadSettingsPage (QWidget *parent=NULL)
 
 ~DownloadSettingsPage ()
 
void init ()
 
void apply ()
 

详细描述

下载设置页面

构造及析构函数说明

DownloadSettingsPage::DownloadSettingsPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
DownloadSettingsPage::~DownloadSettingsPage ( )

析构函数.

成员函数说明

void DownloadSettingsPage::apply ( )

应用改变

void DownloadSettingsPage::init ( )

初始页面

void DownloadSettingsPage::sigDownloadSettingsChanged ( )
signal

当下载界面配置信息发生改变时发送该信号


================================================ FILE: doc/class_edit_hotkey_dialog-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
EditHotkeyDialog 成员列表

成员的完整列表,这些成员属于 EditHotkeyDialog,包括所有继承而来的类成员

EditHotkeyDialog(QWidget *parent=NULL)EditHotkeyDialog
eventFilter(QObject *target, QEvent *event)EditHotkeyDialogprotectedvirtual
init(const QString &currentHotKeyName, const QString &currentHotKey)EditHotkeyDialog
sigEditHotkeyFinished(const QString &hotKeyName, const QString &hotKey)EditHotkeyDialogsignal
~EditHotkeyDialog()EditHotkeyDialog

================================================ FILE: doc/class_edit_hotkey_dialog.html ================================================ CZPlayer: EditHotkeyDialog类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <EditHotkeyDialog.h>

类 EditHotkeyDialog 继承关系图:

信号

void sigEditHotkeyFinished (const QString &hotKeyName, const QString &hotKey)
 

Public 成员函数

 EditHotkeyDialog (QWidget *parent=NULL)
 
 ~EditHotkeyDialog ()
 
void init (const QString &currentHotKeyName, const QString &currentHotKey)
 

Protected 成员函数

virtual bool eventFilter (QObject *target, QEvent *event)
 

详细描述

热键编辑对话框

构造及析构函数说明

EditHotkeyDialog::EditHotkeyDialog ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
EditHotkeyDialog::~EditHotkeyDialog ( )

析构函数.

成员函数说明

bool EditHotkeyDialog::eventFilter ( QObject *  target,
QEvent *  event 
)
protectedvirtual

虚函数,重新实现eventFilter函数

参数
targetQObject类型
eventQEvent类型 返回true代表不过滤该事件
void EditHotkeyDialog::init ( const QString &  currentHotKeyName,
const QString &  currentHotKey 
)

初始化界面

参数
currentHotKeyName当前热键名称
currentHotKey当前热键
void EditHotkeyDialog::sigEditHotkeyFinished ( const QString &  hotKeyName,
const QString &  hotKey 
)
signal

热键编辑完成

参数
hotKeyName热键名
hotKey热键

================================================ FILE: doc/class_general_settings_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GeneralSettingsPage 成员列表

================================================ FILE: doc/class_general_settings_page.html ================================================ CZPlayer: GeneralSettingsPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GeneralSettingsPage类 参考

#include <GeneralSettingsPage.h>

类 GeneralSettingsPage 继承关系图:

信号

void sigGeneralSettingsChanged ()
 

Public 成员函数

 GeneralSettingsPage (QWidget *parent=NULL)
 
 ~GeneralSettingsPage ()
 
void init ()
 
void apply ()
 

详细描述

一般设置页面

构造及析构函数说明

GeneralSettingsPage::GeneralSettingsPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
GeneralSettingsPage::~GeneralSettingsPage ( )

析构函数.

成员函数说明

void GeneralSettingsPage::apply ( )

应用改变

void GeneralSettingsPage::init ( )

初始页面

void GeneralSettingsPage::sigGeneralSettingsChanged ( )
signal

当常规界面配置信息发生改变时发送该信号


================================================ FILE: doc/class_global_config-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalConfig 成员列表

成员的完整列表,这些成员属于 GlobalConfig,包括所有继承而来的类成员

albumPath() const GlobalConfig
autoGreetings() const GlobalConfig
autoPlayMusic() const GlobalConfig
autoRunPlayer() const GlobalConfig
defaultChoiceColor() const GlobalConfig
defaultPlayer() const GlobalConfig
delInstance()GlobalConfigstatic
fontName() const GlobalConfig
fontSize() const GlobalConfig
fontType() const GlobalConfig
instance()GlobalConfigstatic
lastHotKey() const GlobalConfig
lrcPath() const GlobalConfig
minToTrayHotKey() const GlobalConfig
musicPath() const GlobalConfig
mute() const GlobalConfig
nextHotKey() const GlobalConfig
noPlayShang() const GlobalConfig
noPlayXia() const GlobalConfig
noPlayZhong() const GlobalConfig
openListWidgetHotKey() const GlobalConfig
openLrcHotKey() const GlobalConfig
openMediaWidgetHotKey() const GlobalConfig
openMinWidgetHotKey() const GlobalConfig
openMusicFileHotKey() const GlobalConfig
pauseHotKey() const GlobalConfig
playedShang() const GlobalConfig
playedXia() const GlobalConfig
playedZhong() const GlobalConfig
playMode() const GlobalConfig
reload()GlobalConfig
save()GlobalConfig
setAlbumPath(const QString &path)GlobalConfig
setAutoGreetings(bool isAutoGrettings)GlobalConfig
setAutoPlayMusic(bool isAutoPlayMusic)GlobalConfig
setAutoRunPlayer(bool isAutoRunPlayer)GlobalConfig
setDefaultChoiceColor(const QString &color)GlobalConfig
setDefaultPlayer(bool isDefaultPlayer)GlobalConfig
setFontName(const QString &fontName)GlobalConfig
setFontSize(const QString &fontSize)GlobalConfig
setFontType(const QString &fontType)GlobalConfig
setLastHotKey(const QString &hotKey)GlobalConfig
setLrcPath(const QString &path)GlobalConfig
setMinToTrayHotKey(const QString &hotKey)GlobalConfig
setMusicPath(const QString &path)GlobalConfig
setMute(const bool &isMute)GlobalConfig
setNextHotKey(const QString &hotKey)GlobalConfig
setNoPlayShang(const QColor &color)GlobalConfig
setNoPlayXia(const QColor &color)GlobalConfig
setNoPlayZhong(const QColor &color)GlobalConfig
setOpenListWidgetHotKey(const QString &hotKey)GlobalConfig
setOpenLrcHotKey(const QString &hotKey)GlobalConfig
setOpenMediaWidgetHotKey(const QString &hotKey)GlobalConfig
setOpenMinWidgetHotKey(const QString &hotKey)GlobalConfig
setOpenMusicFileHotKey(const QString &hotKey)GlobalConfig
setPauseHotKey(const QString &hotKey)GlobalConfig
setPlayedShang(const QColor &color)GlobalConfig
setPlayedXia(const QColor &color)GlobalConfig
setPlayedZhong(const QColor &color)GlobalConfig
setPlayMode(enum PlayModeType playMode)GlobalConfig
setReleaseResource(const bool &isReleaseResource)GlobalConfig
setSettingsHotKey(const QString &hotKey)GlobalConfig
setShadow(const int &shadow)GlobalConfig
settingsHotKey() const GlobalConfig
setVolume(const int &volume)GlobalConfig
shadow() const GlobalConfig
sigAlbumPathChanged(const QString &path)GlobalConfigsignal
sigAutoGreetingsChanged(bool isAutoGrettings)GlobalConfigsignal
sigAutoPlayMusicChanged(bool isAutoPlayMusic)GlobalConfigsignal
sigAutoRunPlayerChanged(bool isAutoRunPlayer)GlobalConfigsignal
sigDefaultChoiceColorChanged(const QString &color)GlobalConfigsignal
sigDefaultPlayerChanged(bool isDefaultPlayer)GlobalConfigsignal
sigFontNameChanged(const QString &fontName)GlobalConfigsignal
sigFontSizeChanged(const QString &fontSize)GlobalConfigsignal
sigFontTypeChanged(const QString &fontType)GlobalConfigsignal
sigLastHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigLrcPathChanged(const QString &path)GlobalConfigsignal
sigMinToTrayHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigMusicPathChanged(const QString &path)GlobalConfigsignal
sigMuteChanged(const bool &isMute)GlobalConfigsignal
sigNextHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigNoPlayShangChanged(const QColor &color)GlobalConfigsignal
sigNoPlayXiaChanged(const QColor &color)GlobalConfigsignal
sigNoPlayZhongChanged(const QColor &color)GlobalConfigsignal
sigOpenListWidgetHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigOpenLrcHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigOpenMediaWidgetHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigOpenMinWidgetHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigOpenMusicFileHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigPauseHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigPlayedShangChanged(const QColor &color)GlobalConfigsignal
sigPlayedXiaChanged(const QColor &color)GlobalConfigsignal
sigPlayedZhongChanged(const QColor &color)GlobalConfigsignal
sigPlayModeChanged(enum PlayModeType playMode)GlobalConfigsignal
sigSettingsHotKeyChanged(const QString &hotKey)GlobalConfigsignal
sigShadowChanged(const int &shadow)GlobalConfigsignal
sigVolumeChanged(const int &volume)GlobalConfigsignal
volume() const GlobalConfig

================================================ FILE: doc/class_global_config.html ================================================ CZPlayer: GlobalConfig类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <GlobalConfig.h>

类 GlobalConfig 继承关系图:

信号

void sigAutoPlayMusicChanged (bool isAutoPlayMusic)
 
void sigAutoRunPlayerChanged (bool isAutoRunPlayer)
 
void sigAutoGreetingsChanged (bool isAutoGrettings)
 
void sigDefaultPlayerChanged (bool isDefaultPlayer)
 
void sigMusicPathChanged (const QString &path)
 
void sigAlbumPathChanged (const QString &path)
 
void sigLrcPathChanged (const QString &path)
 
void sigSettingsHotKeyChanged (const QString &hotKey)
 
void sigMinToTrayHotKeyChanged (const QString &hotKey)
 
void sigOpenMinWidgetHotKeyChanged (const QString &hotKey)
 
void sigOpenMusicFileHotKeyChanged (const QString &hotKey)
 
void sigOpenMediaWidgetHotKeyChanged (const QString &hotKey)
 
void sigOpenListWidgetHotKeyChanged (const QString &hotKey)
 
void sigOpenLrcHotKeyChanged (const QString &hotKey)
 
void sigPauseHotKeyChanged (const QString &hotKey)
 
void sigLastHotKeyChanged (const QString &hotKey)
 
void sigNextHotKeyChanged (const QString &hotKey)
 
void sigFontNameChanged (const QString &fontName)
 
void sigFontSizeChanged (const QString &fontSize)
 
void sigFontTypeChanged (const QString &fontType)
 
void sigNoPlayShangChanged (const QColor &color)
 
void sigNoPlayZhongChanged (const QColor &color)
 
void sigNoPlayXiaChanged (const QColor &color)
 
void sigPlayedShangChanged (const QColor &color)
 
void sigPlayedZhongChanged (const QColor &color)
 
void sigPlayedXiaChanged (const QColor &color)
 
void sigDefaultChoiceColorChanged (const QString &color)
 
void sigShadowChanged (const int &shadow)
 
void sigMuteChanged (const bool &isMute)
 
void sigVolumeChanged (const int &volume)
 
void sigPlayModeChanged (enum PlayModeType playMode)
 

Public 成员函数

bool reload ()
 
bool save ()
 
void setReleaseResource (const bool &isReleaseResource)
 
void setAutoPlayMusic (bool isAutoPlayMusic)
 
void setAutoRunPlayer (bool isAutoRunPlayer)
 
void setAutoGreetings (bool isAutoGrettings)
 
void setDefaultPlayer (bool isDefaultPlayer)
 
bool autoPlayMusic () const
 
bool autoRunPlayer () const
 
bool autoGreetings () const
 
bool defaultPlayer () const
 
void setMusicPath (const QString &path)
 
void setAlbumPath (const QString &path)
 
void setLrcPath (const QString &path)
 
QString musicPath () const
 
QString albumPath () const
 
QString lrcPath () const
 
void setSettingsHotKey (const QString &hotKey)
 
void setMinToTrayHotKey (const QString &hotKey)
 
void setOpenMinWidgetHotKey (const QString &hotKey)
 
void setOpenMusicFileHotKey (const QString &hotKey)
 
void setOpenMediaWidgetHotKey (const QString &hotKey)
 
void setOpenListWidgetHotKey (const QString &hotKey)
 
void setOpenLrcHotKey (const QString &hotKey)
 
void setPauseHotKey (const QString &hotKey)
 
void setLastHotKey (const QString &hotKey)
 
void setNextHotKey (const QString &hotKey)
 
QString settingsHotKey () const
 
QString minToTrayHotKey () const
 
QString openMinWidgetHotKey () const
 
QString openMusicFileHotKey () const
 
QString openMediaWidgetHotKey () const
 
QString openListWidgetHotKey () const
 
QString openLrcHotKey () const
 
QString pauseHotKey () const
 
QString lastHotKey () const
 
QString nextHotKey () const
 
void setFontName (const QString &fontName)
 
void setFontSize (const QString &fontSize)
 
void setFontType (const QString &fontType)
 
void setNoPlayShang (const QColor &color)
 
void setNoPlayZhong (const QColor &color)
 
void setNoPlayXia (const QColor &color)
 
void setPlayedShang (const QColor &color)
 
void setPlayedZhong (const QColor &color)
 
void setPlayedXia (const QColor &color)
 
void setDefaultChoiceColor (const QString &color)
 
void setShadow (const int &shadow)
 
QString fontName () const
 
QString fontSize () const
 
QString fontType () const
 
QColor noPlayShang () const
 
QColor noPlayZhong () const
 
QColor noPlayXia () const
 
QColor playedShang () const
 
QColor playedZhong () const
 
QColor playedXia () const
 
QString defaultChoiceColor () const
 
int shadow () const
 
void setMute (const bool &isMute)
 
void setVolume (const int &volume)
 
void setPlayMode (enum PlayModeType playMode)
 
bool mute () const
 
int volume () const
 
enum PlayModeType playMode () const
 

静态 Public 成员函数

static GlobalConfiginstance ()
 
static void delInstance ()
 

详细描述

全局配置

成员函数说明

QString GlobalConfig::albumPath ( ) const

得到专辑路径

返回
专辑路径
bool GlobalConfig::autoGreetings ( ) const

是否启动播放器时是否自动打招呼

返回
true代表自动打招呼,否则不是
bool GlobalConfig::autoPlayMusic ( ) const

是否启动播放器时自动播放音乐

返回
true代表自动播放,否则不是
bool GlobalConfig::autoRunPlayer ( ) const

是否开机是否自动运行播放器

返回
true代表自动运行,否则不是
QString GlobalConfig::defaultChoiceColor ( ) const

得到歌词默认颜色

返回
颜色
bool GlobalConfig::defaultPlayer ( ) const

是否为默认播放器

返回
true代表默认播放器,否则不是
void GlobalConfig::delInstance ( )
static

删除全局对象

注解
请一定在程序退出前调用 delInstance() ,否则将导致程序混乱
QString GlobalConfig::fontName ( ) const

得到歌词字体

返回
字体名称
QString GlobalConfig::fontSize ( ) const

得到歌词字体大小

返回
字体大小
QString GlobalConfig::fontType ( ) const

得到歌词类型

返回
歌词类型
GlobalConfig * GlobalConfig::instance ( )
static

获取全局对象

返回
返回从注册表加载信息配置对象
QString GlobalConfig::lastHotKey ( ) const

得到上一首热键改变

返回
上一首热键
QString GlobalConfig::lrcPath ( ) const

得到歌词路径

返回
歌词路径
QString GlobalConfig::minToTrayHotKey ( ) const

得到显示/隐藏主界面热键

返回
显示/隐藏主界面热键
QString GlobalConfig::musicPath ( ) const

得到音乐路径

返回
音乐路径
bool GlobalConfig::mute ( ) const

是否静音

返回
true代表静音,否则不静音
QString GlobalConfig::nextHotKey ( ) const

得到下一首热键改变

返回
下一首热键
QColor GlobalConfig::noPlayShang ( ) const

得到歌词没有播放上边缘颜色

返回
颜色
QColor GlobalConfig::noPlayXia ( ) const

得到歌词没有播放下边缘颜色

返回
颜色
QColor GlobalConfig::noPlayZhong ( ) const

得到歌词没有播放中间颜色

返回
颜色
QString GlobalConfig::openListWidgetHotKey ( ) const

得到显示/隐藏歌曲列表热键

返回
显示/隐藏歌曲列表热键
QString GlobalConfig::openLrcHotKey ( ) const

得到显示/隐藏桌面歌词热键

返回
显示/隐藏桌面歌词热键
QString GlobalConfig::openMediaWidgetHotKey ( ) const

得到显示/隐藏媒体面板热键

返回
显示/隐藏下载列表热键
QString GlobalConfig::openMinWidgetHotKey ( ) const

得到迷你模式/正常窗口热键

返回
迷你模式/正常窗口热键
QString GlobalConfig::openMusicFileHotKey ( ) const

得到打开音乐文件热键

返回
打开音乐文件热键
QString GlobalConfig::pauseHotKey ( ) const

得到播放/暂停热键改变

返回
播放/暂停热键
QColor GlobalConfig::playedShang ( ) const

得到歌词播放后上边缘颜色

返回
颜色
QColor GlobalConfig::playedXia ( ) const

得到歌词播放后下边缘颜色

返回
颜色
QColor GlobalConfig::playedZhong ( ) const

得到歌词播放后中间颜色

返回
颜色
enum PlayModeType GlobalConfig::playMode ( ) const

得到播放类型

返回
播放类型
bool GlobalConfig::reload ( )

重新加载配置信息

返回
true代表成功,否则失败
bool GlobalConfig::save ( )

保存配置信息

返回
true代表成功,否则失败
void GlobalConfig::setAlbumPath ( const QString &  path)

设置专辑路径

参数
path专辑路径
void GlobalConfig::setAutoGreetings ( bool  isAutoGrettings)

设置启动播放器时是否自动打招呼

参数
isAutoGrettingstrue代表自动打招呼,否则取消
void GlobalConfig::setAutoPlayMusic ( bool  isAutoPlayMusic)

设置启动播放器时是否自动播放音乐

参数
isAutoPlayMusictrue代表自动播放,否则取消
void GlobalConfig::setAutoRunPlayer ( bool  isAutoRunPlayer)

设置开机是否自动运行播放器

参数
isAutoRunPlayertrue代表自动运行,否则取消
void GlobalConfig::setDefaultChoiceColor ( const QString &  color)

设置歌词默认颜色颜色

参数
color颜色
void GlobalConfig::setDefaultPlayer ( bool  isDefaultPlayer)

设置为默认播放器

参数
isDefaultPlayertrue代表设置为默认播放器,否则取消
void GlobalConfig::setFontName ( const QString &  fontName)

设置歌词字体

参数
fontName字体名称
void GlobalConfig::setFontSize ( const QString &  fontSize)

设置歌词字体大小

参数
fontSize字体大小
void GlobalConfig::setFontType ( const QString &  fontType)

设置歌词类型

参数
fontType歌词类型
void GlobalConfig::setLastHotKey ( const QString &  hotKey)

设置上一首热键

参数
hotKey上一首热键
void GlobalConfig::setLrcPath ( const QString &  path)

保存歌词路径

参数
path歌词路径
void GlobalConfig::setMinToTrayHotKey ( const QString &  hotKey)

设置显示/隐藏主界面热键

参数
hotKey显示/隐藏主界面热键
void GlobalConfig::setMusicPath ( const QString &  path)

设置音乐路径

参数
path音乐路径
void GlobalConfig::setMute ( const bool &  isMute)

设置是否静音

参数
isMutetrue代表静音,否则不静音
void GlobalConfig::setNextHotKey ( const QString &  hotKey)

设置下一首热键

参数
hotKey下一首热键
void GlobalConfig::setNoPlayShang ( const QColor &  color)

设置歌词没有播放上边缘颜色

参数
color颜色
void GlobalConfig::setNoPlayXia ( const QColor &  color)

设置歌词没有播放下边缘颜色

参数
color颜色
void GlobalConfig::setNoPlayZhong ( const QColor &  color)

设置歌词没有播放中间颜色

参数
color颜色
void GlobalConfig::setOpenListWidgetHotKey ( const QString &  hotKey)

设置显示/隐藏歌曲列表热键

参数
hotKey显示/隐藏歌曲列表热键
void GlobalConfig::setOpenLrcHotKey ( const QString &  hotKey)

设置显示/隐藏桌面歌词热键

参数
hotKey显示/隐藏桌面歌词热键
void GlobalConfig::setOpenMediaWidgetHotKey ( const QString &  hotKey)

设置显示/隐藏媒体面板热键

参数
hotKey显示/隐藏下载列表热键
void GlobalConfig::setOpenMinWidgetHotKey ( const QString &  hotKey)

设置迷你模式/正常窗口热键

参数
hotKey迷你模式/正常窗口热键
void GlobalConfig::setOpenMusicFileHotKey ( const QString &  hotKey)

设置打开音乐文件热键

参数
hotKey打开音乐文件热键
void GlobalConfig::setPauseHotKey ( const QString &  hotKey)

设置播放/暂停热键

参数
hotKey播放/暂停热键
void GlobalConfig::setPlayedShang ( const QColor &  color)

设置歌词播放后上边缘颜色

参数
color颜色
void GlobalConfig::setPlayedXia ( const QColor &  color)

设置歌词播放后下边缘颜色

参数
color颜色
void GlobalConfig::setPlayedZhong ( const QColor &  color)

设置歌词播放后中间颜色

参数
color颜色
void GlobalConfig::setPlayMode ( enum PlayModeType  playMode)

播放模式

参数
playMode播放模式
void GlobalConfig::setReleaseResource ( const bool &  isReleaseResource)

是否程序正在析构,主程序调用

返回
isReleaseResource代表正在析构,否则没有正在析构
void GlobalConfig::setSettingsHotKey ( const QString &  hotKey)

设置选项设置热键

参数
hotKey选项设置热键
void GlobalConfig::setShadow ( const int &  shadow)

设置歌词灰度

参数
shadow灰度
QString GlobalConfig::settingsHotKey ( ) const

得到选项设置热键

返回
选项设置热键
void GlobalConfig::setVolume ( const int &  volume)

设置音量

参数
volume音量
int GlobalConfig::shadow ( ) const

得到歌词灰度

返回
灰度
void GlobalConfig::sigAlbumPathChanged ( const QString &  path)
signal

专辑路径改变

参数
path专辑路径
void GlobalConfig::sigAutoGreetingsChanged ( bool  isAutoGrettings)
signal

启动播放器时是否自动打招呼设置改变

参数
isAutoGrettingstrue代表自动打招呼,否则取消
void GlobalConfig::sigAutoPlayMusicChanged ( bool  isAutoPlayMusic)
signal

自动播放音乐设置改变

参数
isAutoPlayMusictrue代表自动播放,否则取消
void GlobalConfig::sigAutoRunPlayerChanged ( bool  isAutoRunPlayer)
signal

开机是否自动运行播放器设置改变

参数
isAutoRunPlayertrue代表自动运行,否则取消
void GlobalConfig::sigDefaultChoiceColorChanged ( const QString &  color)
signal

歌词默认颜色改变

参数
color颜色
void GlobalConfig::sigDefaultPlayerChanged ( bool  isDefaultPlayer)
signal

默认播放器设置改变

参数
isDefaultPlayertrue代表设置为默认播放器,否则取消
void GlobalConfig::sigFontNameChanged ( const QString &  fontName)
signal

歌词字体改变

参数
fontName字体名称
void GlobalConfig::sigFontSizeChanged ( const QString &  fontSize)
signal

歌词字体大小改变

参数
fontSize字体大小
void GlobalConfig::sigFontTypeChanged ( const QString &  fontType)
signal

歌词类型改变

参数
fontType歌词类型
void GlobalConfig::sigLastHotKeyChanged ( const QString &  hotKey)
signal

上一首热键改变

参数
hotKey上一首热键
void GlobalConfig::sigLrcPathChanged ( const QString &  path)
signal

歌词路径改变

参数
path歌词路径
void GlobalConfig::sigMinToTrayHotKeyChanged ( const QString &  hotKey)
signal

显示/隐藏主界面热键改变

参数
hotKey显示/隐藏主界面热键
void GlobalConfig::sigMusicPathChanged ( const QString &  path)
signal

音乐路径改变

参数
path音乐路径
void GlobalConfig::sigMuteChanged ( const bool &  isMute)
signal

是否静音设置改变

参数
isMutetrue代表静音,否则不静音
void GlobalConfig::sigNextHotKeyChanged ( const QString &  hotKey)
signal

下一首热键改变

参数
hotKey下一首热键
void GlobalConfig::sigNoPlayShangChanged ( const QColor &  color)
signal

歌词没有播放上边缘颜色改变

参数
color颜色
void GlobalConfig::sigNoPlayXiaChanged ( const QColor &  color)
signal

歌词没有播放下边缘颜色改变

参数
color颜色
void GlobalConfig::sigNoPlayZhongChanged ( const QColor &  color)
signal

歌词没有播放中间颜色改变

参数
color颜色
void GlobalConfig::sigOpenListWidgetHotKeyChanged ( const QString &  hotKey)
signal

显示/隐藏歌曲列表热键改变

参数
hotKey显示/隐藏歌曲列表热键
void GlobalConfig::sigOpenLrcHotKeyChanged ( const QString &  hotKey)
signal

显示/隐藏桌面歌词热键改变

参数
hotKey显示/隐藏桌面歌词热键
void GlobalConfig::sigOpenMediaWidgetHotKeyChanged ( const QString &  hotKey)
signal

显示/隐藏媒体面板热键改变

参数
hotKey显示/隐藏下载列表热键
void GlobalConfig::sigOpenMinWidgetHotKeyChanged ( const QString &  hotKey)
signal

迷你模式/正常窗口热键改变

参数
hotKey迷你模式/正常窗口热键
void GlobalConfig::sigOpenMusicFileHotKeyChanged ( const QString &  hotKey)
signal

打开音乐文件热键改变

参数
hotKey打开音乐文件热键
void GlobalConfig::sigPauseHotKeyChanged ( const QString &  hotKey)
signal

播放/暂停热键改变

参数
hotKey播放/暂停热键
void GlobalConfig::sigPlayedShangChanged ( const QColor &  color)
signal

歌词播放后上边缘颜色改变

参数
color颜色
void GlobalConfig::sigPlayedXiaChanged ( const QColor &  color)
signal

歌词播放后下边缘颜色改变

参数
color颜色
void GlobalConfig::sigPlayedZhongChanged ( const QColor &  color)
signal

歌词播放后中间颜色改变

参数
color颜色
void GlobalConfig::sigPlayModeChanged ( enum PlayModeType  playMode)
signal

播放类型改变

参数
playMode播放类型
void GlobalConfig::sigSettingsHotKeyChanged ( const QString &  hotKey)
signal

选项设置热键改变

参数
hotKey选项设置热键
void GlobalConfig::sigShadowChanged ( const int &  shadow)
signal

歌词灰度改变

参数
shadow灰度
void GlobalConfig::sigVolumeChanged ( const int &  volume)
signal

音量是否改变

参数
volume音量
int GlobalConfig::volume ( ) const

得到音量

返回
音量

================================================ FILE: doc/class_global_hot_key-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalHotKey 成员列表

成员的完整列表,这些成员属于 GlobalHotKey,包括所有继承而来的类成员

GlobalHotKey(QObject *parent=NULL)GlobalHotKey
setConfigOptionsHotkeyWork(const bool &isWork)GlobalHotKey
setLastHotkeyWork(const bool &isWork)GlobalHotKey
setMinMainWidgetHotkeyWork(const bool &isWork)GlobalHotKey
setNextHotkeyWork(const bool &isWork)GlobalHotKey
setOpenMusicfileHotkeyWork(const bool &isWork)GlobalHotKey
setPlayPauseHotkeyWork(const bool &isWork)GlobalHotKey
setShowDownloadHotkeyWork(const bool &isWork)GlobalHotKey
setShowHideMainWidgetHotkeyWork(const bool &isWork)GlobalHotKey
setShowLrcHotkeyWork(const bool &isWork)GlobalHotKey
setShowMusicListHotkeyWork(const bool &isWork)GlobalHotKey
~GlobalHotKey()GlobalHotKey

================================================ FILE: doc/class_global_hot_key.html ================================================ CZPlayer: GlobalHotKey类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
GlobalHotKey类 参考

#include <GlobalHotkey.h>

类 GlobalHotKey 继承关系图:

Public 成员函数

 GlobalHotKey (QObject *parent=NULL)
 
 ~GlobalHotKey ()
 
void setConfigOptionsHotkeyWork (const bool &isWork)
 
void setShowHideMainWidgetHotkeyWork (const bool &isWork)
 
void setMinMainWidgetHotkeyWork (const bool &isWork)
 
void setOpenMusicfileHotkeyWork (const bool &isWork)
 
void setShowDownloadHotkeyWork (const bool &isWork)
 
void setShowMusicListHotkeyWork (const bool &isWork)
 
void setShowLrcHotkeyWork (const bool &isWork)
 
void setPlayPauseHotkeyWork (const bool &isWork)
 
void setLastHotkeyWork (const bool &isWork)
 
void setNextHotkeyWork (const bool &isWork)
 

详细描述

全局热键

构造及析构函数说明

GlobalHotKey::GlobalHotKey ( QObject *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
GlobalHotKey::~GlobalHotKey ( )

析构函数.

成员函数说明

void GlobalHotKey::setConfigOptionsHotkeyWork ( const bool &  isWork)

是否启用选项设置热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setLastHotkeyWork ( const bool &  isWork)

是否启用上一首热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setMinMainWidgetHotkeyWork ( const bool &  isWork)

是否启用迷你模式/正常窗口热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setNextHotkeyWork ( const bool &  isWork)

是否启用下一首热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setOpenMusicfileHotkeyWork ( const bool &  isWork)

是否启用打开音乐文件热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setPlayPauseHotkeyWork ( const bool &  isWork)

是否启用播放/暂停热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setShowDownloadHotkeyWork ( const bool &  isWork)

是否启用显示/隐藏下载列表热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setShowHideMainWidgetHotkeyWork ( const bool &  isWork)

是否启用显示/隐藏主界面热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setShowLrcHotkeyWork ( const bool &  isWork)

是否启用显示/隐藏桌面歌词热键

参数
isWorktrue代表启用,否则关闭
void GlobalHotKey::setShowMusicListHotkeyWork ( const bool &  isWork)

是否启用显示/隐藏歌曲列表热键

参数
isWorktrue代表启用,否则关闭

================================================ FILE: doc/class_hot_keys_settings_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotKeysSettingsPage 成员列表

================================================ FILE: doc/class_hot_keys_settings_page.html ================================================ CZPlayer: HotKeysSettingsPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotKeysSettingsPage类 参考

#include <HotkeysSettingsPage.h>

类 HotKeysSettingsPage 继承关系图:

信号

void sigHotKeysSettingsChanged ()
 

Public 成员函数

 HotKeysSettingsPage (QWidget *parent=NULL)
 
 ~HotKeysSettingsPage ()
 
void init ()
 
void apply ()
 

详细描述

热键设置页面

构造及析构函数说明

HotKeysSettingsPage::HotKeysSettingsPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
HotKeysSettingsPage::~HotKeysSettingsPage ( )

析构函数.

成员函数说明

void HotKeysSettingsPage::apply ( )

应用改变

void HotKeysSettingsPage::init ( )

初始页面

void HotKeysSettingsPage::sigHotKeysSettingsChanged ( )
signal

当热键界面配置信息发生改变时发送该信号


================================================ FILE: doc/class_hot_keys_table_widget-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotKeysTableWidget 成员列表

成员的完整列表,这些成员属于 HotKeysTableWidget,包括所有继承而来的类成员

HotKeysTableWidget(QWidget *parent=NULL)HotKeysTableWidget
~HotKeysTableWidget()HotKeysTableWidget

================================================ FILE: doc/class_hot_keys_table_widget.html ================================================ CZPlayer: HotKeysTableWidget类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
HotKeysTableWidget类 参考

#include <HotkeysTableWidget.h>

类 HotKeysTableWidget 继承关系图:

Public 成员函数

 HotKeysTableWidget (QWidget *parent=NULL)
 
 ~HotKeysTableWidget ()
 

详细描述

热键页面

构造及析构函数说明

HotKeysTableWidget::HotKeysTableWidget ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
HotKeysTableWidget::~HotKeysTableWidget ( )

析构函数.


================================================ FILE: doc/class_load_music_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThread 成员列表

成员的完整列表,这些成员属于 LoadMusicThread,包括所有继承而来的类成员

LoadMusicThread(QObject *parent=NULL)LoadMusicThread
run()LoadMusicThreadprotectedvirtual
~LoadMusicThread(void)LoadMusicThread

================================================ FILE: doc/class_load_music_thread.html ================================================ CZPlayer: LoadMusicThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <LoadMusicThread.h>

类 LoadMusicThread 继承关系图:

Public 成员函数

 LoadMusicThread (QObject *parent=NULL)
 
 ~LoadMusicThread (void)
 

Protected 成员函数

virtual void run ()
 

详细描述

加载歌曲线程

构造及析构函数说明

LoadMusicThread::LoadMusicThread ( QObject *  parent = NULL)

构造函数

参数
parentQObject类型,默认为NULL
LoadMusicThread::~LoadMusicThread ( void  )

析构函数.

成员函数说明

void LoadMusicThread::run ( )
protectedvirtual

虚函数,继承自QThread


================================================ FILE: doc/class_load_music_thread_event-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThreadEvent 成员列表

成员的完整列表,这些成员属于 LoadMusicThreadEvent,包括所有继承而来的类成员

LoadMusicThreadEvent(QObject *parent=NULL)LoadMusicThreadEvent
sigAddMusic(const MusicInfoEntity &entity)LoadMusicThreadEventsignal
sigLoadMusicListError()LoadMusicThreadEventsignal
sigLoadMusicListFinished()LoadMusicThreadEventsignal
~LoadMusicThreadEvent(void)LoadMusicThreadEvent

================================================ FILE: doc/class_load_music_thread_event.html ================================================ CZPlayer: LoadMusicThreadEvent类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LoadMusicThreadEvent类 参考

#include <LoadMusicThread.h>

类 LoadMusicThreadEvent 继承关系图:

信号

void sigLoadMusicListError ()
 
void sigLoadMusicListFinished ()
 
void sigAddMusic (const MusicInfoEntity &entity)
 

Public 成员函数

 LoadMusicThreadEvent (QObject *parent=NULL)
 
 ~LoadMusicThreadEvent (void)
 

详细描述

加载歌曲线程事件处理类

构造及析构函数说明

LoadMusicThreadEvent::LoadMusicThreadEvent ( QObject *  parent = NULL)

构造函数

参数
parentQObject类型,默认为NULL
LoadMusicThreadEvent::~LoadMusicThreadEvent ( void  )

析构函数.

成员函数说明

void LoadMusicThreadEvent::sigAddMusic ( const MusicInfoEntity entity)
signal

加载音乐

参数
entity音乐信息实体
void LoadMusicThreadEvent::sigLoadMusicListError ( )
signal

加载播放列表错误

void LoadMusicThreadEvent::sigLoadMusicListFinished ( )
signal

加载完播放列表


================================================ FILE: doc/class_lrc_demo-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcDemo 成员列表

成员的完整列表,这些成员属于 LrcDemo,包括所有继承而来的类成员

LrcDemo(QWidget *parent=NULL)LrcDemo
paintEvent(QPaintEvent *event)LrcDemoprotectedvirtual
setFontName(const QString &fontName)LrcDemo
setFontSize(const QString &fontSize)LrcDemo
setFontType(const QString &fontType)LrcDemo
setLinearGradient(const QColor &color)LrcDemo
setLinearGradient2(const QColor &color)LrcDemo
setLinearGradient3(const QColor &color)LrcDemo
setLrcDemoShadow(const int &shadow)LrcDemo
setMaskLinearGradient(const QColor &color)LrcDemo
setMaskLinearGradient2(const QColor &color)LrcDemo
setMaskLinearGradient3(const QColor &color)LrcDemo
~LrcDemo()LrcDemo

================================================ FILE: doc/class_lrc_demo.html ================================================ CZPlayer: LrcDemo类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <LrcDemo.h>

类 LrcDemo 继承关系图:

Public 成员函数

 LrcDemo (QWidget *parent=NULL)
 
 ~LrcDemo ()
 
void setFontName (const QString &fontName)
 
void setFontSize (const QString &fontSize)
 
void setFontType (const QString &fontType)
 
void setLinearGradient (const QColor &color)
 
void setLinearGradient2 (const QColor &color)
 
void setLinearGradient3 (const QColor &color)
 
void setMaskLinearGradient (const QColor &color)
 
void setMaskLinearGradient2 (const QColor &color)
 
void setMaskLinearGradient3 (const QColor &color)
 
void setLrcDemoShadow (const int &shadow)
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 

详细描述

歌词模板

构造及析构函数说明

LrcDemo::LrcDemo ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
LrcDemo::~LrcDemo ( )

析构函数.

成员函数说明

void LrcDemo::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型
void LrcDemo::setFontName ( const QString &  fontName)

设置歌词字体

参数
fontName字体名称
void LrcDemo::setFontSize ( const QString &  fontSize)

设置歌词字体大小

参数
fontSize字体大小
void LrcDemo::setFontType ( const QString &  fontType)

设置歌词类型

参数
fontType歌词类型
void LrcDemo::setLinearGradient ( const QColor &  color)

设置歌词没有播放上边缘颜色

参数
color颜色
void LrcDemo::setLinearGradient2 ( const QColor &  color)

设置歌词没有播放中间颜色

参数
color颜色
void LrcDemo::setLinearGradient3 ( const QColor &  color)

设置歌词没有播放下边缘颜色

参数
color颜色
void LrcDemo::setLrcDemoShadow ( const int &  shadow)

设置歌词灰度

参数
shadow灰度
void LrcDemo::setMaskLinearGradient ( const QColor &  color)

设置歌词播放后上边缘颜色

参数
color颜色
void LrcDemo::setMaskLinearGradient2 ( const QColor &  color)

设置歌词播放后中间颜色

参数
color颜色
void LrcDemo::setMaskLinearGradient3 ( const QColor &  color)

设置歌词播放后下边缘颜色

参数
color颜色

================================================ FILE: doc/class_lrc_portrait_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcPortraitPanel 成员列表

成员的完整列表,这些成员属于 LrcPortraitPanel,包括所有继承而来的类成员

LrcPortraitPanel(QWidget *parent=NULL)LrcPortraitPanel
~LrcPortraitPanel()LrcPortraitPanel

================================================ FILE: doc/class_lrc_portrait_panel.html ================================================ CZPlayer: LrcPortraitPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcPortraitPanel类 参考

#include <LrcPortraitPanel.h>

类 LrcPortraitPanel 继承关系图:

Public 成员函数

 LrcPortraitPanel (QWidget *parent=NULL)
 
 ~LrcPortraitPanel ()
 

详细描述

歌词写真面板

构造及析构函数说明

LrcPortraitPanel::LrcPortraitPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
LrcPortraitPanel::~LrcPortraitPanel ( )

析构函数.


================================================ FILE: doc/class_lrc_settings_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcSettingsPage 成员列表

成员的完整列表,这些成员属于 LrcSettingsPage,包括所有继承而来的类成员

apply()LrcSettingsPage
init()LrcSettingsPage
LrcSettingsPage(QWidget *parent=NULL)LrcSettingsPage
sigLrcSettingsChanged()LrcSettingsPagesignal
~LrcSettingsPage()LrcSettingsPage

================================================ FILE: doc/class_lrc_settings_page.html ================================================ CZPlayer: LrcSettingsPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcSettingsPage类 参考

#include <LrcSettingsPage.h>

类 LrcSettingsPage 继承关系图:

信号

void sigLrcSettingsChanged ()
 

Public 成员函数

 LrcSettingsPage (QWidget *parent=NULL)
 
 ~LrcSettingsPage ()
 
void init ()
 
void apply ()
 

详细描述

歌词设置页面

构造及析构函数说明

LrcSettingsPage::LrcSettingsPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
LrcSettingsPage::~LrcSettingsPage ( )

析构函数.

成员函数说明

void LrcSettingsPage::apply ( )

应用改变

void LrcSettingsPage::init ( )

初始页面

void LrcSettingsPage::sigLrcSettingsChanged ( )
signal

当歌词界面配置信息发生改变时发送该信号


================================================ FILE: doc/class_lrc_thread-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcThread 成员列表

成员的完整列表,这些成员属于 LrcThread,包括所有继承而来的类成员

LrcThread(const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, QObject *parent=NULL)LrcThread
run()LrcThreadprotectedvirtual
sigLrcDownloadStatus(const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, LrcDownloadStatus status)LrcThreadsignal
~LrcThread()LrcThread

================================================ FILE: doc/class_lrc_thread.html ================================================ CZPlayer: LrcThread类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <LrcThread.h>

类 LrcThread 继承关系图:

信号

void sigLrcDownloadStatus (const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, LrcDownloadStatus status)
 

Public 成员函数

 LrcThread (const QString &musicName, const QString &musicArtist, const QString &lrcFilePath, QObject *parent=NULL)
 
 ~LrcThread ()
 

Protected 成员函数

virtual void run ()
 

详细描述

歌词下载线程

构造及析构函数说明

LrcThread::LrcThread ( const QString &  musicName,
const QString &  musicArtist,
const QString &  lrcFilePath,
QObject *  parent = NULL 
)

构造函数

参数
musicName音乐名称
musicArtist音乐艺术家
lrcFilePath歌词路径
parentQObject类型,默认为NULL
LrcThread::~LrcThread ( )

析构函数.

成员函数说明

void LrcThread::run ( )
protectedvirtual

虚函数,继承自QThread

void LrcThread::sigLrcDownloadStatus ( const QString &  musicName,
const QString &  musicArtist,
const QString &  lrcFilePath,
LrcDownloadStatus  status 
)
signal

下载歌词状态

参数
musicName音乐名
musicArtist音乐艺术家
lrcFilePath歌词文件路径
status下载状态

================================================ FILE: doc/class_main_widget-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MainWidget 成员列表

成员的完整列表,这些成员属于 MainWidget,包括所有继承而来的类成员

contextMenuEvent(QContextMenuEvent *event)MainWidgetprotectedvirtual
dragEnterEvent(QDragEnterEvent *event)MainWidgetprotectedvirtual
dropEvent(QDropEvent *event)MainWidgetprotectedvirtual
MainWidget(const char *argvMusicPath, QWidget *parent=NULL)MainWidget
mouseMoveEvent(QMouseEvent *event)MainWidgetprotectedvirtual
mousePressEvent(QMouseEvent *event)MainWidgetprotectedvirtual
paintEvent(QPaintEvent *event)MainWidgetprotectedvirtual
sigShowMainWidget()MainWidgetsignal
sigSpectrumChanged(const vector< float > &vecFrequency)MainWidgetsignal
sigStartloadMusic(const QStringList &musicList)MainWidgetsignal
sigStartloadMusic(const QList< QUrl > &urls)MainWidgetsignal
sigStartloadMusic(const QString &strFileOrDir)MainWidgetsignal
sigStartloadMusic()MainWidgetsignal
~MainWidget()MainWidget

================================================ FILE: doc/class_main_widget.html ================================================ CZPlayer: MainWidget类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <MainWidget.h>

类 MainWidget 继承关系图:

信号

void sigShowMainWidget ()
 
void sigSpectrumChanged (const vector< float > &vecFrequency)
 
void sigStartloadMusic (const QStringList &musicList)
 
void sigStartloadMusic (const QList< QUrl > &urls)
 
void sigStartloadMusic (const QString &strFileOrDir)
 
void sigStartloadMusic ()
 

Public 成员函数

 MainWidget (const char *argvMusicPath, QWidget *parent=NULL)
 
 ~MainWidget ()
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 

详细描述

播放器主界面

构造及析构函数说明

MainWidget::MainWidget ( const char *  argvMusicPath,
QWidget *  parent = NULL 
)

构造函数

参数
argvMusicPath设备指针
parent父窗口指针,默认为NULL
MainWidget::~MainWidget ( )

析构函数.

成员函数说明

void MainWidget::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

虚函数,重新实现contextMenuEvent函数

参数
eventQContextMenuEvent类型
void MainWidget::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

虚函数,重新实现dragEnterEvent函数

参数
eventQDragEnterEvent类型
void MainWidget::dropEvent ( QDropEvent *  event)
protectedvirtual

虚函数,重新实现dropEvent函数

参数
eventQDropEvent类型
void MainWidget::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mouseMoveEvent函数

参数
eventQMouseEvent类型
void MainWidget::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mousePressEvent函数

参数
eventQMouseEvent类型
void MainWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型
void MainWidget::sigShowMainWidget ( )
signal

显示主界面

void MainWidget::sigSpectrumChanged ( const vector< float > &  vecFrequency)
signal

频谱改变

参数
vecFrequency频谱数据
void MainWidget::sigStartloadMusic ( const QStringList &  musicList)
signal

打开音乐文件 设置参数

参数
musicList音乐列表信息集合
void MainWidget::sigStartloadMusic ( const QList< QUrl > &  urls)
signal

拖动音乐文件或音乐格式文件 设置参数

参数
urls音乐url列表
void MainWidget::sigStartloadMusic ( const QString &  strFileOrDir)
signal

加载音乐格式文件或文件夹 设置参数

参数
strFileOrDir音乐格式文件或文件夹
void MainWidget::sigStartloadMusic ( )
signal

从数据库读取音乐文件 设置参数


================================================ FILE: doc/class_media_widget-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MediaWidget 成员列表

成员的完整列表,这些成员属于 MediaWidget,包括所有继承而来的类成员

MediaWidget(QWidget *parent=NULL)MediaWidget
paintEvent(QPaintEvent *event)MediaWidgetprotectedvirtual
~MediaWidget()MediaWidget

================================================ FILE: doc/class_media_widget.html ================================================ CZPlayer: MediaWidget类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <MediaWidget.h>

类 MediaWidget 继承关系图:

Public 成员函数

 MediaWidget (QWidget *parent=NULL)
 
 ~MediaWidget ()
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 

详细描述

媒体界面

构造及析构函数说明

MediaWidget::MediaWidget ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
MediaWidget::~MediaWidget ( )

析构函数.

成员函数说明

void MediaWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型

================================================ FILE: doc/class_min_music_widget-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MinMusicWidget 成员列表

成员的完整列表,这些成员属于 MinMusicWidget,包括所有继承而来的类成员

changeAlbumImage(const QString &albumFilePath)MinMusicWidget
contextMenuEvent(QContextMenuEvent *event)MinMusicWidgetprotectedvirtual
MinMusicWidget(QWidget *mainWidget, QWidget *parent=NULL)MinMusicWidget
mouseMoveEvent(QMouseEvent *event)MinMusicWidgetprotectedvirtual
mousePressEvent(QMouseEvent *event)MinMusicWidgetprotectedvirtual
paintEvent(QPaintEvent *event)MinMusicWidgetprotectedvirtual
setMinMusicLrcActionText(const QString &text)MinMusicWidget
setWork(bool isWork)MinMusicWidget
sigShowMusicPanel()MinMusicWidgetsignal
~MinMusicWidget()MinMusicWidget

================================================ FILE: doc/class_min_music_widget.html ================================================ CZPlayer: MinMusicWidget类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <MinMusicWidget.h>

类 MinMusicWidget 继承关系图:

信号

void sigShowMusicPanel ()
 

Public 成员函数

 MinMusicWidget (QWidget *mainWidget, QWidget *parent=NULL)
 
 ~MinMusicWidget ()
 
void setWork (bool isWork)
 
void setMinMusicLrcActionText (const QString &text)
 
void changeAlbumImage (const QString &albumFilePath)
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 

详细描述

播放器迷你界面

构造及析构函数说明

MinMusicWidget::MinMusicWidget ( QWidget *  mainWidget,
QWidget *  parent = NULL 
)

构造函数

参数
mainWidget主界面
parent父窗口指针,默认为NULL
MinMusicWidget::~MinMusicWidget ( )

析构函数.

成员函数说明

void MinMusicWidget::changeAlbumImage ( const QString &  albumFilePath)

迷你界面更改专辑图片

参数
albumFilePath专辑路径
void MinMusicWidget::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

虚函数,重新实现contextMenuEvent函数

参数
eventQContextMenuEvent类型
void MinMusicWidget::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mouseMoveEvent函数

参数
eventQMouseEvent类型
void MinMusicWidget::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mousePressEvent函数

参数
eventQMouseEvent类型
void MinMusicWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型
void MinMusicWidget::setMinMusicLrcActionText ( const QString &  text)

设置歌词Action文本

参数
text文本内容
void MinMusicWidget::setWork ( bool  isWork)

设置迷你界面按钮是否可用

参数
isWorktrue代表可用,否则不可用
void MinMusicWidget::sigShowMusicPanel ( )
signal

打开主界面


================================================ FILE: doc/class_music_info_entity-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicInfoEntity 成员列表

成员的完整列表,这些成员属于 MusicInfoEntity,包括所有继承而来的类成员

fileName() const MusicInfoEntity
filePath() const MusicInfoEntity
MusicInfoEntity()MusicInfoEntity
MusicInfoEntity(const QString &fileName, const QString &time, const QString &filePath)MusicInfoEntity
setFileName(const QString &fileName)MusicInfoEntity
setFilePath(const QString &filePath)MusicInfoEntity
setTime(const QString &time)MusicInfoEntity
time() const MusicInfoEntity
~MusicInfoEntity()MusicInfoEntity

================================================ FILE: doc/class_music_info_entity.html ================================================ CZPlayer: MusicInfoEntity类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicInfoEntity类 参考

#include <MusicInfoEntity.h>

Public 成员函数

 MusicInfoEntity ()
 
 MusicInfoEntity (const QString &fileName, const QString &time, const QString &filePath)
 
 ~MusicInfoEntity ()
 
QString fileName () const
 
void setFileName (const QString &fileName)
 
QString time () const
 
void setTime (const QString &time)
 
QString filePath () const
 
void setFilePath (const QString &filePath)
 

详细描述

音乐信息实体

构造及析构函数说明

MusicInfoEntity::MusicInfoEntity ( )

构造函数.

< 音乐文件名

< 播放时间

< 文件路径

MusicInfoEntity::MusicInfoEntity ( const QString &  fileName,
const QString &  time,
const QString &  filePath 
)

构造函数

参数
fileName音乐文件名
time播放时间
filePath文件路径
MusicInfoEntity::~MusicInfoEntity ( )

析构函数.

< 音乐文件名

< 播放时间

< 文件路径

成员函数说明

QString MusicInfoEntity::fileName ( ) const

得到文件名

返回
文件名
QString MusicInfoEntity::filePath ( ) const

得到文件路径

返回
文件路径
void MusicInfoEntity::setFileName ( const QString &  fileName)

设置文件名

参数
fileName音乐文件名
void MusicInfoEntity::setFilePath ( const QString &  filePath)

设置文件路径

参数
filePath文件路径
void MusicInfoEntity::setTime ( const QString &  time)

设置时间

参数
time时间
QString MusicInfoEntity::time ( ) const

得到音乐播放的时间

返回
时间

================================================ FILE: doc/class_music_list-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicList 成员列表

成员的完整列表,这些成员属于 MusicList,包括所有继承而来的类成员

contextMenuEvent(QContextMenuEvent *event)MusicListprotectedvirtual
MusicList(QWidget *parent=NULL)MusicList
setCurrentMusicRow(const int &row)MusicList
sigPlayListCleanFinshed()MusicListsignal
sigRowSelected(const int &row, const QString &title)MusicListsignal
sigSharedCurrentMusic(const QString &musicName)MusicListsignal
~MusicList()MusicList

================================================ FILE: doc/class_music_list.html ================================================ CZPlayer: MusicList类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <MusicList.h>

类 MusicList 继承关系图:

信号

void sigPlayListCleanFinshed ()
 
void sigRowSelected (const int &row, const QString &title)
 
void sigSharedCurrentMusic (const QString &musicName)
 

Public 成员函数

 MusicList (QWidget *parent=NULL)
 
 ~MusicList ()
 
void setCurrentMusicRow (const int &row)
 

Protected 成员函数

virtual void contextMenuEvent (QContextMenuEvent *event)
 

详细描述

歌曲列表

构造及析构函数说明

MusicList::MusicList ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
MusicList::~MusicList ( )

析构函数.

成员函数说明

void MusicList::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

虚函数,重新实现contextMenuEvent函数

参数
eventQContextMenuEvent类型
void MusicList::setCurrentMusicRow ( const int &  row)

设置当前歌曲播放的行号

参数
row行号
void MusicList::sigPlayListCleanFinshed ( )
signal

清空播放列表完成

void MusicList::sigRowSelected ( const int &  row,
const QString &  title 
)
signal

设置当前歌曲播放的行号

参数
row行号
title标题
void MusicList::sigSharedCurrentMusic ( const QString &  musicName)
signal

分享当前歌曲

参数
musicName音乐名

================================================ FILE: doc/class_music_list_save_format_entity-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListSaveFormatEntity 成员列表

成员的完整列表,这些成员属于 MusicListSaveFormatEntity,包括所有继承而来的类成员

fileName() const MusicListSaveFormatEntity
filePath() const MusicListSaveFormatEntity
MusicListSaveFormatEntity()MusicListSaveFormatEntity
MusicListSaveFormatEntity(const QString &fileName, const QString &time, const QString &filePath)MusicListSaveFormatEntity
setFileName(const QString &fileName)MusicListSaveFormatEntity
setFilePath(const QString &filePath)MusicListSaveFormatEntity
setTime(const QString &time)MusicListSaveFormatEntity
time() const MusicListSaveFormatEntity
~MusicListSaveFormatEntity()MusicListSaveFormatEntity

================================================ FILE: doc/class_music_list_save_format_entity.html ================================================ CZPlayer: MusicListSaveFormatEntity类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListSaveFormatEntity类 参考

#include <MusicListSaveFormatEntity.h>

Public 成员函数

 MusicListSaveFormatEntity ()
 
 MusicListSaveFormatEntity (const QString &fileName, const QString &time, const QString &filePath)
 
 ~MusicListSaveFormatEntity ()
 
QString fileName () const
 
void setFileName (const QString &fileName)
 
QString time () const
 
void setTime (const QString &time)
 
QString filePath () const
 
void setFilePath (const QString &filePath)
 

详细描述

音乐列表保存格式实体

构造及析构函数说明

MusicListSaveFormatEntity::MusicListSaveFormatEntity ( )

构造函数.

< 音乐文件名

< 播放时间

< 文件路径

MusicListSaveFormatEntity::MusicListSaveFormatEntity ( const QString &  fileName,
const QString &  time,
const QString &  filePath 
)

构造函数

参数
fileName音乐文件名
time播放时间
filePath文件路径
MusicListSaveFormatEntity::~MusicListSaveFormatEntity ( )

析构函数.

< 音乐文件名

< 播放时间

< 文件路径

成员函数说明

QString MusicListSaveFormatEntity::fileName ( ) const

得到文件名

返回
文件名
QString MusicListSaveFormatEntity::filePath ( ) const

得到文件路径

返回
文件路径
void MusicListSaveFormatEntity::setFileName ( const QString &  fileName)

设置文件名

参数
fileName音乐文件名
void MusicListSaveFormatEntity::setFilePath ( const QString &  filePath)

设置文件路径

参数
filePath文件路径
void MusicListSaveFormatEntity::setTime ( const QString &  time)

设置时间

参数
time时间
QString MusicListSaveFormatEntity::time ( ) const

得到音乐播放的时间

返回
时间

================================================ FILE: doc/class_music_list_widget-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicListWidget 成员列表

成员的完整列表,这些成员属于 MusicListWidget,包括所有继承而来的类成员

eventFilter(QObject *target, QEvent *event)MusicListWidgetprotectedvirtual
MusicListWidget(MusicList *playList, QMap< QString, int > *mapMusicRows, QWidget *parent=NULL)MusicListWidget
paintEvent(QPaintEvent *event)MusicListWidgetprotectedvirtual
~MusicListWidget()MusicListWidget

================================================ FILE: doc/class_music_list_widget.html ================================================ CZPlayer: MusicListWidget类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 MusicListWidget 继承关系图:

Public 成员函数

 MusicListWidget (MusicList *playList, QMap< QString, int > *mapMusicRows, QWidget *parent=NULL)
 
 ~MusicListWidget ()
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 
virtual bool eventFilter (QObject *target, QEvent *event)
 

构造及析构函数说明

MusicListWidget::MusicListWidget ( MusicList playList,
QMap< QString, int > *  mapMusicRows,
QWidget *  parent = NULL 
)

构造函数

参数
playList音乐列表
mapMusicRows存放音乐-行map
parent父窗口指针,默认为NULL
MusicListWidget::~MusicListWidget ( )

析构函数.

成员函数说明

bool MusicListWidget::eventFilter ( QObject *  target,
QEvent *  event 
)
protectedvirtual

虚函数,重新实现eventFilter函数

参数
targetQObject对象
eventQEvent类型
返回
返回true代表中断事件的传递
void MusicListWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型

================================================ FILE: doc/class_music_lrc-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicLrc 成员列表

成员的完整列表,这些成员属于 MusicLrc,包括所有继承而来的类成员

contextMenuEvent(QContextMenuEvent *event)MusicLrcprotectedvirtual
mouseMoveEvent(QMouseEvent *event)MusicLrcprotectedvirtual
mousePressEvent(QMouseEvent *event)MusicLrcprotectedvirtual
MusicLrc(QWidget *parent=NULL)MusicLrc
paintEvent(QPaintEvent *event)MusicLrcprotectedvirtual
sigHideLrc()MusicLrcsignal
sigLrcLocked()MusicLrcsignal
sigLrcUnlocked()MusicLrcsignal
startLrcMask(qint64 intervalTime)MusicLrc
stopLrcMask()MusicLrc
unlockLrc()MusicLrc
~MusicLrc()MusicLrc

================================================ FILE: doc/class_music_lrc.html ================================================ CZPlayer: MusicLrc类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <MusicLrc.h>

类 MusicLrc 继承关系图:

信号

void sigLrcLocked ()
 
void sigLrcUnlocked ()
 
void sigHideLrc ()
 

Public 成员函数

 MusicLrc (QWidget *parent=NULL)
 
 ~MusicLrc ()
 
void startLrcMask (qint64 intervalTime)
 
void stopLrcMask ()
 
void unlockLrc ()
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 

详细描述

歌词Label

构造及析构函数说明

MusicLrc::MusicLrc ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
MusicLrc::~MusicLrc ( )

析构函数.

成员函数说明

void MusicLrc::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

虚函数,重新实现contextMenuEvent函数

参数
eventQContextMenuEvent类型
void MusicLrc::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mouseMoveEvent函数

参数
eventQMouseEvent类型
void MusicLrc::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

虚函数,重新实现mousePressEvent函数

参数
eventQMouseEvent类型
void MusicLrc::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型
void MusicLrc::sigHideLrc ( )
signal

隐藏桌面歌词

void MusicLrc::sigLrcLocked ( )
signal

歌词已经锁定

void MusicLrc::sigLrcUnlocked ( )
signal

歌词已经解锁

void MusicLrc::startLrcMask ( qint64  intervalTime)

开启歌词遮罩,需要指定当前歌词开始与结束之间的时间间隔

参数
intervalTime时间间隔
void MusicLrc::stopLrcMask ( )

停止歌词遮罩

void MusicLrc::unlockLrc ( )

解锁歌词


================================================ FILE: doc/class_no_focus_delegate-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
NoFocusDelegate 成员列表

成员的完整列表,这些成员属于 NoFocusDelegate,包括所有继承而来的类成员

NoFocusDelegate(QStyledItemDelegate *parent=0) (定义于 NoFocusDelegate)NoFocusDelegate
paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const (定义于 NoFocusDelegate)NoFocusDelegateinlineprotected
~NoFocusDelegate() (定义于 NoFocusDelegate)NoFocusDelegate

================================================ FILE: doc/class_no_focus_delegate.html ================================================ CZPlayer: NoFocusDelegate类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类 NoFocusDelegate 继承关系图:

Public 成员函数

 NoFocusDelegate (QStyledItemDelegate *parent=0)
 

Protected 成员函数

void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 

================================================ FILE: doc/class_radio_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RadioPanel 成员列表

成员的完整列表,这些成员属于 RadioPanel,包括所有继承而来的类成员

RadioPanel(QWidget *parent=NULL)RadioPanel
~RadioPanel()RadioPanel

================================================ FILE: doc/class_radio_panel.html ================================================ CZPlayer: RadioPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RadioPanel类 参考

#include <RadioPanel.h>

类 RadioPanel 继承关系图:

Public 成员函数

 RadioPanel (QWidget *parent=NULL)
 
 ~RadioPanel ()
 

详细描述

电台面板

构造及析构函数说明

RadioPanel::RadioPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
RadioPanel::~RadioPanel ( )

析构函数.


================================================ FILE: doc/class_ranking_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RankingPanel 成员列表

成员的完整列表,这些成员属于 RankingPanel,包括所有继承而来的类成员

RankingPanel(QWidget *parent=NULL)RankingPanel
~RankingPanel()RankingPanel

================================================ FILE: doc/class_ranking_panel.html ================================================ CZPlayer: RankingPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
RankingPanel类 参考

#include <RankingPanel.h>

类 RankingPanel 继承关系图:

Public 成员函数

 RankingPanel (QWidget *parent=NULL)
 
 ~RankingPanel ()
 

详细描述

榜单面板

构造及析构函数说明

RankingPanel::RankingPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
RankingPanel::~RankingPanel ( )

析构函数.


================================================ FILE: doc/class_search_panel-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SearchPanel 成员列表

成员的完整列表,这些成员属于 SearchPanel,包括所有继承而来的类成员

SearchPanel(QWidget *parent=NULL)SearchPanel
~SearchPanel()SearchPanel

================================================ FILE: doc/class_search_panel.html ================================================ CZPlayer: SearchPanel类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SearchPanel类 参考

#include <SearchPanel.h>

类 SearchPanel 继承关系图:

Public 成员函数

 SearchPanel (QWidget *parent=NULL)
 
 ~SearchPanel ()
 

详细描述

搜索面板

构造及析构函数说明

SearchPanel::SearchPanel ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
SearchPanel::~SearchPanel ( )

析构函数.


================================================ FILE: doc/class_shared_dialog-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SharedDialog 成员列表

成员的完整列表,这些成员属于 SharedDialog,包括所有继承而来的类成员

init(const QString &albumImagePath, const QString &musicName, const QString &albumUrlPath)SharedDialog
SharedDialog(QWidget *parent=NULL)SharedDialog
~SharedDialog(void)SharedDialog

================================================ FILE: doc/class_shared_dialog.html ================================================ CZPlayer: SharedDialog类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SharedDialog类 参考

#include <SharedDialog.h>

类 SharedDialog 继承关系图:

Public 成员函数

 SharedDialog (QWidget *parent=NULL)
 
 ~SharedDialog (void)
 
void init (const QString &albumImagePath, const QString &musicName, const QString &albumUrlPath)
 

详细描述

歌曲分享对话框

构造及析构函数说明

SharedDialog::SharedDialog ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
SharedDialog::~SharedDialog ( void  )

析构函数.

成员函数说明

void SharedDialog::init ( const QString &  albumImagePath,
const QString &  musicName,
const QString &  albumUrlPath 
)

初始化分享对话框

参数
albumImagePath专辑图片路径
musicName音乐名
albumUrlPath专辑url

================================================ FILE: doc/class_signal-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal 成员列表

成员的完整列表,这些成员属于 Signal,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)()) (定义于 Signal)Signalinline
operator()() (定义于 Signal)Signalinline
~Signal() (定义于 Signal)Signalinline

================================================ FILE: doc/class_signal.html ================================================ CZPlayer: Signal类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)())
 
void operator() ()
 

================================================ FILE: doc/class_signal1-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal1< T1 > 成员列表

成员的完整列表,这些成员属于 Signal1< T1 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1)) (定义于 Signal1< T1 >)Signal1< T1 >inline
operator()(T1 t1) (定义于 Signal1< T1 >)Signal1< T1 >inline
~Signal1() (定义于 Signal1< T1 >)Signal1< T1 >inline

================================================ FILE: doc/class_signal1.html ================================================ CZPlayer: Signal1< T1 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal1< T1 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1))
 
void operator() (T1 t1)
 

================================================ FILE: doc/class_signal2-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal2< T1, T2 > 成员列表

成员的完整列表,这些成员属于 Signal2< T1, T2 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2)) (定义于 Signal2< T1, T2 >)Signal2< T1, T2 >inline
operator()(T1 t1, T2 t2) (定义于 Signal2< T1, T2 >)Signal2< T1, T2 >inline
~Signal2() (定义于 Signal2< T1, T2 >)Signal2< T1, T2 >inline

================================================ FILE: doc/class_signal2.html ================================================ CZPlayer: Signal2< T1, T2 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal2< T1, T2 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2))
 
void operator() (T1 t1, T2 t2)
 

================================================ FILE: doc/class_signal3-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal3< T1, T2, T3 > 成员列表

成员的完整列表,这些成员属于 Signal3< T1, T2, T3 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3)) (定义于 Signal3< T1, T2, T3 >)Signal3< T1, T2, T3 >inline
operator()(T1 t1, T2 t2, T3 t3) (定义于 Signal3< T1, T2, T3 >)Signal3< T1, T2, T3 >inline
~Signal3() (定义于 Signal3< T1, T2, T3 >)Signal3< T1, T2, T3 >inline

================================================ FILE: doc/class_signal3.html ================================================ CZPlayer: Signal3< T1, T2, T3 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal3< T1, T2, T3 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3))
 
void operator() (T1 t1, T2 t2, T3 t3)
 

================================================ FILE: doc/class_signal4-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal4< T1, T2, T3, T4 > 成员列表

成员的完整列表,这些成员属于 Signal4< T1, T2, T3, T4 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4)) (定义于 Signal4< T1, T2, T3, T4 >)Signal4< T1, T2, T3, T4 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4) (定义于 Signal4< T1, T2, T3, T4 >)Signal4< T1, T2, T3, T4 >inline
~Signal4() (定义于 Signal4< T1, T2, T3, T4 >)Signal4< T1, T2, T3, T4 >inline

================================================ FILE: doc/class_signal4.html ================================================ CZPlayer: Signal4< T1, T2, T3, T4 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal4< T1, T2, T3, T4 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4)
 

================================================ FILE: doc/class_signal5-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal5< T1, T2, T3, T4, T5 > 成员列表

成员的完整列表,这些成员属于 Signal5< T1, T2, T3, T4, T5 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4, T5)) (定义于 Signal5< T1, T2, T3, T4, T5 >)Signal5< T1, T2, T3, T4, T5 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) (定义于 Signal5< T1, T2, T3, T4, T5 >)Signal5< T1, T2, T3, T4, T5 >inline
~Signal5() (定义于 Signal5< T1, T2, T3, T4, T5 >)Signal5< T1, T2, T3, T4, T5 >inline

================================================ FILE: doc/class_signal5.html ================================================ CZPlayer: Signal5< T1, T2, T3, T4, T5 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal5< T1, T2, T3, T4, T5 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4, T5))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
 

================================================ FILE: doc/class_signal6-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal6< T1, T2, T3, T4, T5, T6 > 成员列表

成员的完整列表,这些成员属于 Signal6< T1, T2, T3, T4, T5, T6 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6)) (定义于 Signal6< T1, T2, T3, T4, T5, T6 >)Signal6< T1, T2, T3, T4, T5, T6 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) (定义于 Signal6< T1, T2, T3, T4, T5, T6 >)Signal6< T1, T2, T3, T4, T5, T6 >inline
~Signal6() (定义于 Signal6< T1, T2, T3, T4, T5, T6 >)Signal6< T1, T2, T3, T4, T5, T6 >inline

================================================ FILE: doc/class_signal6.html ================================================ CZPlayer: Signal6< T1, T2, T3, T4, T5, T6 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal6< T1, T2, T3, T4, T5, T6 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
 

================================================ FILE: doc/class_signal7-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal7< T1, T2, T3, T4, T5, T6, T7 > 成员列表

成员的完整列表,这些成员属于 Signal7< T1, T2, T3, T4, T5, T6, T7 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7)) (定义于 Signal7< T1, T2, T3, T4, T5, T6, T7 >)Signal7< T1, T2, T3, T4, T5, T6, T7 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) (定义于 Signal7< T1, T2, T3, T4, T5, T6, T7 >)Signal7< T1, T2, T3, T4, T5, T6, T7 >inline
~Signal7() (定义于 Signal7< T1, T2, T3, T4, T5, T6, T7 >)Signal7< T1, T2, T3, T4, T5, T6, T7 >inline

================================================ FILE: doc/class_signal7.html ================================================ CZPlayer: Signal7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
 

================================================ FILE: doc/class_signal8-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal8< T1, T2, T3, T4, T5, T6, T7, T8 > 成员列表

成员的完整列表,这些成员属于 Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) (定义于 Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >)Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) (定义于 Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >)Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >inline
~Signal8() (定义于 Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >)Signal8< T1, T2, T3, T4, T5, T6, T7, T8 >inline

================================================ FILE: doc/class_signal8.html ================================================ CZPlayer: Signal8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
 

================================================ FILE: doc/class_signal9-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 成员列表

成员的完整列表,这些成员属于 Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >,包括所有继承而来的类成员

Bind(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) (定义于 Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline
operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) (定义于 Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline
~Signal9() (定义于 Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline

================================================ FILE: doc/class_signal9.html ================================================ CZPlayer: Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Signal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考

Public 成员函数

template<class T >
void Bind (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
 
void operator() (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
 

================================================ FILE: doc/class_slot-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot 成员列表

成员的完整列表,这些成员属于 Slot,包括所有继承而来的类成员

exec() (定义于 Slot)Slotinline
Slot(T *pObj, void(T::*func)()) (定义于 Slot)Slotinline
~Slot() (定义于 Slot)Slotinline

================================================ FILE: doc/class_slot.html ================================================ CZPlayer: Slot类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot (T *pObj, void(T::*func)())
 
void exec ()
 

详细描述

信号


================================================ FILE: doc/class_slot1-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot1< T1 > 成员列表

成员的完整列表,这些成员属于 Slot1< T1 >,包括所有继承而来的类成员

exec(T1 t1) (定义于 Slot1< T1 >)Slot1< T1 >inline
Slot1(T *pObj, void(T::*func)(T1)) (定义于 Slot1< T1 >)Slot1< T1 >inline
~Slot1() (定义于 Slot1< T1 >)Slot1< T1 >inline

================================================ FILE: doc/class_slot1.html ================================================ CZPlayer: Slot1< T1 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot1< T1 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot1 (T *pObj, void(T::*func)(T1))
 
void exec (T1 t1)
 

详细描述

template<class T1>
class Slot1< T1 >

信号


================================================ FILE: doc/class_slot2-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot2< T1, T2 > 成员列表

成员的完整列表,这些成员属于 Slot2< T1, T2 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2) (定义于 Slot2< T1, T2 >)Slot2< T1, T2 >inline
Slot2(T *pObj, void(T::*func)(T1, T2)) (定义于 Slot2< T1, T2 >)Slot2< T1, T2 >inline
~Slot2() (定义于 Slot2< T1, T2 >)Slot2< T1, T2 >inline

================================================ FILE: doc/class_slot2.html ================================================ CZPlayer: Slot2< T1, T2 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot2< T1, T2 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot2 (T *pObj, void(T::*func)(T1, T2))
 
void exec (T1 t1, T2 t2)
 

详细描述

template<class T1, class T2>
class Slot2< T1, T2 >

信号


================================================ FILE: doc/class_slot3-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot3< T1, T2, T3 > 成员列表

成员的完整列表,这些成员属于 Slot3< T1, T2, T3 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3) (定义于 Slot3< T1, T2, T3 >)Slot3< T1, T2, T3 >inline
Slot3(T *pObj, void(T::*func)(T1, T2, T3)) (定义于 Slot3< T1, T2, T3 >)Slot3< T1, T2, T3 >inline
~Slot3() (定义于 Slot3< T1, T2, T3 >)Slot3< T1, T2, T3 >inline

================================================ FILE: doc/class_slot3.html ================================================ CZPlayer: Slot3< T1, T2, T3 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot3< T1, T2, T3 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot3 (T *pObj, void(T::*func)(T1, T2, T3))
 
void exec (T1 t1, T2 t2, T3 t3)
 

详细描述

template<class T1, class T2, class T3>
class Slot3< T1, T2, T3 >

信号


================================================ FILE: doc/class_slot4-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot4< T1, T2, T3, T4 > 成员列表

成员的完整列表,这些成员属于 Slot4< T1, T2, T3, T4 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4) (定义于 Slot4< T1, T2, T3, T4 >)Slot4< T1, T2, T3, T4 >inline
Slot4(T *pObj, void(T::*func)(T1, T2, T3, T4)) (定义于 Slot4< T1, T2, T3, T4 >)Slot4< T1, T2, T3, T4 >inline
~Slot4() (定义于 Slot4< T1, T2, T3, T4 >)Slot4< T1, T2, T3, T4 >inline

================================================ FILE: doc/class_slot4.html ================================================ CZPlayer: Slot4< T1, T2, T3, T4 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot4< T1, T2, T3, T4 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot4 (T *pObj, void(T::*func)(T1, T2, T3, T4))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4)
 

详细描述

template<class T1, class T2, class T3, class T4>
class Slot4< T1, T2, T3, T4 >

信号


================================================ FILE: doc/class_slot5-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot5< T1, T2, T3, T4, T5 > 成员列表

成员的完整列表,这些成员属于 Slot5< T1, T2, T3, T4, T5 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) (定义于 Slot5< T1, T2, T3, T4, T5 >)Slot5< T1, T2, T3, T4, T5 >inline
Slot5(T *pObj, void(T::*func)(T1, T2, T3, T4, T5)) (定义于 Slot5< T1, T2, T3, T4, T5 >)Slot5< T1, T2, T3, T4, T5 >inline
~Slot5() (定义于 Slot5< T1, T2, T3, T4, T5 >)Slot5< T1, T2, T3, T4, T5 >inline

================================================ FILE: doc/class_slot5.html ================================================ CZPlayer: Slot5< T1, T2, T3, T4, T5 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot5< T1, T2, T3, T4, T5 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot5 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
 

详细描述

template<class T1, class T2, class T3, class T4, class T5>
class Slot5< T1, T2, T3, T4, T5 >

信号


================================================ FILE: doc/class_slot6-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot6< T1, T2, T3, T4, T5, T6 > 成员列表

成员的完整列表,这些成员属于 Slot6< T1, T2, T3, T4, T5, T6 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) (定义于 Slot6< T1, T2, T3, T4, T5, T6 >)Slot6< T1, T2, T3, T4, T5, T6 >inline
Slot6(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6)) (定义于 Slot6< T1, T2, T3, T4, T5, T6 >)Slot6< T1, T2, T3, T4, T5, T6 >inline
~Slot6() (定义于 Slot6< T1, T2, T3, T4, T5, T6 >)Slot6< T1, T2, T3, T4, T5, T6 >inline

================================================ FILE: doc/class_slot6.html ================================================ CZPlayer: Slot6< T1, T2, T3, T4, T5, T6 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot6< T1, T2, T3, T4, T5, T6 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot6 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6>
class Slot6< T1, T2, T3, T4, T5, T6 >

信号


================================================ FILE: doc/class_slot7-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot7< T1, T2, T3, T4, T5, T6, T7 > 成员列表

成员的完整列表,这些成员属于 Slot7< T1, T2, T3, T4, T5, T6, T7 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) (定义于 Slot7< T1, T2, T3, T4, T5, T6, T7 >)Slot7< T1, T2, T3, T4, T5, T6, T7 >inline
Slot7(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7)) (定义于 Slot7< T1, T2, T3, T4, T5, T6, T7 >)Slot7< T1, T2, T3, T4, T5, T6, T7 >inline
~Slot7() (定义于 Slot7< T1, T2, T3, T4, T5, T6, T7 >)Slot7< T1, T2, T3, T4, T5, T6, T7 >inline

================================================ FILE: doc/class_slot7.html ================================================ CZPlayer: Slot7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot7 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
class Slot7< T1, T2, T3, T4, T5, T6, T7 >

信号


================================================ FILE: doc/class_slot8-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot8< T1, T2, T3, T4, T5, T6, T7, T8 > 成员列表

成员的完整列表,这些成员属于 Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) (定义于 Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >)Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >inline
Slot8(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) (定义于 Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >)Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >inline
~Slot8() (定义于 Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >)Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >inline

================================================ FILE: doc/class_slot8.html ================================================ CZPlayer: Slot8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot8 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
class Slot8< T1, T2, T3, T4, T5, T6, T7, T8 >

信号


================================================ FILE: doc/class_slot9-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 成员列表

成员的完整列表,这些成员属于 Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) (定义于 Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline
Slot9(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) (定义于 Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline
~Slot9() (定义于 Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline

================================================ FILE: doc/class_slot9.html ================================================ CZPlayer: Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考

#include <signal_slot.h>

Public 成员函数

template<class T >
 Slot9 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
class Slot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >

信号


================================================ FILE: doc/class_slot_base-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase 成员列表

成员的完整列表,这些成员属于 SlotBase,包括所有继承而来的类成员

exec()=0 (定义于 SlotBase)SlotBasepure virtual
~SlotBase() (定义于 SlotBase)SlotBaseinlinevirtual

================================================ FILE: doc/class_slot_base.html ================================================ CZPlayer: SlotBase类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase类 参考abstract

#include <signal_slot.h>

类 SlotBase 继承关系图:
SlotImpl< T >

Public 成员函数

virtual void exec ()=0
 

详细描述

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base1-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase1< T1 > 成员列表

成员的完整列表,这些成员属于 SlotBase1< T1 >,包括所有继承而来的类成员

exec(T1 t1)=0 (定义于 SlotBase1< T1 >)SlotBase1< T1 >pure virtual
~SlotBase1() (定义于 SlotBase1< T1 >)SlotBase1< T1 >inlinevirtual

================================================ FILE: doc/class_slot_base1.html ================================================ CZPlayer: SlotBase1< T1 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase1< T1 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase1< T1 > 继承关系图:
SlotImpl1< T, T1 >

Public 成员函数

virtual void exec (T1 t1)=0
 

详细描述

template<class T1>
class SlotBase1< T1 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base2-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase2< T1, T2 > 成员列表

成员的完整列表,这些成员属于 SlotBase2< T1, T2 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2)=0 (定义于 SlotBase2< T1, T2 >)SlotBase2< T1, T2 >pure virtual
~SlotBase2() (定义于 SlotBase2< T1, T2 >)SlotBase2< T1, T2 >inlinevirtual

================================================ FILE: doc/class_slot_base2.html ================================================ CZPlayer: SlotBase2< T1, T2 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase2< T1, T2 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase2< T1, T2 > 继承关系图:
SlotImpl2< T, T1, T2 >

Public 成员函数

virtual void exec (T1 t1, T2 t2)=0
 

详细描述

template<class T1, class T2>
class SlotBase2< T1, T2 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base3-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase3< T1, T2, T3 > 成员列表

成员的完整列表,这些成员属于 SlotBase3< T1, T2, T3 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3)=0 (定义于 SlotBase3< T1, T2, T3 >)SlotBase3< T1, T2, T3 >pure virtual
~SlotBase3() (定义于 SlotBase3< T1, T2, T3 >)SlotBase3< T1, T2, T3 >inlinevirtual

================================================ FILE: doc/class_slot_base3.html ================================================ CZPlayer: SlotBase3< T1, T2, T3 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase3< T1, T2, T3 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase3< T1, T2, T3 > 继承关系图:
SlotImpl3< T, T1, T2, T3 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3)=0
 

详细描述

template<class T1, class T2, class T3>
class SlotBase3< T1, T2, T3 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base4-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase4< T1, T2, T3, T4 > 成员列表

成员的完整列表,这些成员属于 SlotBase4< T1, T2, T3, T4 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4)=0 (定义于 SlotBase4< T1, T2, T3, T4 >)SlotBase4< T1, T2, T3, T4 >pure virtual
~SlotBase4() (定义于 SlotBase4< T1, T2, T3, T4 >)SlotBase4< T1, T2, T3, T4 >inlinevirtual

================================================ FILE: doc/class_slot_base4.html ================================================ CZPlayer: SlotBase4< T1, T2, T3, T4 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase4< T1, T2, T3, T4 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase4< T1, T2, T3, T4 > 继承关系图:
SlotImpl4< T, T1, T2, T3, T4 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4)=0
 

详细描述

template<class T1, class T2, class T3, class T4>
class SlotBase4< T1, T2, T3, T4 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base5-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase5< T1, T2, T3, T4, T5 > 成员列表

成员的完整列表,这些成员属于 SlotBase5< T1, T2, T3, T4, T5 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)=0 (定义于 SlotBase5< T1, T2, T3, T4, T5 >)SlotBase5< T1, T2, T3, T4, T5 >pure virtual
~SlotBase5() (定义于 SlotBase5< T1, T2, T3, T4, T5 >)SlotBase5< T1, T2, T3, T4, T5 >inlinevirtual

================================================ FILE: doc/class_slot_base5.html ================================================ CZPlayer: SlotBase5< T1, T2, T3, T4, T5 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase5< T1, T2, T3, T4, T5 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase5< T1, T2, T3, T4, T5 > 继承关系图:
SlotImpl5< T, T1, T2, T3, T4, T5 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)=0
 

详细描述

template<class T1, class T2, class T3, class T4, class T5>
class SlotBase5< T1, T2, T3, T4, T5 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base6-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase6< T1, T2, T3, T4, T5, T6 > 成员列表

成员的完整列表,这些成员属于 SlotBase6< T1, T2, T3, T4, T5, T6 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)=0 (定义于 SlotBase6< T1, T2, T3, T4, T5, T6 >)SlotBase6< T1, T2, T3, T4, T5, T6 >pure virtual
~SlotBase6() (定义于 SlotBase6< T1, T2, T3, T4, T5, T6 >)SlotBase6< T1, T2, T3, T4, T5, T6 >inlinevirtual

================================================ FILE: doc/class_slot_base6.html ================================================ CZPlayer: SlotBase6< T1, T2, T3, T4, T5, T6 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase6< T1, T2, T3, T4, T5, T6 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase6< T1, T2, T3, T4, T5, T6 > 继承关系图:
SlotImpl6< T, T1, T2, T3, T4, T5, T6 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)=0
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6>
class SlotBase6< T1, T2, T3, T4, T5, T6 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base7-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase7< T1, T2, T3, T4, T5, T6, T7 > 成员列表

成员的完整列表,这些成员属于 SlotBase7< T1, T2, T3, T4, T5, T6, T7 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)=0 (定义于 SlotBase7< T1, T2, T3, T4, T5, T6, T7 >)SlotBase7< T1, T2, T3, T4, T5, T6, T7 >pure virtual
~SlotBase7() (定义于 SlotBase7< T1, T2, T3, T4, T5, T6, T7 >)SlotBase7< T1, T2, T3, T4, T5, T6, T7 >inlinevirtual

================================================ FILE: doc/class_slot_base7.html ================================================ CZPlayer: SlotBase7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase7< T1, T2, T3, T4, T5, T6, T7 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase7< T1, T2, T3, T4, T5, T6, T7 > 继承关系图:
SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)=0
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
class SlotBase7< T1, T2, T3, T4, T5, T6, T7 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base8-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 > 成员列表

成员的完整列表,这些成员属于 SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)=0 (定义于 SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >)SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >pure virtual
~SlotBase8() (定义于 SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >)SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >inlinevirtual

================================================ FILE: doc/class_slot_base8.html ================================================ CZPlayer: SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 > 继承关系图:
SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)=0
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
class SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_base9-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 成员列表

成员的完整列表,这些成员属于 SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)=0 (定义于 SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >pure virtual
~SlotBase9() (定义于 SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inlinevirtual

================================================ FILE: doc/class_slot_base9.html ================================================ CZPlayer: SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考abstract

#include <signal_slot.h>

类 SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 > 继承关系图:
SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >

Public 成员函数

virtual void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)=0
 

详细描述

template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
class SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >

< 槽接口类槽模板类


================================================ FILE: doc/class_slot_impl-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl< T > 成员列表

成员的完整列表,这些成员属于 SlotImpl< T >,包括所有继承而来的类成员

exec() (定义于 SlotImpl< T >)SlotImpl< T >inlinevirtual
SlotImpl(T *pObj, void(T::*func)()) (定义于 SlotImpl< T >)SlotImpl< T >inline
~SlotBase() (定义于 SlotBase)SlotBaseinlinevirtual

================================================ FILE: doc/class_slot_impl.html ================================================ CZPlayer: SlotImpl< T > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl< T > 模板类 参考

#include <signal_slot.h>

类 SlotImpl< T > 继承关系图:
SlotBase

Public 成员函数

 SlotImpl (T *pObj, void(T::*func)())
 
void exec ()
 

详细描述

template<class T>
class SlotImpl< T >


================================================ FILE: doc/class_slot_impl1-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl1< T, T1 > 成员列表

成员的完整列表,这些成员属于 SlotImpl1< T, T1 >,包括所有继承而来的类成员

exec(T1 t1) (定义于 SlotImpl1< T, T1 >)SlotImpl1< T, T1 >inlinevirtual
SlotImpl1(T *pObj, void(T::*func)(T1)) (定义于 SlotImpl1< T, T1 >)SlotImpl1< T, T1 >inline
~SlotBase1() (定义于 SlotBase1< T1 >)SlotBase1< T1 >inlinevirtual

================================================ FILE: doc/class_slot_impl1.html ================================================ CZPlayer: SlotImpl1< T, T1 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl1< T, T1 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl1< T, T1 > 继承关系图:
SlotBase1< T1 >

Public 成员函数

 SlotImpl1 (T *pObj, void(T::*func)(T1))
 
void exec (T1 t1)
 

详细描述

template<class T, class T1>
class SlotImpl1< T, T1 >


================================================ FILE: doc/class_slot_impl2-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl2< T, T1, T2 > 成员列表

成员的完整列表,这些成员属于 SlotImpl2< T, T1, T2 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2) (定义于 SlotImpl2< T, T1, T2 >)SlotImpl2< T, T1, T2 >inlinevirtual
SlotImpl2(T *pObj, void(T::*func)(T1, T2)) (定义于 SlotImpl2< T, T1, T2 >)SlotImpl2< T, T1, T2 >inline
~SlotBase2() (定义于 SlotBase2< T1, T2 >)SlotBase2< T1, T2 >inlinevirtual

================================================ FILE: doc/class_slot_impl2.html ================================================ CZPlayer: SlotImpl2< T, T1, T2 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl2< T, T1, T2 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl2< T, T1, T2 > 继承关系图:
SlotBase2< T1, T2 >

Public 成员函数

 SlotImpl2 (T *pObj, void(T::*func)(T1, T2))
 
void exec (T1 t1, T2 t2)
 

详细描述

template<class T, class T1, class T2>
class SlotImpl2< T, T1, T2 >


================================================ FILE: doc/class_slot_impl3-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl3< T, T1, T2, T3 > 成员列表

成员的完整列表,这些成员属于 SlotImpl3< T, T1, T2, T3 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3) (定义于 SlotImpl3< T, T1, T2, T3 >)SlotImpl3< T, T1, T2, T3 >inlinevirtual
SlotImpl3(T *pObj, void(T::*func)(T1, T2, T3)) (定义于 SlotImpl3< T, T1, T2, T3 >)SlotImpl3< T, T1, T2, T3 >inline
~SlotBase3() (定义于 SlotBase3< T1, T2, T3 >)SlotBase3< T1, T2, T3 >inlinevirtual

================================================ FILE: doc/class_slot_impl3.html ================================================ CZPlayer: SlotImpl3< T, T1, T2, T3 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl3< T, T1, T2, T3 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl3< T, T1, T2, T3 > 继承关系图:
SlotBase3< T1, T2, T3 >

Public 成员函数

 SlotImpl3 (T *pObj, void(T::*func)(T1, T2, T3))
 
void exec (T1 t1, T2 t2, T3 t3)
 

详细描述

template<class T, class T1, class T2, class T3>
class SlotImpl3< T, T1, T2, T3 >


================================================ FILE: doc/class_slot_impl4-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl4< T, T1, T2, T3, T4 > 成员列表

成员的完整列表,这些成员属于 SlotImpl4< T, T1, T2, T3, T4 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4) (定义于 SlotImpl4< T, T1, T2, T3, T4 >)SlotImpl4< T, T1, T2, T3, T4 >inlinevirtual
SlotImpl4(T *pObj, void(T::*func)(T1, T2, T3, T4)) (定义于 SlotImpl4< T, T1, T2, T3, T4 >)SlotImpl4< T, T1, T2, T3, T4 >inline
~SlotBase4() (定义于 SlotBase4< T1, T2, T3, T4 >)SlotBase4< T1, T2, T3, T4 >inlinevirtual

================================================ FILE: doc/class_slot_impl4.html ================================================ CZPlayer: SlotImpl4< T, T1, T2, T3, T4 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl4< T, T1, T2, T3, T4 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl4< T, T1, T2, T3, T4 > 继承关系图:
SlotBase4< T1, T2, T3, T4 >

Public 成员函数

 SlotImpl4 (T *pObj, void(T::*func)(T1, T2, T3, T4))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4)
 

详细描述

template<class T, class T1, class T2, class T3, class T4>
class SlotImpl4< T, T1, T2, T3, T4 >


================================================ FILE: doc/class_slot_impl5-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl5< T, T1, T2, T3, T4, T5 > 成员列表

成员的完整列表,这些成员属于 SlotImpl5< T, T1, T2, T3, T4, T5 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) (定义于 SlotImpl5< T, T1, T2, T3, T4, T5 >)SlotImpl5< T, T1, T2, T3, T4, T5 >inlinevirtual
SlotImpl5(T *pObj, void(T::*func)(T1, T2, T3, T4, T5)) (定义于 SlotImpl5< T, T1, T2, T3, T4, T5 >)SlotImpl5< T, T1, T2, T3, T4, T5 >inline
~SlotBase5() (定义于 SlotBase5< T1, T2, T3, T4, T5 >)SlotBase5< T1, T2, T3, T4, T5 >inlinevirtual

================================================ FILE: doc/class_slot_impl5.html ================================================ CZPlayer: SlotImpl5< T, T1, T2, T3, T4, T5 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl5< T, T1, T2, T3, T4, T5 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl5< T, T1, T2, T3, T4, T5 > 继承关系图:
SlotBase5< T1, T2, T3, T4, T5 >

Public 成员函数

 SlotImpl5 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
 

详细描述

template<class T, class T1, class T2, class T3, class T4, class T5>
class SlotImpl5< T, T1, T2, T3, T4, T5 >


================================================ FILE: doc/class_slot_impl6-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl6< T, T1, T2, T3, T4, T5, T6 > 成员列表

成员的完整列表,这些成员属于 SlotImpl6< T, T1, T2, T3, T4, T5, T6 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) (定义于 SlotImpl6< T, T1, T2, T3, T4, T5, T6 >)SlotImpl6< T, T1, T2, T3, T4, T5, T6 >inlinevirtual
SlotImpl6(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6)) (定义于 SlotImpl6< T, T1, T2, T3, T4, T5, T6 >)SlotImpl6< T, T1, T2, T3, T4, T5, T6 >inline
~SlotBase6() (定义于 SlotBase6< T1, T2, T3, T4, T5, T6 >)SlotBase6< T1, T2, T3, T4, T5, T6 >inlinevirtual

================================================ FILE: doc/class_slot_impl6.html ================================================ CZPlayer: SlotImpl6< T, T1, T2, T3, T4, T5, T6 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl6< T, T1, T2, T3, T4, T5, T6 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl6< T, T1, T2, T3, T4, T5, T6 > 继承关系图:
SlotBase6< T1, T2, T3, T4, T5, T6 >

Public 成员函数

 SlotImpl6 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
 

详细描述

template<class T, class T1, class T2, class T3, class T4, class T5, class T6>
class SlotImpl6< T, T1, T2, T3, T4, T5, T6 >


================================================ FILE: doc/class_slot_impl7-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 > 成员列表

成员的完整列表,这些成员属于 SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) (定义于 SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >)SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >inlinevirtual
SlotImpl7(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7)) (定义于 SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >)SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >inline
~SlotBase7() (定义于 SlotBase7< T1, T2, T3, T4, T5, T6, T7 >)SlotBase7< T1, T2, T3, T4, T5, T6, T7 >inlinevirtual

================================================ FILE: doc/class_slot_impl7.html ================================================ CZPlayer: SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 > 继承关系图:
SlotBase7< T1, T2, T3, T4, T5, T6, T7 >

Public 成员函数

 SlotImpl7 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
 

详细描述

template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
class SlotImpl7< T, T1, T2, T3, T4, T5, T6, T7 >


================================================ FILE: doc/class_slot_impl8-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 > 成员列表

成员的完整列表,这些成员属于 SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) (定义于 SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >)SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >inlinevirtual
SlotImpl8(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8)) (定义于 SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >)SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >inline
~SlotBase8() (定义于 SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >)SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >inlinevirtual

================================================ FILE: doc/class_slot_impl8.html ================================================ CZPlayer: SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 > 继承关系图:
SlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >

Public 成员函数

 SlotImpl8 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
 

详细描述

template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
class SlotImpl8< T, T1, T2, T3, T4, T5, T6, T7, T8 >


================================================ FILE: doc/class_slot_impl9-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 > 成员列表

成员的完整列表,这些成员属于 SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >,包括所有继承而来的类成员

exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) (定义于 SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >)SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >inlinevirtual
SlotImpl9(T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) (定义于 SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >)SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >inline
~SlotBase9() (定义于 SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >)SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >inlinevirtual

================================================ FILE: doc/class_slot_impl9.html ================================================ CZPlayer: SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 > 模板类 参考

#include <signal_slot.h>

类 SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 > 继承关系图:
SlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >

Public 成员函数

 SlotImpl9 (T *pObj, void(T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
 
void exec (T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
 

详细描述

template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
class SlotImpl9< T, T1, T2, T3, T4, T5, T6, T7, T8, T9 >


================================================ FILE: doc/class_sound_control-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
SoundControl 成员列表

成员的完整列表,这些成员属于 SoundControl,包括所有继承而来的类成员

getVolume(int dev)SoundControlstatic
setVolume(long volume, long device=0)SoundControlstatic

================================================ FILE: doc/class_sound_control.html ================================================ CZPlayer: SoundControl类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <SoundControl.h>

静态 Public 成员函数

static bool setVolume (long volume, long device=0)
 
static unsigned getVolume (int dev)
 

详细描述

音量控制类

成员函数说明

unsigned SoundControl::getVolume ( int  dev)
static

得到设备的音量

参数
device设备类型 0,1,2 分别表示主音量, 波形,MIDI,LINE,IN,默认为0
返回
音量
bool SoundControl::setVolume ( long  volume,
long  device = 0 
)
static

设置设备的音量

参数
volume表示音量的大小, 设置与返回音量的值用的是百分比,即音量从0 -100,而不是设备的绝对值
device设备类型 0,1,2 分别表示主音量, 波形,MIDI,LINE,IN,默认为0
返回
true 表示设置音量的大小的操作成功,否则失败

================================================ FILE: doc/class_spectrograph-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Spectrograph 成员列表

成员的完整列表,这些成员属于 Spectrograph,包括所有继承而来的类成员

handleSpectrumChanged(const vector< float > &vecFrequency)Spectrographslot
paintEvent(QPaintEvent *event)Spectrographprotectedvirtual
reset()Spectrograph
setParams(const double &lowFreq, const double &highFreq)Spectrograph
Spectrograph(QWidget *parent=NULL)Spectrograph
~Spectrograph()Spectrograph

================================================ FILE: doc/class_spectrograph.html ================================================ CZPlayer: Spectrograph类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <SpectroGraph.h>

类 Spectrograph 继承关系图:

Public 槽

void handleSpectrumChanged (const vector< float > &vecFrequency)
 

Public 成员函数

 Spectrograph (QWidget *parent=NULL)
 
 ~Spectrograph ()
 
void setParams (const double &lowFreq, const double &highFreq)
 
void reset ()
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *event)
 

详细描述

频谱绘制

构造及析构函数说明

Spectrograph::Spectrograph ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
Spectrograph::~Spectrograph ( )

析构函数.

成员函数说明

void Spectrograph::handleSpectrumChanged ( const vector< float > &  vecFrequency)
slot

频谱数据改变

参数
vecFrequency频谱数据
void Spectrograph::paintEvent ( QPaintEvent *  event)
protectedvirtual

虚函数,重新实现paintEvent函数

参数
eventQPaintEvent类型
void Spectrograph::reset ( )

重置频谱

void Spectrograph::setParams ( const double &  lowFreq,
const double &  highFreq 
)

设置参数

参数
lowFreq频谱下界
highFreq频谱上节

================================================ FILE: doc/class_thanks_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ThanksPage 成员列表

成员的完整列表,这些成员属于 ThanksPage,包括所有继承而来的类成员

m_thanksLabelThanksPage
ThanksPage(QWidget *parent=NULL)ThanksPage
~ThanksPage(void)ThanksPage

================================================ FILE: doc/class_thanks_page.html ================================================ CZPlayer: ThanksPage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

#include <ThanksPage.h>

类 ThanksPage 继承关系图:

Public 成员函数

 ThanksPage (QWidget *parent=NULL)
 
 ~ThanksPage (void)
 

Public 属性

QLabel * m_thanksLabel
 

详细描述

感谢页面

构造及析构函数说明

ThanksPage::ThanksPage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
ThanksPage::~ThanksPage ( void  )

析构函数.

类成员变量说明

QLabel* ThanksPage::m_thanksLabel

感谢文本


================================================ FILE: doc/class_update_page-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
UpdatePage 成员列表

成员的完整列表,这些成员属于 UpdatePage,包括所有继承而来的类成员

UpdatePage(QWidget *parent=NULL)UpdatePage
~UpdatePage(void)UpdatePage

================================================ FILE: doc/class_update_page.html ================================================ CZPlayer: UpdatePage类 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
UpdatePage类 参考

#include <UpdatePage.h>

类 UpdatePage 继承关系图:

Public 成员函数

 UpdatePage (QWidget *parent=NULL)
 
 ~UpdatePage (void)
 

详细描述

软件更新页面

构造及析构函数说明

UpdatePage::UpdatePage ( QWidget *  parent = NULL)

构造函数

参数
parent父窗口指针,默认为NULL
UpdatePage::~UpdatePage ( void  )

析构函数.


================================================ FILE: doc/classes.html ================================================ CZPlayer: 类索引
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类索引
A | C | D | E | G | H | L | M | N | R | S | T | U | W | X | _
  A  
  D  
MediaWidget   Slot4   
  W  
MinMusicWidget   Slot5   
AboutPage   DS_StartBufferHelper::Data   MusicInfoEntity   Slot6   WAVEFORMATEXTENSIBLE   
AboutPanel   DBModule   MusicList   Slot7   
  _  
AlbumThread   DownloadListPanel   MusicListSaveFormatEntity   Slot8   
AuthorPage   DownloadSettingsPage   MusicListWidget   Slot9   _ACMWaveFormat   
  C  
DS_AudioDeviceCache   MusicLrc   SlotBase   _DVI_ADPCM_ENCODE_STATE_STEREO   
DS_Info   
  N  
SlotBase1   _DVI_ADPCM_INFO   
CAudioStream   DS_RefreshCacheStruct   SlotBase2   _DVI_ADPCM_STATE_STEREO   
CBasicPlayer   DS_StartBufferHelper   NoFocusDelegate   SlotBase3   _DVIADPCMBlockHeader   
CCriticalSection   
  E  
  R  
SlotBase4   _DVIADPCMHeader   
CCustomMemoryStream   SlotBase5   _ID3Tag   
CFastFourierTransform   EditHotkeyDialog   RadioPanel   SlotBase6   _ID3v2Frame   
CFileInput   
  G  
RankingPanel   SlotBase7   _ID3v2Tag   
CFileStream   
  S  
SlotBase8   _MS_ADPCM_COEF_SET   
CHandleStream   GeneralSettingsPage   SlotBase9   _MS_ADPCM_INFO   
CInput   GlobalConfig   SearchPanel   SlotImpl   _MSADPCMBlockHeaderMono   
CMemoryStream   GlobalHotKey   SharedDialog   SlotImpl1   _MSADPCMBlockHeaderStereo   
CMp3Input   
  H  
Signal   SlotImpl2   _RiffHeader   
CollectionPanel   Signal1   SlotImpl3   _WaveHeader   
ConfigDialog   HotKeysSettingsPage   Signal2   SlotImpl4   _WaveHeaderEx   
CPlayThread   HotKeysTableWidget   Signal3   SlotImpl5   _WMA_SYNC_READER   
CSpectrumAnalyser   
  L  
Signal4   SlotImpl6   _WMAFormatSpec   
CSpectrumAnalyserThread   Signal5   SlotImpl7   
  d  
CStream   LoadMusicThread   Signal6   SlotImpl8   
CStreamedInput   LoadMusicThreadEvent   Signal7   SlotImpl9   dither   
CSystem   LrcDemo   Signal8   SoundControl   
  t  
CThread   LrcPortraitPanel   Signal9   Spectrograph   
CVorbisInput   LrcSettingsPage   Slot   
  T  
tag_DirectAudioDeviceDescription   
CWaveConverter   LrcThread   Slot1   
  x  
CWaveInput   
  M  
Slot2   ThanksPage   
CWmaInput   Slot3   
  U  
xing   
MainWidget   
UpdatePage   
A | C | D | E | G | H | L | M | N | R | S | T | U | W | X | _

================================================ FILE: doc/dir_0b6ee6e7e9547e675db4add2e5de97da.html ================================================ CZPlayer: Engine 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Engine 目录参考

文件

文件  AudioStream.cpp
 
文件  AudioStream.h [代码]
 
文件  BasicPlayer.cpp
 播放引擎实现文件。
 
文件  BasicPlayer.h [代码]
 播放引擎头文件。
 
文件  CriticalSection.h [代码]
 
文件  FastFourierTransform.cpp
 
文件  FastFourierTransform.h [代码]
 
文件  IO.cpp
 
文件  IO.h [代码]
 
文件  SoundControl.cpp
 音量控制类实现文件。
 
文件  SoundControl.h [代码]
 音量控制类头文件。
 
文件  SpectroGraph.cpp
 频谱绘制实现文件。
 
文件  SpectroGraph.h [代码]
 频谱绘制头文件。
 
文件  Stream.cpp
 
文件  Stream.h [代码]
 
文件  Thread.h [代码]
 
文件  Utils.cpp
 
文件  Utils.h [代码]
 
文件  WMWrapper.cpp
 

================================================ FILE: doc/dir_39ce8d35579d5eb10e41a1450265d156.html ================================================ CZPlayer: DB 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DB 目录参考

文件

文件  DBModule.cpp
 数据库模块头文件。
 
文件  DBModule.h [代码]
 数据库模块头文件。
 

================================================ FILE: doc/dir_4d857fb7e9085ae5b88ad2c12868c8c8.html ================================================ CZPlayer: LrcLabel 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
LrcLabel 目录参考

文件

文件  MusicLrc.cpp
 歌词界面实现文件。
 
文件  MusicLrc.h [代码]
 歌词界面头文件。
 

================================================ FILE: doc/dir_800159ee4c5072e219532c73d0742501.html ================================================ CZPlayer: MusicList 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MusicList 目录参考

文件

文件  MusicList.cpp
 音乐列表实现文件。
 
文件  MusicList.h [代码]
 音乐列表头文件。
 
文件  MusicListWidget.cpp
 歌曲列表面板实现文件。
 
文件  MusicListWidget.h [代码]
 歌曲列表面板头文件。
 
文件  SharedDialog.cpp
 歌曲分享对话框实现文件。
 
文件  SharedDialog.h [代码]
 歌曲分享对话框头文件。
 

================================================ FILE: doc/dir_8f184a2117dd7a79280d84efd9c8507d.html ================================================ CZPlayer: MediaWidget 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MediaWidget 目录参考

文件

文件  CollectionPanel.cpp
 收藏面板实现文件。
 
文件  CollectionPanel.h [代码]
 收藏面板头文件。
 
文件  DownloadListPanel.cpp
 下载列表面板实现文件。
 
文件  DownloadListPanel.h [代码]
 下载列表面板头文件。
 
文件  LrcPortraitPanel.cpp
 歌词写真面板实现文件。
 
文件  LrcPortraitPanel.h [代码]
 歌词写真面板头文件。
 
文件  MediaWidget.cpp
 媒体界面实现文件。
 
文件  MediaWidget.h [代码]
 媒体界面头文件。
 
文件  RadioPanel.cpp
 电台面板实现文件。
 
文件  RadioPanel.h [代码]
 电台面板头文件。
 
文件  RankingPanel.cpp
 榜单面板实现文件。
 
文件  RankingPanel.h [代码]
 榜单面板头文件。
 
文件  SearchPanel.cpp
 搜索面板实现文件。
 
文件  SearchPanel.h [代码]
 搜索面板头文件。
 

================================================ FILE: doc/dir_9ee117705b853058628419415d05a484.html ================================================ CZPlayer: MainWidget 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MainWidget 目录参考

文件

文件  MainWidget.cpp
 
文件  MainWidget.h [代码]
 播放器主界面头文件。
 

================================================ FILE: doc/dir_a625c670f828dfaff80322b07e1365a6.html ================================================ CZPlayer: Entity 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Entity 目录参考

文件

文件  MusicInfoEntity.cpp
 音乐信息实体实现文件。
 
文件  MusicInfoEntity.h [代码]
 音乐信息实体头文件。
 
文件  MusicListSaveFormatEntity.cpp
 音乐列表保存格式实体实现文件。
 
文件  MusicListSaveFormatEntity.h [代码]
 音乐列表保存格式实体头文件。
 

================================================ FILE: doc/dir_abd33bfc052dc4b28a34b6a77a4d5bc7.html ================================================ CZPlayer: ConfigPanel 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
ConfigPanel 目录参考

文件

文件  ConfigDialog.cpp
 全局配置实现文件。
 
文件  ConfigDialog.h [代码]
 全局配置头文件。
 
文件  DownloadSettingsPage.cpp
 下载设置页面实现文件。
 
文件  DownloadSettingsPage.h [代码]
 下载设置页面头文件。
 
文件  EditHotkeyDialog.cpp
 热键编辑对话框实现文件。
 
文件  EditHotkeyDialog.h [代码]
 热键编辑对话框头文件。
 
文件  GeneralSettingsPage.cpp
 一般设置页面实现文件。
 
文件  GeneralSettingsPage.h [代码]
 一般设置页面头文件。
 
文件  Global.cpp
 
文件  Global.h [代码]
 
文件  GlobalConfig.cpp
 全局配置实现文件。
 
文件  GlobalConfig.h [代码]
 全局配置头文件。
 
文件  HotkeysSettingsPage.cpp
 热键设置页面实现文件。
 
文件  HotkeysSettingsPage.h [代码]
 热键设置页面头文件。
 
文件  HotkeysTableWidget.cpp
 热键页面实现文件。
 
文件  HotkeysTableWidget.h [代码]
 热键页面头文件。
 
文件  LrcDemo.cpp
 歌词模板实现文件。
 
文件  LrcDemo.h [代码]
 歌词模板头文件。
 
文件  LrcSettingsPage.cpp
 歌词设置页面实现文件。
 
文件  LrcSettingsPage.h [代码]
 歌词设置页面头文件。
 
文件  UpdatePage.cpp
 软件更新页面实现文件。
 
文件  UpdatePage.h [代码]
 软件更新页面头文件。
 

================================================ FILE: doc/dir_bbfe1637124d83753e4f60ab7a9ad152.html ================================================ CZPlayer: MinWidget 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
MinWidget 目录参考

文件

文件  MinMusicWidget.cpp
 迷你界面实现文件。
 
文件  MinMusicWidget.h [代码]
 迷你界面头文件。
 

================================================ FILE: doc/dir_c211989d999a6a303a2b08461c3c22b8.html ================================================ CZPlayer: Thread 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Thread 目录参考

文件

文件  AlbumThread.cpp
 专辑下载线程实现文件。
 
文件  AlbumThread.h [代码]
 专辑下载线程头文件。
 
文件  LoadMusicThread.cpp
 音乐加载线程实现文件。
 
文件  LoadMusicThread.h [代码]
 音乐加载线程头文件。
 
文件  LrcThread.cpp
 歌词下载线程头文件。
 
文件  LrcThread.h [代码]
 歌词下载线程头文件。
 

================================================ FILE: doc/dir_c6310732a22f63c0c2fc5595561e68f1.html ================================================ CZPlayer: Core 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
Core 目录参考

文件

文件  GlobalHotkey.cpp
 全局热键实现文件。
 
文件  GlobalHotkey.h [代码]
 全局热键头文件。
 
文件  NoFocusDelegate.cpp
 
文件  NoFocusDelegate.h [代码]
 
文件  signal_slot.h [代码]
 
文件  StatusDefine.h [代码]
 状态代码定义头文件。
 
文件  TR.h [代码]
 转码文件。
 

================================================ FILE: doc/dir_db9980dfd90e37473d4dfba3eb448642.html ================================================ CZPlayer: AboutPanel 目录参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
AboutPanel 目录参考

文件

文件  AboutPage.cpp
 关于页面实现文件。
 
文件  AboutPage.h [代码]
 关于页面头文件。
 
文件  AboutPanel.cpp
 关于面板实现文件。
 
文件  AboutPanel.h [代码]
 关于面板头文件。
 
文件  AuthorPage.cpp
 作者页面实现文件。
 
文件  AuthorPage.h [代码]
 作者页面头文件。
 
文件  ThanksPage.cpp
 感谢页面实现文件。
 
文件  ThanksPage.h [代码]
 感谢页面头文件。
 

================================================ FILE: doc/doxygen.css ================================================ /* The standard CSS for doxygen 1.8.6 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ h1.groupheader { font-size: 150%; } .title { font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } h2.groupheader { border-bottom: 1px solid #B2B364; color: #484923; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3.groupheader { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd { margin-top: 2px; } p.starttd { margin-top: 0px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #F1F2E4; border: 1px solid #C3C486; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #57582B; font-weight: normal; text-decoration: none; } .contents a:visited { color: #6C6D35; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #BEBF7D; color: #ffffff; border: 1px double #B1B363; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 4px 6px; margin: 4px 8px 4px 2px; background-color: #FCFCFA; border: 1px solid #D7D8B0; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #F1F2E4; font-weight: bold; border: 1px solid #D7D8B0; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #F1F2E4; border: 1px solid #D7D8B0; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #F3F3E7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F9F9F4; border-left: 2px solid #BEBF7D; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #C3C486; } th.dirtab { background: #F1F2E4; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #747539; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #FBFBF7; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memSeparator { border-bottom: 1px solid #DEE4F0; line-height: 1px; margin: 0px; padding: 0px; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #6C6D35; white-space: nowrap; font-size: 80%; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #6C6D35; font-weight: normal; margin-left: 9px; } .memnav { background-color: #F1F2E4; border: 1px solid #C3C486; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: bold; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #C6C78C; border-left: 1px solid #C6C78C; border-right: 1px solid #C6C78C; padding: 6px 0px 6px 0px; color: #2A2A14; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #EBECD7; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; } .memdoc, dl.reflist dd { border-bottom: 1px solid #C6C78C; border-left: 1px solid #C6C78C; border-right: 1px solid #C6C78C; padding: 6px 10px 2px 10px; background-color: #FCFCFA; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #A2A450; border-top:1px solid #81823F; border-left:1px solid #81823F; border-right:1px solid #D7D8B0; border-bottom:1px solid #D7D8B0; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; vertical-align: middle; } /* @end */ /* these are for tree view when not used as main index */ div.directory { margin: 10px 0px; border-top: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; width: 100%; } .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F9F9F4; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #57582B; } div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #333419; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #38381B; padding: 3px 7px 2px; } table.doxtable th { background-color: #4C4C25; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { /*width: 100%;*/ margin-bottom: 10px; border: 1px solid #C6C78C; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #C6C78C; border-bottom: 1px solid #C6C78C; vertical-align: top; } .fieldtable td.fieldname { padding-top: 3px; } .fieldtable td.fielddoc { border-bottom: 1px solid #C6C78C; /*width: 100%;*/ } .fieldtable td.fielddoc p:first-child { margin-top: 0px; } .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #EBECD7; font-size: 90%; color: #2A2A14; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #C6C78C; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; color:#B3B567; border:solid 1px #D6D7AD; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#494A24; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; color: #303017; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; } .navpath li.navelem a:hover { color:#97994A; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#494A24; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #FBFBF7; margin: 0px; border-bottom: 1px solid #D7D8B0; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #81823F; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .diagraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #B7B86E; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#434421; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F8F8F0; border: 1px solid #E4E5CA; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #6C6D35; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } ================================================ FILE: doc/dynsections.js ================================================ function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); var summary = $('#'+base+'-summary'); var content = $('#'+base+'-content'); var trigger = $('#'+base+'-trigger'); var src=$(trigger).attr('src'); if (content.is(':visible')===true) { content.hide(); summary.show(); $(linkObj).addClass('closed').removeClass('opened'); $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); } else { content.show(); summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); } return false; } function updateStripes() { $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } function toggleLevel(level) { $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (l CZPlayer: 文件列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
文件列表
这里列出了所有文档化的文件,并附带简要说明:
o*AboutPage.cpp关于页面实现文件。
o*AboutPage.h关于页面头文件。
o*AboutPanel.cpp关于面板实现文件。
o*AboutPanel.h关于面板头文件。
o*AlbumThread.cpp专辑下载线程实现文件。
o*AlbumThread.h专辑下载线程头文件。
o*AudioStream.h
o*AuthorPage.cpp作者页面实现文件。
o*AuthorPage.h作者页面头文件。
o*BasicPlayer.cpp播放引擎实现文件。
o*BasicPlayer.h播放引擎头文件。
o*CollectionPanel.cpp收藏面板实现文件。
o*CollectionPanel.h收藏面板头文件。
o*ConfigDialog.cpp全局配置实现文件。
o*ConfigDialog.h全局配置头文件。
o*CriticalSection.h
o*DBModule.cpp数据库模块头文件。
o*DBModule.h数据库模块头文件。
o*DownloadListPanel.cpp下载列表面板实现文件。
o*DownloadListPanel.h下载列表面板头文件。
o*DownloadSettingsPage.cpp下载设置页面实现文件。
o*DownloadSettingsPage.h下载设置页面头文件。
o*EditHotkeyDialog.cpp热键编辑对话框实现文件。
o*EditHotkeyDialog.h热键编辑对话框头文件。
o*FastFourierTransform.h
o*GeneralSettingsPage.cpp一般设置页面实现文件。
o*GeneralSettingsPage.h一般设置页面头文件。
o*Global.h
o*GlobalConfig.cpp全局配置实现文件。
o*GlobalConfig.h全局配置头文件。
o*GlobalHotkey.cpp全局热键实现文件。
o*GlobalHotkey.h全局热键头文件。
o*HotkeysSettingsPage.cpp热键设置页面实现文件。
o*HotkeysSettingsPage.h热键设置页面头文件。
o*HotkeysTableWidget.cpp热键页面实现文件。
o*HotkeysTableWidget.h热键页面头文件。
o*IO.h
o*LoadMusicThread.cpp音乐加载线程实现文件。
o*LoadMusicThread.h音乐加载线程头文件。
o*LrcDemo.cpp歌词模板实现文件。
o*LrcDemo.h歌词模板头文件。
o*LrcPortraitPanel.cpp歌词写真面板实现文件。
o*LrcPortraitPanel.h歌词写真面板头文件。
o*LrcSettingsPage.cpp歌词设置页面实现文件。
o*LrcSettingsPage.h歌词设置页面头文件。
o*LrcThread.cpp歌词下载线程头文件。
o*LrcThread.h歌词下载线程头文件。
o*main.cpp程序入口。
o*MainWidget.h播放器主界面头文件。
o*MediaWidget.cpp媒体界面实现文件。
o*MediaWidget.h媒体界面头文件。
o*MinMusicWidget.cpp迷你界面实现文件。
o*MinMusicWidget.h迷你界面头文件。
o*MusicInfoEntity.cpp音乐信息实体实现文件。
o*MusicInfoEntity.h音乐信息实体头文件。
o*MusicList.cpp音乐列表实现文件。
o*MusicList.h音乐列表头文件。
o*MusicListSaveFormatEntity.cpp音乐列表保存格式实体实现文件。
o*MusicListSaveFormatEntity.h音乐列表保存格式实体头文件。
o*MusicListWidget.cpp歌曲列表面板实现文件。
o*MusicListWidget.h歌曲列表面板头文件。
o*MusicLrc.cpp歌词界面实现文件。
o*MusicLrc.h歌词界面头文件。
o*NoFocusDelegate.h
o*RadioPanel.cpp电台面板实现文件。
o*RadioPanel.h电台面板头文件。
o*RankingPanel.cpp榜单面板实现文件。
o*RankingPanel.h榜单面板头文件。
o*SearchPanel.cpp搜索面板实现文件。
o*SearchPanel.h搜索面板头文件。
o*SharedDialog.cpp歌曲分享对话框实现文件。
o*SharedDialog.h歌曲分享对话框头文件。
o*signal_slot.h
o*SoundControl.cpp音量控制类实现文件。
o*SoundControl.h音量控制类头文件。
o*SpectroGraph.cpp频谱绘制实现文件。
o*SpectroGraph.h频谱绘制头文件。
o*StatusDefine.h状态代码定义头文件。
o*Stream.h
o*ThanksPage.cpp感谢页面实现文件。
o*ThanksPage.h感谢页面头文件。
o*Thread.h
o*TR.h转码文件。
o*UpdatePage.cpp软件更新页面实现文件。
o*UpdatePage.h软件更新页面头文件。
\*Utils.h

================================================ FILE: doc/functions.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- _ -


================================================ FILE: doc/functions_a.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- a -


================================================ FILE: doc/functions_c.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- c -


================================================ FILE: doc/functions_d.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- d -


================================================ FILE: doc/functions_e.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- e -


================================================ FILE: doc/functions_f.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- f -


================================================ FILE: doc/functions_func.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- a -


================================================ FILE: doc/functions_func_c.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- c -


================================================ FILE: doc/functions_func_d.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- d -


================================================ FILE: doc/functions_func_e.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- e -


================================================ FILE: doc/functions_func_f.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- f -


================================================ FILE: doc/functions_func_g.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- g -


================================================ FILE: doc/functions_func_h.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- h -


================================================ FILE: doc/functions_func_i.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序

================================================ FILE: doc/functions_func_l.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- l -


================================================ FILE: doc/functions_func_m.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- m -


================================================ FILE: doc/functions_func_n.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- n -


================================================ FILE: doc/functions_func_o.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- o -


================================================ FILE: doc/functions_func_p.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- p -


================================================ FILE: doc/functions_func_r.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- r -


================================================ FILE: doc/functions_func_s.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- s -


================================================ FILE: doc/functions_func_t.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- t -


================================================ FILE: doc/functions_func_u.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- u -


================================================ FILE: doc/functions_func_v.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- v -


================================================ FILE: doc/functions_func_~.html ================================================ CZPlayer: 类成员 - 函数
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- ~ -


================================================ FILE: doc/functions_g.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- g -


================================================ FILE: doc/functions_h.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- h -


================================================ FILE: doc/functions_i.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- i -


================================================ FILE: doc/functions_l.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- l -


================================================ FILE: doc/functions_m.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- m -


================================================ FILE: doc/functions_n.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- n -


================================================ FILE: doc/functions_o.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- o -


================================================ FILE: doc/functions_p.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- p -


================================================ FILE: doc/functions_r.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- r -


================================================ FILE: doc/functions_s.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- s -


================================================ FILE: doc/functions_t.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- t -


================================================ FILE: doc/functions_u.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- u -


================================================ FILE: doc/functions_v.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- v -


================================================ FILE: doc/functions_vars.html ================================================ CZPlayer: 类成员 - 变量
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

================================================ FILE: doc/functions_~.html ================================================ CZPlayer: 类成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的类成员,并附带类所属的文件:

- ~ -


================================================ FILE: doc/globals.html ================================================ CZPlayer: 文件成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
这里列出了所有文档化的文件成员,并附带其详细说明:

- a -

- b -

- c -

- d -

- e -

- g -

- h -

- l -

- m -

- q -

- r -

- s -

- t -

- u -


================================================ FILE: doc/globals_defs.html ================================================ CZPlayer: 文件成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

- a -

- b -

- c -

- d -

- e -

- g -

- h -

- l -

- m -

- r -

- s -

- t -

- u -


================================================ FILE: doc/globals_enum.html ================================================ CZPlayer: 文件成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

================================================ FILE: doc/globals_eval.html ================================================ CZPlayer: 文件成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

================================================ FILE: doc/globals_vars.html ================================================ CZPlayer: 文件成员
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
 

================================================ FILE: doc/hierarchy.html ================================================ CZPlayer: 类继承关系
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
类继承关系
此继承关系列表按字典顺序粗略的排序:
[详情级别 1234]
oC_ACMWaveFormat
oC_DVI_ADPCM_ENCODE_STATE_STEREO
oC_DVI_ADPCM_INFO
oC_DVI_ADPCM_STATE_STEREO
oC_DVIADPCMBlockHeader
oC_DVIADPCMHeader
oC_ID3Tag
oC_ID3v2Frame
oC_ID3v2Tag
oC_MS_ADPCM_COEF_SET
oC_MS_ADPCM_INFO
oC_MSADPCMBlockHeaderMono
oC_MSADPCMBlockHeaderStereo
oC_RiffHeader
oC_WaveHeader
oC_WaveHeaderEx
oC_WMA_SYNC_READER
oC_WMAFormatSpec
oCCBasicPlayer
oCCCriticalSection
oCCFastFourierTransform
oCCInput
oCCSpectrumAnalyser
oCCStream
oCCSystem
oCCThread
oCDS_StartBufferHelper::Data
oCDBModule
oCdither
oCDS_AudioDeviceCache
oCDS_Info
oCDS_RefreshCacheStruct
oCDS_StartBufferHelper
oCIStream
oCMusicInfoEntity
oCMusicListSaveFormatEntity
oCQDialog
oCQLabel
oCQObject
oCQStyledItemDelegate
oCQTableWidget
oCQThread
oCQWidget
oCSignal
oCSignal1< T1 >
oCSignal2< T1, T2 >
oCSignal3< T1, T2, T3 >
oCSignal4< T1, T2, T3, T4 >
oCSignal5< T1, T2, T3, T4, T5 >
oCSignal6< T1, T2, T3, T4, T5, T6 >
oCSignal7< T1, T2, T3, T4, T5, T6, T7 >
oCSignal8< T1, T2, T3, T4, T5, T6, T7, T8 >
oCSignal9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >
oCSlot
oCSlot1< T1 >
oCSlot2< T1, T2 >
oCSlot3< T1, T2, T3 >
oCSlot4< T1, T2, T3, T4 >
oCSlot5< T1, T2, T3, T4, T5 >
oCSlot6< T1, T2, T3, T4, T5, T6 >
oCSlot7< T1, T2, T3, T4, T5, T6, T7 >
oCSlot8< T1, T2, T3, T4, T5, T6, T7, T8 >
oCSlot9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >
oCSlotBase
oCSlotBase1< T1 >
oCSlotBase2< T1, T2 >
oCSlotBase3< T1, T2, T3 >
oCSlotBase4< T1, T2, T3, T4 >
oCSlotBase5< T1, T2, T3, T4, T5 >
oCSlotBase6< T1, T2, T3, T4, T5, T6 >
oCSlotBase7< T1, T2, T3, T4, T5, T6, T7 >
oCSlotBase8< T1, T2, T3, T4, T5, T6, T7, T8 >
oCSlotBase9< T1, T2, T3, T4, T5, T6, T7, T8, T9 >
oCSoundControl
oCtag_DirectAudioDeviceDescription
oCWAVEFORMATEXTENSIBLE
\Cxing

================================================ FILE: doc/index.html ================================================ CZPlayer: 首页
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
CZPlayer 文档
==========================================================================================
3.0.0 版本  from  15-02-26
1.增加了歌曲搜索下载以及歌曲收藏功能
2.增加了在线升级功能
3.修改若干bug

================================================ FILE: doc/jquery.js ================================================ /*! * jQuery JavaScript Library v1.7.1 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Mon Nov 21 21:11:03 2011 -0500 */ (function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
Copyright (C) 2012-2015 Highway-9 Studio.
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 },lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b })}})(window); ================================================ FILE: doc/main_8cpp.html ================================================ CZPlayer: main.cpp 文件参考
CZPlayer  3.0.0
CZPlayer应用程序
main.cpp 文件参考

程序入口。 更多...

#include "MainWidget.h"
#include "TR.h"
#include <QApplication>
#include <QFile>
#include <QTextCodec>
#include <QString>
#include <QTranslator>
#include "qtsingleapplication.h"

函数

int main (int argc, char *argv[])
 

变量

const QString AppName = "CZPlayer"
 
const QString QssFilePath = ":/qss/CZPlayer.qss"
 

详细描述

程序入口。

作者
chengxuan 78728.nosp@m.0310.nosp@m.@qq.c.nosp@m.om
日期
2014-12-21
版本
3.0.0
* 历史
*          3.0.0   创建,
*          2014-12-21    by chengxuan
*
* 

变量说明

const QString AppName = "CZPlayer"

应用程序名

const QString QssFilePath = ":/qss/CZPlayer.qss"

qss文件路径


================================================ FILE: doc/search/all_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_0.js ================================================ var searchData= [ ['_5f_5fpad0_5f_5f',['__pad0__',['../class_c_basic_player.html#a9eb7fecf4500b14f50ec4f5f11f3e7ae',1,'CBasicPlayer']]], ['_5facmwaveformat',['_ACMWaveFormat',['../struct___a_c_m_wave_format.html',1,'']]], ['_5fdvi_5fadpcm_5fencode_5fstate_5fstereo',['_DVI_ADPCM_ENCODE_STATE_STEREO',['../struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o.html',1,'']]], ['_5fdvi_5fadpcm_5finfo',['_DVI_ADPCM_INFO',['../struct___d_v_i___a_d_p_c_m___i_n_f_o.html',1,'']]], ['_5fdvi_5fadpcm_5fstate_5fstereo',['_DVI_ADPCM_STATE_STEREO',['../struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o.html',1,'']]], ['_5fdviadpcmblockheader',['_DVIADPCMBlockHeader',['../struct___d_v_i_a_d_p_c_m_block_header.html',1,'']]], ['_5fdviadpcmheader',['_DVIADPCMHeader',['../struct___d_v_i_a_d_p_c_m_header.html',1,'']]], ['_5fid3tag',['_ID3Tag',['../struct___i_d3_tag.html',1,'']]], ['_5fid3v2frame',['_ID3v2Frame',['../struct___i_d3v2_frame.html',1,'']]], ['_5fid3v2tag',['_ID3v2Tag',['../struct___i_d3v2_tag.html',1,'']]], ['_5fms_5fadpcm_5fcoef_5fset',['_MS_ADPCM_COEF_SET',['../struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t.html',1,'']]], ['_5fms_5fadpcm_5finfo',['_MS_ADPCM_INFO',['../struct___m_s___a_d_p_c_m___i_n_f_o.html',1,'']]], ['_5fmsadpcmblockheadermono',['_MSADPCMBlockHeaderMono',['../struct___m_s_a_d_p_c_m_block_header_mono.html',1,'']]], ['_5fmsadpcmblockheaderstereo',['_MSADPCMBlockHeaderStereo',['../struct___m_s_a_d_p_c_m_block_header_stereo.html',1,'']]], ['_5friffheader',['_RiffHeader',['../struct___riff_header.html',1,'']]], ['_5fwaveheader',['_WaveHeader',['../struct___wave_header.html',1,'']]], ['_5fwaveheaderex',['_WaveHeaderEx',['../struct___wave_header_ex.html',1,'']]], ['_5fwma_5fsync_5freader',['_WMA_SYNC_READER',['../struct___w_m_a___s_y_n_c___r_e_a_d_e_r.html',1,'']]], ['_5fwmaformatspec',['_WMAFormatSpec',['../struct___w_m_a_format_spec.html',1,'']]] ]; ================================================ FILE: doc/search/all_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_1.js ================================================ var searchData= [ ['aboutpage',['AboutPage',['../class_about_page.html',1,'AboutPage'],['../class_about_page.html#ac52d377f31a7c9d7cf099dbfd4a3fff5',1,'AboutPage::AboutPage()']]], ['aboutpage_2ecpp',['AboutPage.cpp',['../_about_page_8cpp.html',1,'']]], ['aboutpage_2eh',['AboutPage.h',['../_about_page_8h.html',1,'']]], ['aboutpage_5fversion',['ABOUTPAGE_VERSION',['../_about_page_8h.html#acfa555ceec60c151d54787331856717f',1,'AboutPage.h']]], ['aboutpanel',['AboutPanel',['../class_about_panel.html',1,'AboutPanel'],['../class_about_panel.html#aa978a370515f2eb8e26ee48555f830e6',1,'AboutPanel::AboutPanel()']]], ['aboutpanel_2ecpp',['AboutPanel.cpp',['../_about_panel_8cpp.html',1,'']]], ['aboutpanel_2eh',['AboutPanel.h',['../_about_panel_8h.html',1,'']]], ['aboutpanel_5fversion',['ABOUTPANEL_VERSION',['../_about_panel_8h.html#adf0ceab7e72c08bd1f2517fdce0e5c21',1,'AboutPanel.h']]], ['albumdownloadfailed',['AlbumDownloadFailed',['../_status_define_8h.html#a358025838b491343e05ba15d45af477fa05471db1602d8fc961a05365f690d1bb',1,'StatusDefine.h']]], ['albumdownloadstatus',['AlbumDownloadStatus',['../_status_define_8h.html#a358025838b491343e05ba15d45af477f',1,'StatusDefine.h']]], ['albumdownloadsuccess',['AlbumDownloadSuccess',['../_status_define_8h.html#a358025838b491343e05ba15d45af477fa91de037457090fe423e0b81b6b507d79',1,'StatusDefine.h']]], ['albumpath',['albumPath',['../class_global_config.html#a61e28d38356f48866f965c927e11ec44',1,'GlobalConfig']]], ['albumthread',['AlbumThread',['../class_album_thread.html',1,'AlbumThread'],['../class_album_thread.html#a32b061eed3f353f5fdc038303130117b',1,'AlbumThread::AlbumThread()']]], ['albumthread_2ecpp',['AlbumThread.cpp',['../_album_thread_8cpp.html',1,'']]], ['albumthread_2eh',['AlbumThread.h',['../_album_thread_8h.html',1,'']]], ['albumthread_5fversion',['ALBUMTHREAD_VERSION',['../_album_thread_8h.html#a2adc8af908a8e5fbbf946cad6fa552a0',1,'AlbumThread.h']]], ['apply',['apply',['../class_download_settings_page.html#ad57295b6ad6898ea93c0434e2c57e707',1,'DownloadSettingsPage::apply()'],['../class_general_settings_page.html#ad7acec6097df8b58f51dbf3c4d125687',1,'GeneralSettingsPage::apply()'],['../class_hot_keys_settings_page.html#a7b448849a8f4320851f1dbf492d2464e',1,'HotKeysSettingsPage::apply()'],['../class_lrc_settings_page.html#a1f0c5fbce89ddec5e1bf5af4fcb60644',1,'LrcSettingsPage::apply()']]], ['appname',['AppName',['../main_8cpp.html#a792d7cf52c15cc2ff95897c5bd199acc',1,'main.cpp']]], ['authorpage',['AuthorPage',['../class_author_page.html',1,'AuthorPage'],['../class_author_page.html#a8fb8ee9b9b0e3b5fa4fbf5a427492e91',1,'AuthorPage::AuthorPage()']]], ['authorpage_2ecpp',['AuthorPage.cpp',['../_author_page_8cpp.html',1,'']]], ['authorpage_2eh',['AuthorPage.h',['../_author_page_8h.html',1,'']]], ['authorpage_5fversion',['AUTHORPAGE_VERSION',['../_author_page_8h.html#ad9e4ffe36dc6d0ae40803fb7550df71b',1,'AuthorPage.h']]], ['autogreetings',['autoGreetings',['../class_global_config.html#abb9f5e91894e324f2a579ff35b946a78',1,'GlobalConfig']]], ['autoplaymusic',['autoPlayMusic',['../class_global_config.html#ae6ded11a14b1cbb2c76c330a52b00ac6',1,'GlobalConfig']]], ['autorunplayer',['autoRunPlayer',['../class_global_config.html#a48d45e00d63c344a387933257a34b8a1',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_10.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_10.js ================================================ var searchData= [ ['radiopanel',['RadioPanel',['../class_radio_panel.html',1,'RadioPanel'],['../class_radio_panel.html#aa6c8f39c33db7f1f63e6798a0293ab09',1,'RadioPanel::RadioPanel()']]], ['radiopanel_2ecpp',['RadioPanel.cpp',['../_radio_panel_8cpp.html',1,'']]], ['radiopanel_2eh',['RadioPanel.h',['../_radio_panel_8h.html',1,'']]], ['radiopanel_5fversion',['RADIOPANEL_VERSION',['../_radio_panel_8h.html#aaa8641095f1f0815e45dc1eb1f7699b4',1,'RadioPanel.h']]], ['radius',['Radius',['../_min_music_widget_8cpp.html#a75ae4b75ad7e6bee6ce567640301a42e',1,'MinMusicWidget.cpp']]], ['rankingpanel',['RankingPanel',['../class_ranking_panel.html',1,'RankingPanel'],['../class_ranking_panel.html#a46b2be0d1f28188310800bf5d45f309f',1,'RankingPanel::RankingPanel()']]], ['rankingpanel_2ecpp',['RankingPanel.cpp',['../_ranking_panel_8cpp.html',1,'']]], ['rankingpanel_2eh',['RankingPanel.h',['../_ranking_panel_8h.html',1,'']]], ['rankingpanel_5fversion',['RANKINGPANEL_VERSION',['../_ranking_panel_8h.html#a2b52084660812b36e5342477eb02f979',1,'RankingPanel.h']]], ['readalbumurlpathfromdb',['readAlbumUrlPathFromDB',['../class_d_b_module.html#a4e5d6efc6419e40703896e5c95045f7b',1,'DBModule']]], ['readfilepath',['readFilePath',['../class_d_b_module.html#ace3c271b20909f9ecadd799e4d6e0760',1,'DBModule']]], ['readmusicinfoentity',['readMusicInfoEntity',['../class_d_b_module.html#af2d87fc2deb0116f7981d42d911d348b',1,'DBModule']]], ['readmusiclistsaveformatentity',['readMusicListSaveFormatEntity',['../class_d_b_module.html#a79611bccda3816489c069a7146b9f362',1,'DBModule']]], ['reload',['reload',['../class_global_config.html#ad041744166a17de9d6401019b9292c51',1,'GlobalConfig']]], ['reset',['reset',['../class_spectrograph.html#a63c0355273ab24b5206817695421747d',1,'Spectrograph']]], ['run',['run',['../class_album_thread.html#ac14428e9aa20cf7be7ba8e8b01f8cd01',1,'AlbumThread::run()'],['../class_load_music_thread.html#afc7d46fd8c97421bdef319eb58251d49',1,'LoadMusicThread::run()'],['../class_lrc_thread.html#acf69734636f2471172fe0f19d8cd4a27',1,'LrcThread::run()']]] ]; ================================================ FILE: doc/search/all_11.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_11.js ================================================ var searchData= [ ['save',['save',['../class_global_config.html#a7cb915baea4cf7f0b8e95a99c0f9b4c6',1,'GlobalConfig']]], ['searchpanel',['SearchPanel',['../class_search_panel.html',1,'SearchPanel'],['../class_search_panel.html#ae4da9069ad97ac85c1db41faeac0448e',1,'SearchPanel::SearchPanel()']]], ['searchpanel_2ecpp',['SearchPanel.cpp',['../_search_panel_8cpp.html',1,'']]], ['searchpanel_2eh',['SearchPanel.h',['../_search_panel_8h.html',1,'']]], ['searchpanel_5fversion',['SEARCHPANEL_VERSION',['../_search_panel_8h.html#a703b0a910b21b508d72ce79f5751d1e8',1,'SearchPanel.h']]], ['setalbumpath',['setAlbumPath',['../class_global_config.html#ac4c0bbac551af069da4acf237e22a880',1,'GlobalConfig']]], ['setautogreetings',['setAutoGreetings',['../class_global_config.html#a756f2fb271ba63ac5b0e9123a5d8995d',1,'GlobalConfig']]], ['setautoplaymusic',['setAutoPlayMusic',['../class_global_config.html#a09cc1756f576ca5562132bd9d360c3fd',1,'GlobalConfig']]], ['setautorunplayer',['setAutoRunPlayer',['../class_global_config.html#a994147096c96517895112b828c4a9a3c',1,'GlobalConfig']]], ['setconfigoptionshotkeywork',['setConfigOptionsHotkeyWork',['../class_global_hot_key.html#ad7f329a231fbaa786a63f40157bf234d',1,'GlobalHotKey']]], ['setcurrentmusicrow',['setCurrentMusicRow',['../class_music_list.html#a0066216dc9472b66c15f23283fcaf56d',1,'MusicList']]], ['setdefaultchoicecolor',['setDefaultChoiceColor',['../class_global_config.html#a53dbe42975745c8466b40eb00bab0304',1,'GlobalConfig']]], ['setdefaultplayer',['setDefaultPlayer',['../class_global_config.html#abb5e34a4c96b4459db17f6750950cec9',1,'GlobalConfig']]], ['setfilename',['setFileName',['../class_music_info_entity.html#a6354d7c348554604885948f41bb51b3a',1,'MusicInfoEntity::setFileName()'],['../class_music_list_save_format_entity.html#ab3fe17198ba6e6ef3468d4f8595ef16a',1,'MusicListSaveFormatEntity::setFileName()']]], ['setfilepath',['setFilePath',['../class_music_info_entity.html#a53b9a6a6088ffa97a6071a78f8c77abe',1,'MusicInfoEntity::setFilePath()'],['../class_music_list_save_format_entity.html#ab8c338449137d347296d47a9acc8ca04',1,'MusicListSaveFormatEntity::setFilePath()']]], ['setfontname',['setFontName',['../class_global_config.html#a4e1670f1df9385cd95d170b8a7e882c8',1,'GlobalConfig::setFontName()'],['../class_lrc_demo.html#a3482c4ed6a8760afaf3b30d1d7dc3e9c',1,'LrcDemo::setFontName()']]], ['setfontsize',['setFontSize',['../class_global_config.html#a90caad56077325e072ebd7118bce4c7a',1,'GlobalConfig::setFontSize()'],['../class_lrc_demo.html#abc6916ad2b9fc626accd2e8b2e836e25',1,'LrcDemo::setFontSize()']]], ['setfonttype',['setFontType',['../class_global_config.html#a3d05f0d5d5559c9a0191d8fd8c1df9d2',1,'GlobalConfig::setFontType()'],['../class_lrc_demo.html#acac5ca74450a5db8eb48ac3df9942c68',1,'LrcDemo::setFontType()']]], ['setlasthotkey',['setLastHotKey',['../class_global_config.html#a0048734b58ec946010cc72ec15a69236',1,'GlobalConfig']]], ['setlasthotkeywork',['setLastHotkeyWork',['../class_global_hot_key.html#ab84bfb73b127995c01061c5a29b60ec1',1,'GlobalHotKey']]], ['setlineargradient',['setLinearGradient',['../class_lrc_demo.html#a58b10ce6a71500397688886945da376b',1,'LrcDemo']]], ['setlineargradient2',['setLinearGradient2',['../class_lrc_demo.html#a217f59ab101d973d37e08f7f442c4f33',1,'LrcDemo']]], ['setlineargradient3',['setLinearGradient3',['../class_lrc_demo.html#ad42dc5427033498bb6ba268ebbcb3d39',1,'LrcDemo']]], ['setlrcdemoshadow',['setLrcDemoShadow',['../class_lrc_demo.html#a46d3eec6eeeefb37564dc4edb9c3a889',1,'LrcDemo']]], ['setlrcpath',['setLrcPath',['../class_global_config.html#a746fd1b1f53e6e6da933628fe742c681',1,'GlobalConfig']]], ['setmasklineargradient',['setMaskLinearGradient',['../class_lrc_demo.html#abfdd9a01fb1dabae9a9480e6aff24547',1,'LrcDemo']]], ['setmasklineargradient2',['setMaskLinearGradient2',['../class_lrc_demo.html#a7dc0574812a61f3e0bb5eebfd3e2ffcc',1,'LrcDemo']]], ['setmasklineargradient3',['setMaskLinearGradient3',['../class_lrc_demo.html#a9f7bc1df5f6de7fd4e7a3b107a7a3a35',1,'LrcDemo']]], ['setminmainwidgethotkeywork',['setMinMainWidgetHotkeyWork',['../class_global_hot_key.html#a2e9a1b2ee3f049121a0b35b7f7a1e902',1,'GlobalHotKey']]], ['setminmusiclrcactiontext',['setMinMusicLrcActionText',['../class_min_music_widget.html#ae976d8a3d784cce7c4c58ccdb2157e52',1,'MinMusicWidget']]], ['setmintotrayhotkey',['setMinToTrayHotKey',['../class_global_config.html#ac9b9e5f6a81c7b682cec10a1dcdbee83',1,'GlobalConfig']]], ['setmusicpath',['setMusicPath',['../class_global_config.html#ae840a0f9ff2707af1aef1ab14ee4f0bb',1,'GlobalConfig']]], ['setmute',['setMute',['../class_global_config.html#a939534ef6626673752202f3cbe06b2dc',1,'GlobalConfig']]], ['setnexthotkey',['setNextHotKey',['../class_global_config.html#ac9ab217ed35e341d3c23cdf9931758ff',1,'GlobalConfig']]], ['setnexthotkeywork',['setNextHotkeyWork',['../class_global_hot_key.html#afd87fa80768238a8d72f04193bd58318',1,'GlobalHotKey']]], ['setnoplayshang',['setNoPlayShang',['../class_global_config.html#a2e8f8c7fd29e73394ee4cf374377a6dc',1,'GlobalConfig']]], ['setnoplayxia',['setNoPlayXia',['../class_global_config.html#a311fc05adff7167c5319c1a1c91a2a41',1,'GlobalConfig']]], ['setnoplayzhong',['setNoPlayZhong',['../class_global_config.html#a0172c1dd5b0c760867eb47e98a3d2f8e',1,'GlobalConfig']]], ['setopenlistwidgethotkey',['setOpenListWidgetHotKey',['../class_global_config.html#a4e6f6d531efb025a72bce8dc3d9d7692',1,'GlobalConfig']]], ['setopenlrchotkey',['setOpenLrcHotKey',['../class_global_config.html#a95bad90491199b4a7c0c5546c1413fc3',1,'GlobalConfig']]], ['setopenmediawidgethotkey',['setOpenMediaWidgetHotKey',['../class_global_config.html#a6ea3fa3f66eadd3347e7d49148d6dbb7',1,'GlobalConfig']]], ['setopenminwidgethotkey',['setOpenMinWidgetHotKey',['../class_global_config.html#acabfd482ec2e4bfdfc41001d6d7d5c18',1,'GlobalConfig']]], ['setopenmusicfilehotkey',['setOpenMusicFileHotKey',['../class_global_config.html#a494cc0da52d8cd30658821b5b13d5045',1,'GlobalConfig']]], ['setopenmusicfilehotkeywork',['setOpenMusicfileHotkeyWork',['../class_global_hot_key.html#a56044f5695a24854e1867031972d90d8',1,'GlobalHotKey']]], ['setparams',['setParams',['../class_spectrograph.html#a7dc65ec5db7323500973cfccb65e1a33',1,'Spectrograph']]], ['setpausehotkey',['setPauseHotKey',['../class_global_config.html#a7a7f01246ff08e34c9cabcb1c7822f63',1,'GlobalConfig']]], ['setplayedshang',['setPlayedShang',['../class_global_config.html#a5974fe806433deb48e70c335f26ea9e3',1,'GlobalConfig']]], ['setplayedxia',['setPlayedXia',['../class_global_config.html#ad9af0089d855b396779a2e56a0c4c4e3',1,'GlobalConfig']]], ['setplayedzhong',['setPlayedZhong',['../class_global_config.html#a3005ea584a6193d7333cda5a7af3c910',1,'GlobalConfig']]], ['setplaymode',['setPlayMode',['../class_global_config.html#a69074fbc20b3ba94d6951b73c01b73ab',1,'GlobalConfig']]], ['setplaypausehotkeywork',['setPlayPauseHotkeyWork',['../class_global_hot_key.html#ac1810c5ac62226597fa16aafbebe8df7',1,'GlobalHotKey']]], ['setreleaseresource',['setReleaseResource',['../class_global_config.html#a9c3910cc6d1ae54771349a344829f27d',1,'GlobalConfig']]], ['setsettingshotkey',['setSettingsHotKey',['../class_global_config.html#a71b3128197ef1efd32d822ea277eaf68',1,'GlobalConfig']]], ['setshadow',['setShadow',['../class_global_config.html#adac275ef3135ea1f164a00aafce496e2',1,'GlobalConfig']]], ['setshowdownloadhotkeywork',['setShowDownloadHotkeyWork',['../class_global_hot_key.html#a99485ea33010765df811b3af1d2513e9',1,'GlobalHotKey']]], ['setshowhidemainwidgethotkeywork',['setShowHideMainWidgetHotkeyWork',['../class_global_hot_key.html#adb7137418dea05de09be6efea4b38042',1,'GlobalHotKey']]], ['setshowlrchotkeywork',['setShowLrcHotkeyWork',['../class_global_hot_key.html#a3327a5296328757033e8f091b28ceff0',1,'GlobalHotKey']]], ['setshowmusiclisthotkeywork',['setShowMusicListHotkeyWork',['../class_global_hot_key.html#a96a47e0cd5ed1414a1f31f2daa3bec3a',1,'GlobalHotKey']]], ['settime',['setTime',['../class_music_info_entity.html#ae78b87be54e88d63e7cf7c7d6187979b',1,'MusicInfoEntity::setTime()'],['../class_music_list_save_format_entity.html#aa20cfe728c87a079a6f4a0132b7d1b95',1,'MusicListSaveFormatEntity::setTime()']]], ['settingshotkey',['settingsHotKey',['../class_global_config.html#a85ffa47062f3ed166ed2cb3472e6c44e',1,'GlobalConfig']]], ['setvolume',['setVolume',['../class_global_config.html#ab181fd85899e30d076e3e4f579750190',1,'GlobalConfig::setVolume()'],['../class_sound_control.html#ab3e662d324b39b220b53f6ff6b78cef0',1,'SoundControl::setVolume()']]], ['setwork',['setWork',['../class_min_music_widget.html#aca7973ad9dde5ccdb36320f0aacf0a1e',1,'MinMusicWidget']]], ['shadow',['shadow',['../class_global_config.html#a081a43db772952e3286d41363431d38b',1,'GlobalConfig']]], ['shareddialog',['SharedDialog',['../class_shared_dialog.html',1,'SharedDialog'],['../class_shared_dialog.html#af704936a4ed890e01b7e6de494e37cf1',1,'SharedDialog::SharedDialog()']]], ['shareddialog_2ecpp',['SharedDialog.cpp',['../_shared_dialog_8cpp.html',1,'']]], ['shareddialog_2eh',['SharedDialog.h',['../_shared_dialog_8h.html',1,'']]], ['shareddialog_5fversion',['SHAREDDIALOG_VERSION',['../_shared_dialog_8h.html#a8a41ea84c0815f44f296829a2a2e20c2',1,'SharedDialog.h']]], ['sigaddmusic',['sigAddMusic',['../class_load_music_thread_event.html#a894e64fed6cda32122461c103b183bb8',1,'LoadMusicThreadEvent']]], ['sigalbumdownloadstatus',['sigAlbumDownloadStatus',['../class_album_thread.html#add4e10a3b85e53390a473a060898d7c2',1,'AlbumThread']]], ['sigalbumpathchanged',['sigAlbumPathChanged',['../class_global_config.html#ad7a4e811bf237e1341960dcbbaa98ca8',1,'GlobalConfig']]], ['sigautogreetingschanged',['sigAutoGreetingsChanged',['../class_global_config.html#accf0c883729a1d3fb32cca44a13d1221',1,'GlobalConfig']]], ['sigautoplaymusicchanged',['sigAutoPlayMusicChanged',['../class_global_config.html#a1a8601e13d6402347c8aaa183c26f0f8',1,'GlobalConfig']]], ['sigautorunplayerchanged',['sigAutoRunPlayerChanged',['../class_global_config.html#a55d0de96656fb13acb5b3624f7368328',1,'GlobalConfig']]], ['sigconfigdialogclosed',['sigConfigDialogClosed',['../class_config_dialog.html#ab4e4059aa9a3b04c31915500c7434713',1,'ConfigDialog']]], ['sigdefaultchoicecolorchanged',['sigDefaultChoiceColorChanged',['../class_global_config.html#a2855044dd57ac841f4e0490f29eeddbb',1,'GlobalConfig']]], ['sigdefaultplayerchanged',['sigDefaultPlayerChanged',['../class_global_config.html#a5f263c1cd118fb553c8acce56d2389bf',1,'GlobalConfig']]], ['sigdownloadsettingschanged',['sigDownloadSettingsChanged',['../class_download_settings_page.html#a57b0fe7b6e858e9f5c468f7a472afc8d',1,'DownloadSettingsPage']]], ['sigedithotkeyfinished',['sigEditHotkeyFinished',['../class_edit_hotkey_dialog.html#af8de31de43d8b1ad73b0a20eb9ecd988',1,'EditHotkeyDialog']]], ['sigfinished',['sigFinished',['../class_c_basic_player.html#a08a5907c92c6e20007494ac965e4fccb',1,'CBasicPlayer']]], ['sigfontnamechanged',['sigFontNameChanged',['../class_global_config.html#a33d27cebf11578d8d97aa577fcbfdd7c',1,'GlobalConfig']]], ['sigfontsizechanged',['sigFontSizeChanged',['../class_global_config.html#a607985421d853f7e37305cb1c5503d66',1,'GlobalConfig']]], ['sigfonttypechanged',['sigFontTypeChanged',['../class_global_config.html#a1238a1ce340e18ef4fb62882061e8116',1,'GlobalConfig']]], ['siggeneralsettingschanged',['sigGeneralSettingsChanged',['../class_general_settings_page.html#a612a34b0dcdd35f1bf6e799df11b5f9f',1,'GeneralSettingsPage']]], ['sighidelrc',['sigHideLrc',['../class_music_lrc.html#afbb50fb027c3cdf17759917ab375c267',1,'MusicLrc']]], ['sighotkeyssettingschanged',['sigHotKeysSettingsChanged',['../class_hot_keys_settings_page.html#ab13d45baa7a6c542d21e4f2ea500c38b',1,'HotKeysSettingsPage']]], ['siglasthotkeychanged',['sigLastHotKeyChanged',['../class_global_config.html#a3db2121212cd65c622b989d1a8e02593',1,'GlobalConfig']]], ['sigloadmusiclisterror',['sigLoadMusicListError',['../class_load_music_thread_event.html#af52c0d91838427736db184671be0645d',1,'LoadMusicThreadEvent']]], ['sigloadmusiclistfinished',['sigLoadMusicListFinished',['../class_load_music_thread_event.html#a727f9bff9454063d034104a662f5d983',1,'LoadMusicThreadEvent']]], ['siglrcdownloadstatus',['sigLrcDownloadStatus',['../class_lrc_thread.html#a1e3145b47567e4e36a2ef4ab47756096',1,'LrcThread']]], ['siglrclocked',['sigLrcLocked',['../class_music_lrc.html#a24473c4893460c5cefa3a436fe97dcf9',1,'MusicLrc']]], ['siglrcpathchanged',['sigLrcPathChanged',['../class_global_config.html#ab6207cee51cb9aef5d7d65f0fe33e557',1,'GlobalConfig']]], ['siglrcsettingschanged',['sigLrcSettingsChanged',['../class_lrc_settings_page.html#a9db15d2685a05bb1d6e9749cce6a1b5d',1,'LrcSettingsPage']]], ['siglrcunlocked',['sigLrcUnlocked',['../class_music_lrc.html#afcb70601b2e42a03fd5316487cd7d53c',1,'MusicLrc']]], ['sigmintotrayhotkeychanged',['sigMinToTrayHotKeyChanged',['../class_global_config.html#acbe3eba91b664b01b823091f619aaa65',1,'GlobalConfig']]], ['sigmusicpathchanged',['sigMusicPathChanged',['../class_global_config.html#a18dabede42ac7bb98423fb59e98056f3',1,'GlobalConfig']]], ['sigmutechanged',['sigMuteChanged',['../class_global_config.html#aa314d5ffd21047546f2dfeba5bc1eac8',1,'GlobalConfig']]], ['signal',['Signal',['../class_signal.html',1,'']]], ['signal1',['Signal1',['../class_signal1.html',1,'']]], ['signal2',['Signal2',['../class_signal2.html',1,'']]], ['signal3',['Signal3',['../class_signal3.html',1,'']]], ['signal4',['Signal4',['../class_signal4.html',1,'']]], ['signal5',['Signal5',['../class_signal5.html',1,'']]], ['signal6',['Signal6',['../class_signal6.html',1,'']]], ['signal7',['Signal7',['../class_signal7.html',1,'']]], ['signal8',['Signal8',['../class_signal8.html',1,'']]], ['signal9',['Signal9',['../class_signal9.html',1,'']]], ['signexthotkeychanged',['sigNextHotKeyChanged',['../class_global_config.html#ad917276bede36480430cfa31f7ce071c',1,'GlobalConfig']]], ['signoplayshangchanged',['sigNoPlayShangChanged',['../class_global_config.html#a956e66e7ce6e4cd9e234e7b9fa4caee0',1,'GlobalConfig']]], ['signoplayxiachanged',['sigNoPlayXiaChanged',['../class_global_config.html#a316e6d2e0628a77b0a6af59224109895',1,'GlobalConfig']]], ['signoplayzhongchanged',['sigNoPlayZhongChanged',['../class_global_config.html#a2c7b8cf25a59df246b4067eda600ce2b',1,'GlobalConfig']]], ['sigopenlistwidgethotkeychanged',['sigOpenListWidgetHotKeyChanged',['../class_global_config.html#a1d53f37c79eaaac982794acdfa384122',1,'GlobalConfig']]], ['sigopenlrchotkeychanged',['sigOpenLrcHotKeyChanged',['../class_global_config.html#adab25f897dfa9be078560368f259db43',1,'GlobalConfig']]], ['sigopenmediawidgethotkeychanged',['sigOpenMediaWidgetHotKeyChanged',['../class_global_config.html#a240146181e41da41263cbb9de373a70c',1,'GlobalConfig']]], ['sigopenminwidgethotkeychanged',['sigOpenMinWidgetHotKeyChanged',['../class_global_config.html#a3dcfe49635d163f670fdbcf8fa36e089',1,'GlobalConfig']]], ['sigopenmusicfilehotkeychanged',['sigOpenMusicFileHotKeyChanged',['../class_global_config.html#a33335b831320a53ec48820f44becc8e4',1,'GlobalConfig']]], ['sigpausehotkeychanged',['sigPauseHotKeyChanged',['../class_global_config.html#ae3328f7362c6f1b2099e53b75b64e8bb',1,'GlobalConfig']]], ['sigplayedshangchanged',['sigPlayedShangChanged',['../class_global_config.html#a0f8f1d2ba7e0beb075b04fa2776d5583',1,'GlobalConfig']]], ['sigplayedxiachanged',['sigPlayedXiaChanged',['../class_global_config.html#ac65d8d451c72e44fa2be0012845ed86c',1,'GlobalConfig']]], ['sigplayedzhongchanged',['sigPlayedZhongChanged',['../class_global_config.html#a68b194d8fdcce82ac9dc707dbd525192',1,'GlobalConfig']]], ['sigplaylistcleanfinshed',['sigPlayListCleanFinshed',['../class_music_list.html#ac3bf69245aba294af6aca364d4ce1ba2',1,'MusicList']]], ['sigplaymodechanged',['sigPlayModeChanged',['../class_global_config.html#aae74bbe090d7dc5a087846da070f5ce0',1,'GlobalConfig']]], ['sigrowselected',['sigRowSelected',['../class_music_list.html#add20d03c2b799647aed83bd73ccb33ba',1,'MusicList']]], ['sigsettingshotkeychanged',['sigSettingsHotKeyChanged',['../class_global_config.html#a86e76aeb2256d5cbfe307786fa99a8b6',1,'GlobalConfig']]], ['sigshadowchanged',['sigShadowChanged',['../class_global_config.html#ab21d9e2a37e27bc6672b669405ebf9ba',1,'GlobalConfig']]], ['sigsharedcurrentmusic',['sigSharedCurrentMusic',['../class_music_list.html#adac1dcf99c3a3227052352b95e89169b',1,'MusicList']]], ['sigshowmainwidget',['sigShowMainWidget',['../class_main_widget.html#a57b61798e8f1f7e0501bfea154683ec2',1,'MainWidget']]], ['sigshowmusicpanel',['sigShowMusicPanel',['../class_min_music_widget.html#ad0eff7fdcbaec1494ce421356b33c7af',1,'MinMusicWidget']]], ['sigspectrumchanged',['sigSpectrumChanged',['../class_main_widget.html#aa48e6edcfe29974ab0e2814e21a47a3d',1,'MainWidget']]], ['sigstartloadmusic',['sigStartloadMusic',['../class_main_widget.html#a7a47666da4545155ac66fb7fc97084a7',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#a87683d7994ce646808e67e83765a57e7',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#afe405fe390e7ae8c0768e43bb5eeaf1b',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#a1d5c815e8149a0127f618b83fea987fe',1,'MainWidget::sigStartloadMusic()']]], ['sigvolumechanged',['sigVolumeChanged',['../class_global_config.html#afbc424e3c72c0ff0267cb41fd7993439',1,'GlobalConfig']]], ['slot',['Slot',['../class_slot.html',1,'']]], ['slot1',['Slot1',['../class_slot1.html',1,'']]], ['slot2',['Slot2',['../class_slot2.html',1,'']]], ['slot3',['Slot3',['../class_slot3.html',1,'']]], ['slot4',['Slot4',['../class_slot4.html',1,'']]], ['slot5',['Slot5',['../class_slot5.html',1,'']]], ['slot6',['Slot6',['../class_slot6.html',1,'']]], ['slot7',['Slot7',['../class_slot7.html',1,'']]], ['slot8',['Slot8',['../class_slot8.html',1,'']]], ['slot9',['Slot9',['../class_slot9.html',1,'']]], ['slotbase',['SlotBase',['../class_slot_base.html',1,'']]], ['slotbase1',['SlotBase1',['../class_slot_base1.html',1,'']]], ['slotbase2',['SlotBase2',['../class_slot_base2.html',1,'']]], ['slotbase3',['SlotBase3',['../class_slot_base3.html',1,'']]], ['slotbase4',['SlotBase4',['../class_slot_base4.html',1,'']]], ['slotbase5',['SlotBase5',['../class_slot_base5.html',1,'']]], ['slotbase6',['SlotBase6',['../class_slot_base6.html',1,'']]], ['slotbase7',['SlotBase7',['../class_slot_base7.html',1,'']]], ['slotbase8',['SlotBase8',['../class_slot_base8.html',1,'']]], ['slotbase9',['SlotBase9',['../class_slot_base9.html',1,'']]], ['slotimpl',['SlotImpl',['../class_slot_impl.html',1,'']]], ['slotimpl1',['SlotImpl1',['../class_slot_impl1.html',1,'']]], ['slotimpl2',['SlotImpl2',['../class_slot_impl2.html',1,'']]], ['slotimpl3',['SlotImpl3',['../class_slot_impl3.html',1,'']]], ['slotimpl4',['SlotImpl4',['../class_slot_impl4.html',1,'']]], ['slotimpl5',['SlotImpl5',['../class_slot_impl5.html',1,'']]], ['slotimpl6',['SlotImpl6',['../class_slot_impl6.html',1,'']]], ['slotimpl7',['SlotImpl7',['../class_slot_impl7.html',1,'']]], ['slotimpl8',['SlotImpl8',['../class_slot_impl8.html',1,'']]], ['slotimpl9',['SlotImpl9',['../class_slot_impl9.html',1,'']]], ['soundcontrol',['SoundControl',['../class_sound_control.html',1,'']]], ['soundcontrol_2ecpp',['SoundControl.cpp',['../_sound_control_8cpp.html',1,'']]], ['soundcontrol_2eh',['SoundControl.h',['../_sound_control_8h.html',1,'']]], ['soundcontrol_5fversion',['SOUNDCONTROL_VERSION',['../_sound_control_8h.html#a2c67b5a4f7d793124c0a12bc3e50bd20',1,'SoundControl.h']]], ['spectrograph',['Spectrograph',['../class_spectrograph.html',1,'Spectrograph'],['../class_spectrograph.html#a78e8bcc58d3f3af6763be21b8ace52ea',1,'Spectrograph::Spectrograph()']]], ['spectrograph_2ecpp',['SpectroGraph.cpp',['../_spectro_graph_8cpp.html',1,'']]], ['spectrograph_2eh',['SpectroGraph.h',['../_spectro_graph_8h.html',1,'']]], ['spectrograph_5fversion',['SPECTROGRAPH_VERSION',['../_spectro_graph_8h.html#a10d97c4d42884f85c44cb7984450b5be',1,'SpectroGraph.h']]], ['start',['Start',['../class_c_basic_player.html#a923965049cd93edc1f6a1e8949366046',1,'CBasicPlayer']]], ['startlrcmask',['startLrcMask',['../class_music_lrc.html#a945e08a0a944c66b722bbd75450e65ee',1,'MusicLrc']]], ['statusdefine_2eh',['StatusDefine.h',['../_status_define_8h.html',1,'']]], ['statusdefine_5fversion',['STATUSDEFINE_VERSION',['../_status_define_8h.html#a568c7b7a5a8f99e088e9d89712b988b5',1,'StatusDefine.h']]], ['stop',['Stop',['../class_c_basic_player.html#a18edbe2cd19fcdf54f6a8693e5ca9933',1,'CBasicPlayer']]], ['stoplrcmask',['stopLrcMask',['../class_music_lrc.html#a58fabf435d2338edbcedff96bb1d15f1',1,'MusicLrc']]] ]; ================================================ FILE: doc/search/all_12.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_12.js ================================================ var searchData= [ ['tag_5fdirectaudiodevicedescription',['tag_DirectAudioDeviceDescription',['../structtag___direct_audio_device_description.html',1,'']]], ['thankspage',['ThanksPage',['../class_thanks_page.html',1,'ThanksPage'],['../class_thanks_page.html#a67196e0c510047a6469162de13343fc5',1,'ThanksPage::ThanksPage()']]], ['thankspage_2ecpp',['ThanksPage.cpp',['../_thanks_page_8cpp.html',1,'']]], ['thankspage_2eh',['ThanksPage.h',['../_thanks_page_8h.html',1,'']]], ['thankspage_5fversion',['THANKSPAGE_VERSION',['../_thanks_page_8h.html#a0eab0264e2b1eb762fb29f229a17be36',1,'ThanksPage.h']]], ['time',['time',['../class_music_info_entity.html#a631ab170b6da4911e2368fe5f2547574',1,'MusicInfoEntity::time()'],['../class_music_list_save_format_entity.html#af36af6b3459cd91001e21b63a740ffc0',1,'MusicListSaveFormatEntity::time()']]], ['tr_2eh',['TR.h',['../_t_r_8h.html',1,'']]], ['tr_5fversion',['TR_VERSION',['../_t_r_8h.html#ac78033ee9b99559b5d3b8d1971262f8c',1,'TR.h']]] ]; ================================================ FILE: doc/search/all_13.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_13.js ================================================ var searchData= [ ['unlocklrc',['unlockLrc',['../class_music_lrc.html#a03cf87cd71ba0fbaadce457a553e741c',1,'MusicLrc']]], ['updatealbumurlpath',['updateAlbumUrlPath',['../class_d_b_module.html#ab46de76e6935e282ef4378a05a0fb7f9',1,'DBModule']]], ['updatepage',['UpdatePage',['../class_update_page.html',1,'UpdatePage'],['../class_update_page.html#a79b95fb155dc683ffa2728e83c48baf4',1,'UpdatePage::UpdatePage()']]], ['updatepage_2ecpp',['UpdatePage.cpp',['../_update_page_8cpp.html',1,'']]], ['updatepage_2eh',['UpdatePage.h',['../_update_page_8h.html',1,'']]], ['updatepage_5fversion',['UPDATEPAGE_VERSION',['../_update_page_8h.html#a1a654de797b2f4b60c35fbc4d41537ca',1,'UpdatePage.h']]] ]; ================================================ FILE: doc/search/all_14.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_14.js ================================================ var searchData= [ ['volume',['volume',['../class_global_config.html#ab3431f3e10d43d6d9b4d6082c6244792',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_15.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_15.js ================================================ var searchData= [ ['waveformatextensible',['WAVEFORMATEXTENSIBLE',['../struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e.html',1,'']]] ]; ================================================ FILE: doc/search/all_16.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_16.js ================================================ var searchData= [ ['xing',['xing',['../structxing.html',1,'']]] ]; ================================================ FILE: doc/search/all_17.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_17.js ================================================ var searchData= [ ['_7eaboutpage',['~AboutPage',['../class_about_page.html#a34933514a49064927aa95c32f7d0b085',1,'AboutPage']]], ['_7eaboutpanel',['~AboutPanel',['../class_about_panel.html#a3064261db6c85917f9be6c614b31e24d',1,'AboutPanel']]], ['_7ealbumthread',['~AlbumThread',['../class_album_thread.html#a415bbb58b43f992f35370569821e34f9',1,'AlbumThread']]], ['_7eauthorpage',['~AuthorPage',['../class_author_page.html#a1757018eb33a6660a4d5352cc2dd2d02',1,'AuthorPage']]], ['_7ecbasicplayer',['~CBasicPlayer',['../class_c_basic_player.html#a2df79ab9ea5a52ae878b5cf8833d8e4f',1,'CBasicPlayer']]], ['_7ecollectionpanel',['~CollectionPanel',['../class_collection_panel.html#a0c9e9858c60ee911e06ad9332c891462',1,'CollectionPanel']]], ['_7econfigdialog',['~ConfigDialog',['../class_config_dialog.html#a485badac4dffa04603f800bb9d396e1d',1,'ConfigDialog']]], ['_7edownloadlistpanel',['~DownloadListPanel',['../class_download_list_panel.html#a6b9986022dbca6baac47f64cca48c9b4',1,'DownloadListPanel']]], ['_7edownloadsettingspage',['~DownloadSettingsPage',['../class_download_settings_page.html#a6f833afd2e35d6b8b9a85667483f0a88',1,'DownloadSettingsPage']]], ['_7eedithotkeydialog',['~EditHotkeyDialog',['../class_edit_hotkey_dialog.html#a62177ad2622bd2efab81aa8fc99e9a19',1,'EditHotkeyDialog']]], ['_7egeneralsettingspage',['~GeneralSettingsPage',['../class_general_settings_page.html#af0a724ac028192ba30e518c6598ee8f2',1,'GeneralSettingsPage']]], ['_7eglobalhotkey',['~GlobalHotKey',['../class_global_hot_key.html#a6aa5957d852aea5418f94f66b404fd7a',1,'GlobalHotKey']]], ['_7ehotkeyssettingspage',['~HotKeysSettingsPage',['../class_hot_keys_settings_page.html#a2640178d50906df129d52e63ba23e72c',1,'HotKeysSettingsPage']]], ['_7ehotkeystablewidget',['~HotKeysTableWidget',['../class_hot_keys_table_widget.html#a1da65ddf2a0a4eda046bd9c423472da2',1,'HotKeysTableWidget']]], ['_7eloadmusicthread',['~LoadMusicThread',['../class_load_music_thread.html#a0647b93173158d483ab9056dcab371cf',1,'LoadMusicThread']]], ['_7eloadmusicthreadevent',['~LoadMusicThreadEvent',['../class_load_music_thread_event.html#ad5d7bb7de030266369e90499ee4284ff',1,'LoadMusicThreadEvent']]], ['_7elrcdemo',['~LrcDemo',['../class_lrc_demo.html#afdfedf35d9603d547b2962056b257e40',1,'LrcDemo']]], ['_7elrcportraitpanel',['~LrcPortraitPanel',['../class_lrc_portrait_panel.html#a642af99db5457dd28544a4b91ab76f73',1,'LrcPortraitPanel']]], ['_7elrcsettingspage',['~LrcSettingsPage',['../class_lrc_settings_page.html#a659bc020cbf596a371dd1bf0f0f7537e',1,'LrcSettingsPage']]], ['_7elrcthread',['~LrcThread',['../class_lrc_thread.html#a851db551fd6141aac6002ad042dc610e',1,'LrcThread']]], ['_7emainwidget',['~MainWidget',['../class_main_widget.html#add21c63f8e799303a21a69da3d288c2f',1,'MainWidget']]], ['_7emediawidget',['~MediaWidget',['../class_media_widget.html#aa6a87e413bd2b8a7f9b5ed042d1501cd',1,'MediaWidget']]], ['_7eminmusicwidget',['~MinMusicWidget',['../class_min_music_widget.html#a2ba10fcfbaab182210cd014edda3490a',1,'MinMusicWidget']]], ['_7emusicinfoentity',['~MusicInfoEntity',['../class_music_info_entity.html#aff9786f649a104b50c632642eefc6ca0',1,'MusicInfoEntity']]], ['_7emusiclist',['~MusicList',['../class_music_list.html#a50ac37d6bb9ae0ce33daa7652e740b90',1,'MusicList']]], ['_7emusiclistsaveformatentity',['~MusicListSaveFormatEntity',['../class_music_list_save_format_entity.html#afc88ec574de819f1a03839efb71f0c91',1,'MusicListSaveFormatEntity']]], ['_7emusiclistwidget',['~MusicListWidget',['../class_music_list_widget.html#a9399e382fe798b3ed27de1f2b18336b2',1,'MusicListWidget']]], ['_7emusiclrc',['~MusicLrc',['../class_music_lrc.html#a785603e7032633e428ea449c8cac8c7f',1,'MusicLrc']]], ['_7eradiopanel',['~RadioPanel',['../class_radio_panel.html#ab802d34b8dc251d3a38351f8442b2d57',1,'RadioPanel']]], ['_7erankingpanel',['~RankingPanel',['../class_ranking_panel.html#a940126638c74c3ff50f6d8ebb21e2cf4',1,'RankingPanel']]], ['_7esearchpanel',['~SearchPanel',['../class_search_panel.html#a3e85562d33adde88afac0e0ff26cf49d',1,'SearchPanel']]], ['_7eshareddialog',['~SharedDialog',['../class_shared_dialog.html#a6f9e41bbabb622d17f73e693393293e9',1,'SharedDialog']]], ['_7espectrograph',['~Spectrograph',['../class_spectrograph.html#aede83dadf66ffca77b01b023ee35d8b6',1,'Spectrograph']]], ['_7ethankspage',['~ThanksPage',['../class_thanks_page.html#a039006a9cb2a3f34cfcdb3b428f54f42',1,'ThanksPage']]], ['_7eupdatepage',['~UpdatePage',['../class_update_page.html#aab2adab98f243a7e24e35af02a6946a4',1,'UpdatePage']]] ]; ================================================ FILE: doc/search/all_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_2.js ================================================ var searchData= [ ['basicplayer_2ecpp',['BasicPlayer.cpp',['../_basic_player_8cpp.html',1,'']]], ['basicplayer_2eh',['BasicPlayer.h',['../_basic_player_8h.html',1,'']]], ['basicplayer_5fversion',['BASICPLAYER_VERSION',['../_basic_player_8h.html#a2eb51377026026e1a912d498750daa5d',1,'BasicPlayer.h']]] ]; ================================================ FILE: doc/search/all_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_3.js ================================================ var searchData= [ ['caudiostream',['CAudioStream',['../class_c_audio_stream.html',1,'']]], ['cbasicplayer',['CBasicPlayer',['../class_c_basic_player.html',1,'CBasicPlayer'],['../class_c_basic_player.html#a4b063ea6136b9373fd132252af403ba5',1,'CBasicPlayer::CBasicPlayer()']]], ['ccriticalsection',['CCriticalSection',['../class_c_critical_section.html',1,'']]], ['ccustommemorystream',['CCustomMemoryStream',['../class_c_custom_memory_stream.html',1,'']]], ['cfastfouriertransform',['CFastFourierTransform',['../class_c_fast_fourier_transform.html',1,'']]], ['cfileinput',['CFileInput',['../class_c_file_input.html',1,'']]], ['cfilestream',['CFileStream',['../class_c_file_stream.html',1,'']]], ['chandlestream',['CHandleStream',['../class_c_handle_stream.html',1,'']]], ['changealbumimage',['changeAlbumImage',['../class_min_music_widget.html#a10315723b03e291b88a478b56af00047',1,'MinMusicWidget']]], ['cinput',['CInput',['../class_c_input.html',1,'']]], ['cleardb',['clearDB',['../class_d_b_module.html#ae9f17b6c46496876f77bea192daf7e9f',1,'DBModule']]], ['closeevent',['closeEvent',['../class_config_dialog.html#aa4097fc80358bf4fe7a3ef7689a49f48',1,'ConfigDialog']]], ['cmemorystream',['CMemoryStream',['../class_c_memory_stream.html',1,'']]], ['cmp3input',['CMp3Input',['../class_c_mp3_input.html',1,'']]], ['collectionpanel',['CollectionPanel',['../class_collection_panel.html',1,'CollectionPanel'],['../class_collection_panel.html#ab80b09255b9b6e1b2d39bd617381c162',1,'CollectionPanel::CollectionPanel()']]], ['collectionpanel_2ecpp',['CollectionPanel.cpp',['../_collection_panel_8cpp.html',1,'']]], ['collectionpanel_2eh',['CollectionPanel.h',['../_collection_panel_8h.html',1,'']]], ['collectionpanel_5fversion',['COLLECTIONPANEL_VERSION',['../_collection_panel_8h.html#a11f6ed810f02d7ce686b2b981582f05e',1,'CollectionPanel.h']]], ['configdialog',['ConfigDialog',['../class_config_dialog.html',1,'ConfigDialog'],['../class_config_dialog.html#ae6615f6129fc57116c23b275a8cf0997',1,'ConfigDialog::ConfigDialog()']]], ['configdialog_2ecpp',['ConfigDialog.cpp',['../_config_dialog_8cpp.html',1,'']]], ['configdialog_2eh',['ConfigDialog.h',['../_config_dialog_8h.html',1,'']]], ['configdialog_5fversion',['CONFIGDIALOG_VERSION',['../_config_dialog_8h.html#a6b1202fe0b4502b6d45c546ccc482989',1,'ConfigDialog.h']]], ['contextmenuevent',['contextMenuEvent',['../class_music_lrc.html#a022ec9cc9d9e1f784a48825297c5670e',1,'MusicLrc::contextMenuEvent()'],['../class_main_widget.html#a7eb48b3beb05269d2bca40670e37b0c1',1,'MainWidget::contextMenuEvent()'],['../class_min_music_widget.html#a5c442e71137032769a6ebe5888bc7425',1,'MinMusicWidget::contextMenuEvent()'],['../class_music_list.html#ae26d3d227b834b524325f2585e92fc21',1,'MusicList::contextMenuEvent()']]], ['cplaythread',['CPlayThread',['../class_c_play_thread.html',1,'']]], ['createconnection',['createConnection',['../class_d_b_module.html#a338797c1de48e9e72f063262ff1d1fcf',1,'DBModule']]], ['createtable',['createTable',['../class_d_b_module.html#a2ba0e92be0762a1c143122038440f30e',1,'DBModule']]], ['cspectrumanalyser',['CSpectrumAnalyser',['../class_c_spectrum_analyser.html',1,'']]], ['cspectrumanalyserthread',['CSpectrumAnalyserThread',['../class_c_spectrum_analyser_thread.html',1,'']]], ['cstream',['CStream',['../class_c_stream.html',1,'']]], ['cstreamedinput',['CStreamedInput',['../class_c_streamed_input.html',1,'']]], ['csystem',['CSystem',['../class_c_system.html',1,'']]], ['cthread',['CThread',['../class_c_thread.html',1,'']]], ['cvorbisinput',['CVorbisInput',['../class_c_vorbis_input.html',1,'']]], ['cwaveconverter',['CWaveConverter',['../class_c_wave_converter.html',1,'']]], ['cwaveinput',['CWaveInput',['../class_c_wave_input.html',1,'']]], ['cwmainput',['CWmaInput',['../class_c_wma_input.html',1,'']]] ]; ================================================ FILE: doc/search/all_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_4.js ================================================ var searchData= [ ['data',['Data',['../class_d_s___start_buffer_helper_1_1_data.html',1,'DS_StartBufferHelper']]], ['dbfile',['DBFile',['../_d_b_module_8cpp.html#aa2b0b84f8f4e50449243b8d236f02e83',1,'DBModule.cpp']]], ['dbmodule',['DBModule',['../class_d_b_module.html',1,'']]], ['dbmodule_2ecpp',['DBModule.cpp',['../_d_b_module_8cpp.html',1,'']]], ['dbmodule_2eh',['DBModule.h',['../_d_b_module_8h.html',1,'']]], ['dbmodule_5fversion',['DBMODULE_VERSION',['../_d_b_module_8h.html#a50a994bb088a31ad6cf393e8fe839bd4',1,'DBModule.h']]], ['dbtype',['DBType',['../_d_b_module_8cpp.html#a58987fc8480ef06331f46f6dca63dda7',1,'DBModule.cpp']]], ['defaultchoicecolor',['defaultChoiceColor',['../class_global_config.html#a53469e44ef7d3167684597e836202585',1,'GlobalConfig']]], ['defaultplayer',['defaultPlayer',['../class_global_config.html#af9f70ca0cb4848f425ce41e23bb4d891',1,'GlobalConfig']]], ['delinstance',['delInstance',['../class_global_config.html#a4c707002e54cf452c9419be0cf372088',1,'GlobalConfig']]], ['delline',['delLine',['../class_d_b_module.html#a1bba2328aa044f56e639391182820356',1,'DBModule']]], ['dither',['dither',['../structdither.html',1,'']]], ['downloadlistpanel',['DownloadListPanel',['../class_download_list_panel.html',1,'DownloadListPanel'],['../class_download_list_panel.html#a01e1d23931a45c02e27d678949a9c7ea',1,'DownloadListPanel::DownloadListPanel()']]], ['downloadlistpanel_2ecpp',['DownloadListPanel.cpp',['../_download_list_panel_8cpp.html',1,'']]], ['downloadlistpanel_2eh',['DownloadListPanel.h',['../_download_list_panel_8h.html',1,'']]], ['downloadlistpanel_5fversion',['DOWNLOADLISTPANEL_VERSION',['../_download_list_panel_8h.html#a42232fc9396cf1ae9b013a67dfca2fee',1,'DownloadListPanel.h']]], ['downloadsettingspage',['DownloadSettingsPage',['../class_download_settings_page.html',1,'DownloadSettingsPage'],['../class_download_settings_page.html#a159b55279093dd6c3b67824f838070e0',1,'DownloadSettingsPage::DownloadSettingsPage()']]], ['downloadsettingspage_2ecpp',['DownloadSettingsPage.cpp',['../_download_settings_page_8cpp.html',1,'']]], ['downloadsettingspage_2eh',['DownloadSettingsPage.h',['../_download_settings_page_8h.html',1,'']]], ['downloadsettingspage_5fversion',['DOWNLOADSETTINGSPAGE_VERSION',['../_download_settings_page_8h.html#a89723d28715e8e6351e27aae7c5d8e68',1,'DownloadSettingsPage.h']]], ['dragenterevent',['dragEnterEvent',['../class_main_widget.html#a90b7408bc9765b6b09f46cc6acac3bc8',1,'MainWidget']]], ['dropevent',['dropEvent',['../class_main_widget.html#afb03e15a9705c20c17abdf7aa417cc87',1,'MainWidget']]], ['ds_5faudiodevicecache',['DS_AudioDeviceCache',['../struct_d_s___audio_device_cache.html',1,'']]], ['ds_5finfo',['DS_Info',['../struct_d_s___info.html',1,'']]], ['ds_5frefreshcachestruct',['DS_RefreshCacheStruct',['../struct_d_s___refresh_cache_struct.html',1,'']]], ['ds_5fstartbufferhelper',['DS_StartBufferHelper',['../class_d_s___start_buffer_helper.html',1,'']]] ]; ================================================ FILE: doc/search/all_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_5.js ================================================ var searchData= [ ['edithotkeydialog',['EditHotkeyDialog',['../class_edit_hotkey_dialog.html',1,'EditHotkeyDialog'],['../class_edit_hotkey_dialog.html#a7c5852e58824607447124522b32e531f',1,'EditHotkeyDialog::EditHotkeyDialog()']]], ['edithotkeydialog_2ecpp',['EditHotkeyDialog.cpp',['../_edit_hotkey_dialog_8cpp.html',1,'']]], ['edithotkeydialog_2eh',['EditHotkeyDialog.h',['../_edit_hotkey_dialog_8h.html',1,'']]], ['edithotkeydialog_5fversion',['EDITHOTKEYDIALOG_VERSION',['../_edit_hotkey_dialog_8h.html#a5d32f7b71fc3daa6459ec5c5891c6b60',1,'EditHotkeyDialog.h']]], ['eventfilter',['eventFilter',['../class_edit_hotkey_dialog.html#ab210f76fde3c8b39c7868796f8ff587c',1,'EditHotkeyDialog::eventFilter()'],['../class_music_list_widget.html#aff913742f850f364b1b4d25a759817df',1,'MusicListWidget::eventFilter()']]] ]; ================================================ FILE: doc/search/all_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_6.js ================================================ var searchData= [ ['filename',['fileName',['../class_music_info_entity.html#a7000e73426aea59711f69137a8d763e4',1,'MusicInfoEntity::fileName()'],['../class_music_list_save_format_entity.html#a2def014bc5d64f2217aaafc9ff74cf7d',1,'MusicListSaveFormatEntity::fileName()']]], ['filepath',['filePath',['../class_music_info_entity.html#ae33cee162f02512a7d5694d0806bec69',1,'MusicInfoEntity::filePath()'],['../class_music_list_save_format_entity.html#a3b57ce569a15fe23cb6464539bcf2573',1,'MusicListSaveFormatEntity::filePath()']]], ['fontname',['fontName',['../class_global_config.html#ab44bfa507df285ce567dfe38313bee98',1,'GlobalConfig']]], ['fontsize',['fontSize',['../class_global_config.html#a269d05da26561e3a40d78f6bca03d826',1,'GlobalConfig']]], ['fonttype',['fontType',['../class_global_config.html#abf66780c94e90a63048b474a9b2f9973',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_7.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_7.js ================================================ var searchData= [ ['generalsettingspage',['GeneralSettingsPage',['../class_general_settings_page.html',1,'GeneralSettingsPage'],['../class_general_settings_page.html#a92cb17c9f2c07b4503d7fbae07e9090b',1,'GeneralSettingsPage::GeneralSettingsPage()']]], ['generalsettingspage_2ecpp',['GeneralSettingsPage.cpp',['../_general_settings_page_8cpp.html',1,'']]], ['generalsettingspage_2eh',['GeneralSettingsPage.h',['../_general_settings_page_8h.html',1,'']]], ['generalsettingspage_5fversion',['GENERALSETTINGSPAGE_VERSION',['../_general_settings_page_8h.html#a630bfa8d7c92065e8c5d067f7ae0aaca',1,'GeneralSettingsPage.h']]], ['getinput',['GetInput',['../class_c_basic_player.html#a80ed1111ee4f56ac4f77a4bc70a33cc1',1,'CBasicPlayer']]], ['getlongframeposition',['GetLongFramePosition',['../class_c_basic_player.html#a9cec3701ade8bab7f1ce20d2082a7207',1,'CBasicPlayer']]], ['getvolume',['getVolume',['../class_sound_control.html#ac3f9b1f1fbeb78580e3505a9813d91ef',1,'SoundControl']]], ['globalconfig',['GlobalConfig',['../class_global_config.html',1,'']]], ['globalconfig_2ecpp',['GlobalConfig.cpp',['../_global_config_8cpp.html',1,'']]], ['globalconfig_2eh',['GlobalConfig.h',['../_global_config_8h.html',1,'']]], ['globalconfig_5fversion',['GLOBALCONFIG_VERSION',['../_global_config_8h.html#acb89493e1c9b465b29e1ba7dfe2db7b3',1,'GlobalConfig.h']]], ['globalhotkey',['GlobalHotKey',['../class_global_hot_key.html',1,'GlobalHotKey'],['../class_global_hot_key.html#a8528625381dbde7d0cff1eb7c2e10278',1,'GlobalHotKey::GlobalHotKey()']]], ['globalhotkey_2ecpp',['GlobalHotkey.cpp',['../_global_hotkey_8cpp.html',1,'']]], ['globalhotkey_2eh',['GlobalHotkey.h',['../_global_hotkey_8h.html',1,'']]], ['globalhotkey_5fversion',['GLOBALHOTKEY_VERSION',['../_global_hotkey_8h.html#a823d2a0de002f50d201fc3644b757698',1,'GlobalHotkey.h']]] ]; ================================================ FILE: doc/search/all_8.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_8.js ================================================ var searchData= [ ['handlefinished',['handleFinished',['../class_c_basic_player.html#afbda99b45acd28245ea5013b240e0aa2',1,'CBasicPlayer']]], ['handlespectrumchanged',['handleSpectrumChanged',['../class_spectrograph.html#ac2b74df2b8fc7e7ba3eff78361b84efa',1,'Spectrograph']]], ['hotkeyssettingspage',['HotKeysSettingsPage',['../class_hot_keys_settings_page.html',1,'HotKeysSettingsPage'],['../class_hot_keys_settings_page.html#a95c5d5d41b0c317db30f5a33b2a1f059',1,'HotKeysSettingsPage::HotKeysSettingsPage()']]], ['hotkeyssettingspage_2ecpp',['HotkeysSettingsPage.cpp',['../_hotkeys_settings_page_8cpp.html',1,'']]], ['hotkeyssettingspage_2eh',['HotkeysSettingsPage.h',['../_hotkeys_settings_page_8h.html',1,'']]], ['hotkeyssettingspage_5fversion',['HOTKEYSSETTINGSPAGE_VERSION',['../_hotkeys_settings_page_8h.html#aa0fa0aff99e7ab1b1ab9ab7020d9053f',1,'HotkeysSettingsPage.h']]], ['hotkeystablewidget',['HotKeysTableWidget',['../class_hot_keys_table_widget.html',1,'HotKeysTableWidget'],['../class_hot_keys_table_widget.html#a9fe94db1293190bacd376ec6917d77a5',1,'HotKeysTableWidget::HotKeysTableWidget()']]], ['hotkeystablewidget_2ecpp',['HotkeysTableWidget.cpp',['../_hotkeys_table_widget_8cpp.html',1,'']]], ['hotkeystablewidget_2eh',['HotkeysTableWidget.h',['../_hotkeys_table_widget_8h.html',1,'']]], ['hotkeystablewidget_5fversion',['HOTKEYSTABLEWIDGET_VERSION',['../_hotkeys_table_widget_8h.html#aa14ee40e4465cc1dda12440ee6564e2d',1,'HotkeysTableWidget.h']]] ]; ================================================ FILE: doc/search/all_9.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_9.js ================================================ var searchData= [ ['init',['init',['../class_about_panel.html#a9bd41f09b01e2f2c6d0a412d16bc791e',1,'AboutPanel::init()'],['../class_config_dialog.html#a1c633059d74a617a39813a0582dd7f7d',1,'ConfigDialog::init()'],['../class_download_settings_page.html#ad0ba1e33a127efa02d43ebc709970ef4',1,'DownloadSettingsPage::init()'],['../class_edit_hotkey_dialog.html#a755223d6c34545736525f2047aaed30b',1,'EditHotkeyDialog::init()'],['../class_general_settings_page.html#afcf6e1dbdf85c3bd09e222059244db35',1,'GeneralSettingsPage::init()'],['../class_hot_keys_settings_page.html#adaf557f31ffde183c52b66b36923377f',1,'HotKeysSettingsPage::init()'],['../class_lrc_settings_page.html#ab938c3442653a7edb1bf4d6fc0921026',1,'LrcSettingsPage::init()'],['../class_shared_dialog.html#a734164cf28e5c7ad788f354997b013da',1,'SharedDialog::init()']]], ['initdb',['initDB',['../class_d_b_module.html#aa6b3b15ba1e1ec8d902d0b2168105f8d',1,'DBModule']]], ['insertline',['insertLine',['../class_d_b_module.html#a170ceff321bc61501b63d18c1248ff35',1,'DBModule']]], ['instance',['instance',['../class_global_config.html#a57c19a50c9e02584c7dd258a7ac14b2a',1,'GlobalConfig']]], ['isvaild',['isVaild',['../class_c_basic_player.html#a1e414657ca9072f8b1843032711c8c6c',1,'CBasicPlayer']]] ]; ================================================ FILE: doc/search/all_a.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_a.js ================================================ var searchData= [ ['lasthotkey',['lastHotKey',['../class_global_config.html#a35eed45c66aa9bb5022f9909a787b325',1,'GlobalConfig']]], ['loadmusicthread',['LoadMusicThread',['../class_load_music_thread.html',1,'LoadMusicThread'],['../class_load_music_thread.html#a6ed424e435074afdf1003823d334aadb',1,'LoadMusicThread::LoadMusicThread()']]], ['loadmusicthread_2ecpp',['LoadMusicThread.cpp',['../_load_music_thread_8cpp.html',1,'']]], ['loadmusicthread_2eh',['LoadMusicThread.h',['../_load_music_thread_8h.html',1,'']]], ['loadmusicthread_5fversion',['LOADMUSICTHREAD_VERSION',['../_load_music_thread_8h.html#a142ea6df737943ee37b9682315c0b537',1,'LoadMusicThread.h']]], ['loadmusicthreadevent',['LoadMusicThreadEvent',['../class_load_music_thread_event.html',1,'LoadMusicThreadEvent'],['../class_load_music_thread_event.html#a6e8996c90c971352f4f5e780dbbbac2c',1,'LoadMusicThreadEvent::LoadMusicThreadEvent()']]], ['lrcdemo',['LrcDemo',['../class_lrc_demo.html',1,'LrcDemo'],['../class_lrc_demo.html#a6300c91fbff10da3fb38c5194657ebcd',1,'LrcDemo::LrcDemo()']]], ['lrcdemo_2ecpp',['LrcDemo.cpp',['../_lrc_demo_8cpp.html',1,'']]], ['lrcdemo_2eh',['LrcDemo.h',['../_lrc_demo_8h.html',1,'']]], ['lrcdemo_5fversion',['LRCDEMO_VERSION',['../_lrc_demo_8h.html#a1a3db2ad7a8683ed858bab30d1e8966b',1,'LrcDemo.h']]], ['lrcdownloadfailed',['LrcDownloadFailed',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3a58287d52a0972aceefaa36ae4e350c56',1,'StatusDefine.h']]], ['lrcdownloadstatus',['LrcDownloadStatus',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3',1,'StatusDefine.h']]], ['lrcdownloadsuccess',['LrcDownloadSuccess',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3a03642c571d5f1be5a17690f22fca2068',1,'StatusDefine.h']]], ['lrcpath',['lrcPath',['../class_global_config.html#a6faba12944439a17698f44eee7afba19',1,'GlobalConfig']]], ['lrcportraitpanel',['LrcPortraitPanel',['../class_lrc_portrait_panel.html',1,'LrcPortraitPanel'],['../class_lrc_portrait_panel.html#ad2984bcb9f9f53b07ffec52189b50966',1,'LrcPortraitPanel::LrcPortraitPanel()']]], ['lrcportraitpanel_2ecpp',['LrcPortraitPanel.cpp',['../_lrc_portrait_panel_8cpp.html',1,'']]], ['lrcportraitpanel_2eh',['LrcPortraitPanel.h',['../_lrc_portrait_panel_8h.html',1,'']]], ['lrcportraitpanel_5fversion',['LRCPORTRAITPANEL_VERSION',['../_lrc_portrait_panel_8h.html#a119bde904d50c809a8a30566c2e26c6e',1,'LrcPortraitPanel.h']]], ['lrcsettingspage',['LrcSettingsPage',['../class_lrc_settings_page.html',1,'LrcSettingsPage'],['../class_lrc_settings_page.html#a414e9e2e0cf7ea2de9eece06ea3fe457',1,'LrcSettingsPage::LrcSettingsPage()']]], ['lrcsettingspage_2ecpp',['LrcSettingsPage.cpp',['../_lrc_settings_page_8cpp.html',1,'']]], ['lrcsettingspage_2eh',['LrcSettingsPage.h',['../_lrc_settings_page_8h.html',1,'']]], ['lrcsettingspage_5fversion',['LRCSETTINGSPAGE_VERSION',['../_lrc_settings_page_8h.html#ade7dd060e4185724629f96cbf693cd01',1,'LrcSettingsPage.h']]], ['lrcthread',['LrcThread',['../class_lrc_thread.html',1,'LrcThread'],['../class_lrc_thread.html#a6f901c8fd61beb041c18384ddc9e3ccf',1,'LrcThread::LrcThread()']]], ['lrcthread_2ecpp',['LrcThread.cpp',['../_lrc_thread_8cpp.html',1,'']]], ['lrcthread_2eh',['LrcThread.h',['../_lrc_thread_8h.html',1,'']]], ['lrcthread_5fversion',['LRCTHREAD_VERSION',['../_lrc_thread_8h.html#afe5f62b48e363a5de4670476f650abdc',1,'LrcThread.h']]] ]; ================================================ FILE: doc/search/all_b.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_b.js ================================================ var searchData= [ ['m_5flabel',['m_label',['../class_about_page.html#a63010ae179f12759c10ac63cbf0fa489',1,'AboutPage']]], ['m_5fthankslabel',['m_thanksLabel',['../class_thanks_page.html#ae2ce11b642888b534b95fce62380f554',1,'ThanksPage']]], ['main_2ecpp',['main.cpp',['../main_8cpp.html',1,'']]], ['mainwidget',['MainWidget',['../class_main_widget.html',1,'MainWidget'],['../class_main_widget.html#a91bfa8c7c3e1a79af843b76705ca892d',1,'MainWidget::MainWidget()']]], ['mainwidget_2eh',['MainWidget.h',['../_main_widget_8h.html',1,'']]], ['mainwidget_5fversion',['MAINWIDGET_VERSION',['../_main_widget_8h.html#a460d7ec01bbac9451d33eeb1c5f2a388',1,'MainWidget.h']]], ['mediawidget',['MediaWidget',['../class_media_widget.html',1,'MediaWidget'],['../class_media_widget.html#a23958dfbb6d77d1338a4576aefaa7510',1,'MediaWidget::MediaWidget()']]], ['mediawidget_2ecpp',['MediaWidget.cpp',['../_media_widget_8cpp.html',1,'']]], ['mediawidget_2eh',['MediaWidget.h',['../_media_widget_8h.html',1,'']]], ['mediawidget_5fversion',['MEDIAWIDGET_VERSION',['../_media_widget_8h.html#a1c58a93650874653f5eac00ae80dcc1a',1,'MediaWidget.h']]], ['minmusicwidget',['MinMusicWidget',['../class_min_music_widget.html',1,'MinMusicWidget'],['../class_min_music_widget.html#a42c77faa88a09b435789e5af31670741',1,'MinMusicWidget::MinMusicWidget()']]], ['minmusicwidget_2ecpp',['MinMusicWidget.cpp',['../_min_music_widget_8cpp.html',1,'']]], ['minmusicwidget_2eh',['MinMusicWidget.h',['../_min_music_widget_8h.html',1,'']]], ['minmusicwidget_5fversion',['MINMUSICWIDGET_VERSION',['../_min_music_widget_8h.html#a3590f54cb6ae16afca25cd8c0f88c1ac',1,'MinMusicWidget.h']]], ['mintotrayhotkey',['minToTrayHotKey',['../class_global_config.html#a603068006c9320442e451dd55dfc79b4',1,'GlobalConfig']]], ['mousemoveevent',['mouseMoveEvent',['../class_music_lrc.html#a687d718edd94af97a67e70a7155d24f0',1,'MusicLrc::mouseMoveEvent()'],['../class_main_widget.html#ab7846f0e9bf1a9e07a9cc3e74bf7d863',1,'MainWidget::mouseMoveEvent()'],['../class_min_music_widget.html#ad5c1f18ef5de86e27c1258cd019628e8',1,'MinMusicWidget::mouseMoveEvent()']]], ['mousepressevent',['mousePressEvent',['../class_music_lrc.html#a2135be03e435d5c3d1daacb4b52709e3',1,'MusicLrc::mousePressEvent()'],['../class_main_widget.html#acacbce4003a49640148203a497e7ab4a',1,'MainWidget::mousePressEvent()'],['../class_min_music_widget.html#a93f0dcea4d87cb649844dfd23f883ba8',1,'MinMusicWidget::mousePressEvent()']]], ['musicinfoentity',['MusicInfoEntity',['../class_music_info_entity.html',1,'MusicInfoEntity'],['../class_music_info_entity.html#a0e26dede31aa77957f6eb136814cad5e',1,'MusicInfoEntity::MusicInfoEntity()'],['../class_music_info_entity.html#ae619b1f5d87339389e2707042a1ccab1',1,'MusicInfoEntity::MusicInfoEntity(const QString &fileName, const QString &time, const QString &filePath)']]], ['musicinfoentity_2ecpp',['MusicInfoEntity.cpp',['../_music_info_entity_8cpp.html',1,'']]], ['musicinfoentity_2eh',['MusicInfoEntity.h',['../_music_info_entity_8h.html',1,'']]], ['musicinfoentity_5fversion',['MUSICINFOENTITY_VERSION',['../_music_info_entity_8h.html#ad0b04c4fa949e23b62ceb691e373674c',1,'MusicInfoEntity.h']]], ['musiclist',['MusicList',['../class_music_list.html',1,'MusicList'],['../class_music_list.html#ab1d1b3abc4f714c2f5d658a924b8fa7f',1,'MusicList::MusicList()']]], ['musiclist_2ecpp',['MusicList.cpp',['../_music_list_8cpp.html',1,'']]], ['musiclist_2eh',['MusicList.h',['../_music_list_8h.html',1,'']]], ['musiclist_5fversion',['MUSICLIST_VERSION',['../_music_list_8h.html#aed91045841c42afea35635b0ccbafe0d',1,'MusicList.h']]], ['musiclistsaveformatentity',['MusicListSaveFormatEntity',['../class_music_list_save_format_entity.html',1,'MusicListSaveFormatEntity'],['../class_music_list_save_format_entity.html#a4b4fd3a35b58d72355e23065c4b6c7f6',1,'MusicListSaveFormatEntity::MusicListSaveFormatEntity()'],['../class_music_list_save_format_entity.html#a239b53df881efa20866cc5d3cdb5e09d',1,'MusicListSaveFormatEntity::MusicListSaveFormatEntity(const QString &fileName, const QString &time, const QString &filePath)']]], ['musiclistsaveformatentity_2ecpp',['MusicListSaveFormatEntity.cpp',['../_music_list_save_format_entity_8cpp.html',1,'']]], ['musiclistsaveformatentity_2eh',['MusicListSaveFormatEntity.h',['../_music_list_save_format_entity_8h.html',1,'']]], ['musiclistsaveformatentity_5fversion',['MUSICLISTSAVEFORMATENTITY_VERSION',['../_music_list_save_format_entity_8h.html#a7365af25d8c6ba21e40f9b373096e8de',1,'MusicListSaveFormatEntity.h']]], ['musiclistwidget',['MusicListWidget',['../class_music_list_widget.html',1,'MusicListWidget'],['../class_music_list_widget.html#afeb33f89c66255d30f48cd5a870a3354',1,'MusicListWidget::MusicListWidget()']]], ['musiclistwidget_2ecpp',['MusicListWidget.cpp',['../_music_list_widget_8cpp.html',1,'']]], ['musiclistwidget_2eh',['MusicListWidget.h',['../_music_list_widget_8h.html',1,'']]], ['musiclistwidget_5fversion',['MUSICLISTWIDGET_VERSION',['../_music_list_widget_8h.html#a39fdeca19fefb0fb7bcaabe6252551b0',1,'MusicListWidget.h']]], ['musiclrc',['MusicLrc',['../class_music_lrc.html',1,'MusicLrc'],['../class_music_lrc.html#ad828837a7490df7bea359187cc6a5021',1,'MusicLrc::MusicLrc()']]], ['musiclrc_2ecpp',['MusicLrc.cpp',['../_music_lrc_8cpp.html',1,'']]], ['musiclrc_2eh',['MusicLrc.h',['../_music_lrc_8h.html',1,'']]], ['musiclrc_5fversion',['MUSICLRC_VERSION',['../_music_lrc_8h.html#a9fcae1060392f06d02245da59f308572',1,'MusicLrc.h']]], ['musicpath',['musicPath',['../class_global_config.html#adcbc795eb6b3667e581a43a380411dfa',1,'GlobalConfig']]], ['mute',['mute',['../class_global_config.html#a84eb8213f5265684e884b4aa437796f9',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_c.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_c.js ================================================ var searchData= [ ['nexthotkey',['nextHotKey',['../class_global_config.html#a6142032e64f5d789b31d141130a7befd',1,'GlobalConfig']]], ['nofocusdelegate',['NoFocusDelegate',['../class_no_focus_delegate.html',1,'']]], ['noplayshang',['noPlayShang',['../class_global_config.html#a16d4905ae48a360f791b3ead3ca4746a',1,'GlobalConfig']]], ['noplayxia',['noPlayXia',['../class_global_config.html#addb88dbe7df5e7224d89d9077d8b505f',1,'GlobalConfig']]], ['noplayzhong',['noPlayZhong',['../class_global_config.html#ac8067ae24e5ec50219fec3d0e2ee7717',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_d.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_d.js ================================================ var searchData= [ ['openlistwidgethotkey',['openListWidgetHotKey',['../class_global_config.html#a3a47a8c78dec1972a7c2d2582d07cb43',1,'GlobalConfig']]], ['openlrchotkey',['openLrcHotKey',['../class_global_config.html#a104ef91b1b59b30a10a516e3a28089d9',1,'GlobalConfig']]], ['openmediawidgethotkey',['openMediaWidgetHotKey',['../class_global_config.html#abd8ed12ed1321639412ea2585263e018',1,'GlobalConfig']]], ['openminwidgethotkey',['openMinWidgetHotKey',['../class_global_config.html#a746c5fd1ed83fdde1bbab9a38c873162',1,'GlobalConfig']]], ['openmusicfilehotkey',['openMusicFileHotKey',['../class_global_config.html#a7512961cb94de6b1a45026e936537961',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_e.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_e.js ================================================ var searchData= [ ['paintevent',['paintEvent',['../class_lrc_demo.html#a8ac7a9d315d4d114fb2fa214ce94a16b',1,'LrcDemo::paintEvent()'],['../class_spectrograph.html#a7b9646632ae65c638b5953ba9e6f1830',1,'Spectrograph::paintEvent()'],['../class_music_lrc.html#a60a8c9b79cf79eb8582d4c3c98cf2fcb',1,'MusicLrc::paintEvent()'],['../class_main_widget.html#a2de850fce0b9cc3a868e4af839312df9',1,'MainWidget::paintEvent()'],['../class_media_widget.html#acd28267c353b42798983163a2f13b275',1,'MediaWidget::paintEvent()'],['../class_min_music_widget.html#a4ddbb9c34b27bf01b8285e895a97cf88',1,'MinMusicWidget::paintEvent()'],['../class_music_list_widget.html#ad885de95b4f1d994d9505ba02c4a31ac',1,'MusicListWidget::paintEvent()']]], ['pause',['Pause',['../class_c_basic_player.html#a756ac686fdd160177834a607acfdbdd4',1,'CBasicPlayer']]], ['pausehotkey',['pauseHotKey',['../class_global_config.html#a1a0a6275d805097d71d531ffdd08c018',1,'GlobalConfig']]], ['play',['Play',['../class_c_basic_player.html#a11a26def96e29eeca6383f98bbc4e4b0',1,'CBasicPlayer']]], ['playedshang',['playedShang',['../class_global_config.html#a08c602010b2b2fdfb59f9b592e1f6e43',1,'GlobalConfig']]], ['playedxia',['playedXia',['../class_global_config.html#a2d135b6bf8f6b572266a4f53b80f077a',1,'GlobalConfig']]], ['playedzhong',['playedZhong',['../class_global_config.html#a7adccbba5a1604744566a757c7b66791',1,'GlobalConfig']]], ['playmode',['playMode',['../class_global_config.html#a1a474f623a029077d7471bb40f46f3e1',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/all_f.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/all_f.js ================================================ var searchData= [ ['qssfilepath',['QssFilePath',['../main_8cpp.html#af11f31f1c1959d5da35dd927058c9fff',1,'main.cpp']]] ]; ================================================ FILE: doc/search/classes_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_0.js ================================================ var searchData= [ ['_5facmwaveformat',['_ACMWaveFormat',['../struct___a_c_m_wave_format.html',1,'']]], ['_5fdvi_5fadpcm_5fencode_5fstate_5fstereo',['_DVI_ADPCM_ENCODE_STATE_STEREO',['../struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o.html',1,'']]], ['_5fdvi_5fadpcm_5finfo',['_DVI_ADPCM_INFO',['../struct___d_v_i___a_d_p_c_m___i_n_f_o.html',1,'']]], ['_5fdvi_5fadpcm_5fstate_5fstereo',['_DVI_ADPCM_STATE_STEREO',['../struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o.html',1,'']]], ['_5fdviadpcmblockheader',['_DVIADPCMBlockHeader',['../struct___d_v_i_a_d_p_c_m_block_header.html',1,'']]], ['_5fdviadpcmheader',['_DVIADPCMHeader',['../struct___d_v_i_a_d_p_c_m_header.html',1,'']]], ['_5fid3tag',['_ID3Tag',['../struct___i_d3_tag.html',1,'']]], ['_5fid3v2frame',['_ID3v2Frame',['../struct___i_d3v2_frame.html',1,'']]], ['_5fid3v2tag',['_ID3v2Tag',['../struct___i_d3v2_tag.html',1,'']]], ['_5fms_5fadpcm_5fcoef_5fset',['_MS_ADPCM_COEF_SET',['../struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t.html',1,'']]], ['_5fms_5fadpcm_5finfo',['_MS_ADPCM_INFO',['../struct___m_s___a_d_p_c_m___i_n_f_o.html',1,'']]], ['_5fmsadpcmblockheadermono',['_MSADPCMBlockHeaderMono',['../struct___m_s_a_d_p_c_m_block_header_mono.html',1,'']]], ['_5fmsadpcmblockheaderstereo',['_MSADPCMBlockHeaderStereo',['../struct___m_s_a_d_p_c_m_block_header_stereo.html',1,'']]], ['_5friffheader',['_RiffHeader',['../struct___riff_header.html',1,'']]], ['_5fwaveheader',['_WaveHeader',['../struct___wave_header.html',1,'']]], ['_5fwaveheaderex',['_WaveHeaderEx',['../struct___wave_header_ex.html',1,'']]], ['_5fwma_5fsync_5freader',['_WMA_SYNC_READER',['../struct___w_m_a___s_y_n_c___r_e_a_d_e_r.html',1,'']]], ['_5fwmaformatspec',['_WMAFormatSpec',['../struct___w_m_a_format_spec.html',1,'']]] ]; ================================================ FILE: doc/search/classes_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_1.js ================================================ var searchData= [ ['aboutpage',['AboutPage',['../class_about_page.html',1,'']]], ['aboutpanel',['AboutPanel',['../class_about_panel.html',1,'']]], ['albumthread',['AlbumThread',['../class_album_thread.html',1,'']]], ['authorpage',['AuthorPage',['../class_author_page.html',1,'']]] ]; ================================================ FILE: doc/search/classes_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_2.js ================================================ var searchData= [ ['caudiostream',['CAudioStream',['../class_c_audio_stream.html',1,'']]], ['cbasicplayer',['CBasicPlayer',['../class_c_basic_player.html',1,'']]], ['ccriticalsection',['CCriticalSection',['../class_c_critical_section.html',1,'']]], ['ccustommemorystream',['CCustomMemoryStream',['../class_c_custom_memory_stream.html',1,'']]], ['cfastfouriertransform',['CFastFourierTransform',['../class_c_fast_fourier_transform.html',1,'']]], ['cfileinput',['CFileInput',['../class_c_file_input.html',1,'']]], ['cfilestream',['CFileStream',['../class_c_file_stream.html',1,'']]], ['chandlestream',['CHandleStream',['../class_c_handle_stream.html',1,'']]], ['cinput',['CInput',['../class_c_input.html',1,'']]], ['cmemorystream',['CMemoryStream',['../class_c_memory_stream.html',1,'']]], ['cmp3input',['CMp3Input',['../class_c_mp3_input.html',1,'']]], ['collectionpanel',['CollectionPanel',['../class_collection_panel.html',1,'']]], ['configdialog',['ConfigDialog',['../class_config_dialog.html',1,'']]], ['cplaythread',['CPlayThread',['../class_c_play_thread.html',1,'']]], ['cspectrumanalyser',['CSpectrumAnalyser',['../class_c_spectrum_analyser.html',1,'']]], ['cspectrumanalyserthread',['CSpectrumAnalyserThread',['../class_c_spectrum_analyser_thread.html',1,'']]], ['cstream',['CStream',['../class_c_stream.html',1,'']]], ['cstreamedinput',['CStreamedInput',['../class_c_streamed_input.html',1,'']]], ['csystem',['CSystem',['../class_c_system.html',1,'']]], ['cthread',['CThread',['../class_c_thread.html',1,'']]], ['cvorbisinput',['CVorbisInput',['../class_c_vorbis_input.html',1,'']]], ['cwaveconverter',['CWaveConverter',['../class_c_wave_converter.html',1,'']]], ['cwaveinput',['CWaveInput',['../class_c_wave_input.html',1,'']]], ['cwmainput',['CWmaInput',['../class_c_wma_input.html',1,'']]] ]; ================================================ FILE: doc/search/classes_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_3.js ================================================ var searchData= [ ['data',['Data',['../class_d_s___start_buffer_helper_1_1_data.html',1,'DS_StartBufferHelper']]], ['dbmodule',['DBModule',['../class_d_b_module.html',1,'']]], ['dither',['dither',['../structdither.html',1,'']]], ['downloadlistpanel',['DownloadListPanel',['../class_download_list_panel.html',1,'']]], ['downloadsettingspage',['DownloadSettingsPage',['../class_download_settings_page.html',1,'']]], ['ds_5faudiodevicecache',['DS_AudioDeviceCache',['../struct_d_s___audio_device_cache.html',1,'']]], ['ds_5finfo',['DS_Info',['../struct_d_s___info.html',1,'']]], ['ds_5frefreshcachestruct',['DS_RefreshCacheStruct',['../struct_d_s___refresh_cache_struct.html',1,'']]], ['ds_5fstartbufferhelper',['DS_StartBufferHelper',['../class_d_s___start_buffer_helper.html',1,'']]] ]; ================================================ FILE: doc/search/classes_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_4.js ================================================ var searchData= [ ['edithotkeydialog',['EditHotkeyDialog',['../class_edit_hotkey_dialog.html',1,'']]] ]; ================================================ FILE: doc/search/classes_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_5.js ================================================ var searchData= [ ['generalsettingspage',['GeneralSettingsPage',['../class_general_settings_page.html',1,'']]], ['globalconfig',['GlobalConfig',['../class_global_config.html',1,'']]], ['globalhotkey',['GlobalHotKey',['../class_global_hot_key.html',1,'']]] ]; ================================================ FILE: doc/search/classes_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_6.js ================================================ var searchData= [ ['hotkeyssettingspage',['HotKeysSettingsPage',['../class_hot_keys_settings_page.html',1,'']]], ['hotkeystablewidget',['HotKeysTableWidget',['../class_hot_keys_table_widget.html',1,'']]] ]; ================================================ FILE: doc/search/classes_7.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_7.js ================================================ var searchData= [ ['loadmusicthread',['LoadMusicThread',['../class_load_music_thread.html',1,'']]], ['loadmusicthreadevent',['LoadMusicThreadEvent',['../class_load_music_thread_event.html',1,'']]], ['lrcdemo',['LrcDemo',['../class_lrc_demo.html',1,'']]], ['lrcportraitpanel',['LrcPortraitPanel',['../class_lrc_portrait_panel.html',1,'']]], ['lrcsettingspage',['LrcSettingsPage',['../class_lrc_settings_page.html',1,'']]], ['lrcthread',['LrcThread',['../class_lrc_thread.html',1,'']]] ]; ================================================ FILE: doc/search/classes_8.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_8.js ================================================ var searchData= [ ['mainwidget',['MainWidget',['../class_main_widget.html',1,'']]], ['mediawidget',['MediaWidget',['../class_media_widget.html',1,'']]], ['minmusicwidget',['MinMusicWidget',['../class_min_music_widget.html',1,'']]], ['musicinfoentity',['MusicInfoEntity',['../class_music_info_entity.html',1,'']]], ['musiclist',['MusicList',['../class_music_list.html',1,'']]], ['musiclistsaveformatentity',['MusicListSaveFormatEntity',['../class_music_list_save_format_entity.html',1,'']]], ['musiclistwidget',['MusicListWidget',['../class_music_list_widget.html',1,'']]], ['musiclrc',['MusicLrc',['../class_music_lrc.html',1,'']]] ]; ================================================ FILE: doc/search/classes_9.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_9.js ================================================ var searchData= [ ['nofocusdelegate',['NoFocusDelegate',['../class_no_focus_delegate.html',1,'']]] ]; ================================================ FILE: doc/search/classes_a.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_a.js ================================================ var searchData= [ ['radiopanel',['RadioPanel',['../class_radio_panel.html',1,'']]], ['rankingpanel',['RankingPanel',['../class_ranking_panel.html',1,'']]] ]; ================================================ FILE: doc/search/classes_b.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_b.js ================================================ var searchData= [ ['searchpanel',['SearchPanel',['../class_search_panel.html',1,'']]], ['shareddialog',['SharedDialog',['../class_shared_dialog.html',1,'']]], ['signal',['Signal',['../class_signal.html',1,'']]], ['signal1',['Signal1',['../class_signal1.html',1,'']]], ['signal2',['Signal2',['../class_signal2.html',1,'']]], ['signal3',['Signal3',['../class_signal3.html',1,'']]], ['signal4',['Signal4',['../class_signal4.html',1,'']]], ['signal5',['Signal5',['../class_signal5.html',1,'']]], ['signal6',['Signal6',['../class_signal6.html',1,'']]], ['signal7',['Signal7',['../class_signal7.html',1,'']]], ['signal8',['Signal8',['../class_signal8.html',1,'']]], ['signal9',['Signal9',['../class_signal9.html',1,'']]], ['slot',['Slot',['../class_slot.html',1,'']]], ['slot1',['Slot1',['../class_slot1.html',1,'']]], ['slot2',['Slot2',['../class_slot2.html',1,'']]], ['slot3',['Slot3',['../class_slot3.html',1,'']]], ['slot4',['Slot4',['../class_slot4.html',1,'']]], ['slot5',['Slot5',['../class_slot5.html',1,'']]], ['slot6',['Slot6',['../class_slot6.html',1,'']]], ['slot7',['Slot7',['../class_slot7.html',1,'']]], ['slot8',['Slot8',['../class_slot8.html',1,'']]], ['slot9',['Slot9',['../class_slot9.html',1,'']]], ['slotbase',['SlotBase',['../class_slot_base.html',1,'']]], ['slotbase1',['SlotBase1',['../class_slot_base1.html',1,'']]], ['slotbase2',['SlotBase2',['../class_slot_base2.html',1,'']]], ['slotbase3',['SlotBase3',['../class_slot_base3.html',1,'']]], ['slotbase4',['SlotBase4',['../class_slot_base4.html',1,'']]], ['slotbase5',['SlotBase5',['../class_slot_base5.html',1,'']]], ['slotbase6',['SlotBase6',['../class_slot_base6.html',1,'']]], ['slotbase7',['SlotBase7',['../class_slot_base7.html',1,'']]], ['slotbase8',['SlotBase8',['../class_slot_base8.html',1,'']]], ['slotbase9',['SlotBase9',['../class_slot_base9.html',1,'']]], ['slotimpl',['SlotImpl',['../class_slot_impl.html',1,'']]], ['slotimpl1',['SlotImpl1',['../class_slot_impl1.html',1,'']]], ['slotimpl2',['SlotImpl2',['../class_slot_impl2.html',1,'']]], ['slotimpl3',['SlotImpl3',['../class_slot_impl3.html',1,'']]], ['slotimpl4',['SlotImpl4',['../class_slot_impl4.html',1,'']]], ['slotimpl5',['SlotImpl5',['../class_slot_impl5.html',1,'']]], ['slotimpl6',['SlotImpl6',['../class_slot_impl6.html',1,'']]], ['slotimpl7',['SlotImpl7',['../class_slot_impl7.html',1,'']]], ['slotimpl8',['SlotImpl8',['../class_slot_impl8.html',1,'']]], ['slotimpl9',['SlotImpl9',['../class_slot_impl9.html',1,'']]], ['soundcontrol',['SoundControl',['../class_sound_control.html',1,'']]], ['spectrograph',['Spectrograph',['../class_spectrograph.html',1,'']]] ]; ================================================ FILE: doc/search/classes_c.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_c.js ================================================ var searchData= [ ['tag_5fdirectaudiodevicedescription',['tag_DirectAudioDeviceDescription',['../structtag___direct_audio_device_description.html',1,'']]], ['thankspage',['ThanksPage',['../class_thanks_page.html',1,'']]] ]; ================================================ FILE: doc/search/classes_d.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_d.js ================================================ var searchData= [ ['updatepage',['UpdatePage',['../class_update_page.html',1,'']]] ]; ================================================ FILE: doc/search/classes_e.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_e.js ================================================ var searchData= [ ['waveformatextensible',['WAVEFORMATEXTENSIBLE',['../struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e.html',1,'']]] ]; ================================================ FILE: doc/search/classes_f.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/classes_f.js ================================================ var searchData= [ ['xing',['xing',['../structxing.html',1,'']]] ]; ================================================ FILE: doc/search/defines_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_0.js ================================================ var searchData= [ ['aboutpage_5fversion',['ABOUTPAGE_VERSION',['../_about_page_8h.html#acfa555ceec60c151d54787331856717f',1,'AboutPage.h']]], ['aboutpanel_5fversion',['ABOUTPANEL_VERSION',['../_about_panel_8h.html#adf0ceab7e72c08bd1f2517fdce0e5c21',1,'AboutPanel.h']]], ['albumthread_5fversion',['ALBUMTHREAD_VERSION',['../_album_thread_8h.html#a2adc8af908a8e5fbbf946cad6fa552a0',1,'AlbumThread.h']]], ['authorpage_5fversion',['AUTHORPAGE_VERSION',['../_author_page_8h.html#ad9e4ffe36dc6d0ae40803fb7550df71b',1,'AuthorPage.h']]] ]; ================================================ FILE: doc/search/defines_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_1.js ================================================ var searchData= [ ['basicplayer_5fversion',['BASICPLAYER_VERSION',['../_basic_player_8h.html#a2eb51377026026e1a912d498750daa5d',1,'BasicPlayer.h']]] ]; ================================================ FILE: doc/search/defines_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_2.js ================================================ var searchData= [ ['collectionpanel_5fversion',['COLLECTIONPANEL_VERSION',['../_collection_panel_8h.html#a11f6ed810f02d7ce686b2b981582f05e',1,'CollectionPanel.h']]], ['configdialog_5fversion',['CONFIGDIALOG_VERSION',['../_config_dialog_8h.html#a6b1202fe0b4502b6d45c546ccc482989',1,'ConfigDialog.h']]] ]; ================================================ FILE: doc/search/defines_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_3.js ================================================ var searchData= [ ['dbmodule_5fversion',['DBMODULE_VERSION',['../_d_b_module_8h.html#a50a994bb088a31ad6cf393e8fe839bd4',1,'DBModule.h']]], ['downloadlistpanel_5fversion',['DOWNLOADLISTPANEL_VERSION',['../_download_list_panel_8h.html#a42232fc9396cf1ae9b013a67dfca2fee',1,'DownloadListPanel.h']]], ['downloadsettingspage_5fversion',['DOWNLOADSETTINGSPAGE_VERSION',['../_download_settings_page_8h.html#a89723d28715e8e6351e27aae7c5d8e68',1,'DownloadSettingsPage.h']]] ]; ================================================ FILE: doc/search/defines_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_4.js ================================================ var searchData= [ ['edithotkeydialog_5fversion',['EDITHOTKEYDIALOG_VERSION',['../_edit_hotkey_dialog_8h.html#a5d32f7b71fc3daa6459ec5c5891c6b60',1,'EditHotkeyDialog.h']]] ]; ================================================ FILE: doc/search/defines_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_5.js ================================================ var searchData= [ ['generalsettingspage_5fversion',['GENERALSETTINGSPAGE_VERSION',['../_general_settings_page_8h.html#a630bfa8d7c92065e8c5d067f7ae0aaca',1,'GeneralSettingsPage.h']]], ['globalconfig_5fversion',['GLOBALCONFIG_VERSION',['../_global_config_8h.html#acb89493e1c9b465b29e1ba7dfe2db7b3',1,'GlobalConfig.h']]], ['globalhotkey_5fversion',['GLOBALHOTKEY_VERSION',['../_global_hotkey_8h.html#a823d2a0de002f50d201fc3644b757698',1,'GlobalHotkey.h']]] ]; ================================================ FILE: doc/search/defines_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_6.js ================================================ var searchData= [ ['hotkeyssettingspage_5fversion',['HOTKEYSSETTINGSPAGE_VERSION',['../_hotkeys_settings_page_8h.html#aa0fa0aff99e7ab1b1ab9ab7020d9053f',1,'HotkeysSettingsPage.h']]], ['hotkeystablewidget_5fversion',['HOTKEYSTABLEWIDGET_VERSION',['../_hotkeys_table_widget_8h.html#aa14ee40e4465cc1dda12440ee6564e2d',1,'HotkeysTableWidget.h']]] ]; ================================================ FILE: doc/search/defines_7.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_7.js ================================================ var searchData= [ ['loadmusicthread_5fversion',['LOADMUSICTHREAD_VERSION',['../_load_music_thread_8h.html#a142ea6df737943ee37b9682315c0b537',1,'LoadMusicThread.h']]], ['lrcdemo_5fversion',['LRCDEMO_VERSION',['../_lrc_demo_8h.html#a1a3db2ad7a8683ed858bab30d1e8966b',1,'LrcDemo.h']]], ['lrcportraitpanel_5fversion',['LRCPORTRAITPANEL_VERSION',['../_lrc_portrait_panel_8h.html#a119bde904d50c809a8a30566c2e26c6e',1,'LrcPortraitPanel.h']]], ['lrcsettingspage_5fversion',['LRCSETTINGSPAGE_VERSION',['../_lrc_settings_page_8h.html#ade7dd060e4185724629f96cbf693cd01',1,'LrcSettingsPage.h']]], ['lrcthread_5fversion',['LRCTHREAD_VERSION',['../_lrc_thread_8h.html#afe5f62b48e363a5de4670476f650abdc',1,'LrcThread.h']]] ]; ================================================ FILE: doc/search/defines_8.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_8.js ================================================ var searchData= [ ['mainwidget_5fversion',['MAINWIDGET_VERSION',['../_main_widget_8h.html#a460d7ec01bbac9451d33eeb1c5f2a388',1,'MainWidget.h']]], ['mediawidget_5fversion',['MEDIAWIDGET_VERSION',['../_media_widget_8h.html#a1c58a93650874653f5eac00ae80dcc1a',1,'MediaWidget.h']]], ['minmusicwidget_5fversion',['MINMUSICWIDGET_VERSION',['../_min_music_widget_8h.html#a3590f54cb6ae16afca25cd8c0f88c1ac',1,'MinMusicWidget.h']]], ['musicinfoentity_5fversion',['MUSICINFOENTITY_VERSION',['../_music_info_entity_8h.html#ad0b04c4fa949e23b62ceb691e373674c',1,'MusicInfoEntity.h']]], ['musiclist_5fversion',['MUSICLIST_VERSION',['../_music_list_8h.html#aed91045841c42afea35635b0ccbafe0d',1,'MusicList.h']]], ['musiclistsaveformatentity_5fversion',['MUSICLISTSAVEFORMATENTITY_VERSION',['../_music_list_save_format_entity_8h.html#a7365af25d8c6ba21e40f9b373096e8de',1,'MusicListSaveFormatEntity.h']]], ['musiclistwidget_5fversion',['MUSICLISTWIDGET_VERSION',['../_music_list_widget_8h.html#a39fdeca19fefb0fb7bcaabe6252551b0',1,'MusicListWidget.h']]], ['musiclrc_5fversion',['MUSICLRC_VERSION',['../_music_lrc_8h.html#a9fcae1060392f06d02245da59f308572',1,'MusicLrc.h']]] ]; ================================================ FILE: doc/search/defines_9.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_9.js ================================================ var searchData= [ ['radiopanel_5fversion',['RADIOPANEL_VERSION',['../_radio_panel_8h.html#aaa8641095f1f0815e45dc1eb1f7699b4',1,'RadioPanel.h']]], ['rankingpanel_5fversion',['RANKINGPANEL_VERSION',['../_ranking_panel_8h.html#a2b52084660812b36e5342477eb02f979',1,'RankingPanel.h']]] ]; ================================================ FILE: doc/search/defines_a.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_a.js ================================================ var searchData= [ ['searchpanel_5fversion',['SEARCHPANEL_VERSION',['../_search_panel_8h.html#a703b0a910b21b508d72ce79f5751d1e8',1,'SearchPanel.h']]], ['shareddialog_5fversion',['SHAREDDIALOG_VERSION',['../_shared_dialog_8h.html#a8a41ea84c0815f44f296829a2a2e20c2',1,'SharedDialog.h']]], ['soundcontrol_5fversion',['SOUNDCONTROL_VERSION',['../_sound_control_8h.html#a2c67b5a4f7d793124c0a12bc3e50bd20',1,'SoundControl.h']]], ['spectrograph_5fversion',['SPECTROGRAPH_VERSION',['../_spectro_graph_8h.html#a10d97c4d42884f85c44cb7984450b5be',1,'SpectroGraph.h']]], ['statusdefine_5fversion',['STATUSDEFINE_VERSION',['../_status_define_8h.html#a568c7b7a5a8f99e088e9d89712b988b5',1,'StatusDefine.h']]] ]; ================================================ FILE: doc/search/defines_b.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_b.js ================================================ var searchData= [ ['thankspage_5fversion',['THANKSPAGE_VERSION',['../_thanks_page_8h.html#a0eab0264e2b1eb762fb29f229a17be36',1,'ThanksPage.h']]], ['tr_5fversion',['TR_VERSION',['../_t_r_8h.html#ac78033ee9b99559b5d3b8d1971262f8c',1,'TR.h']]] ]; ================================================ FILE: doc/search/defines_c.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/defines_c.js ================================================ var searchData= [ ['updatepage_5fversion',['UPDATEPAGE_VERSION',['../_update_page_8h.html#a1a654de797b2f4b60c35fbc4d41537ca',1,'UpdatePage.h']]] ]; ================================================ FILE: doc/search/enums_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/enums_0.js ================================================ var searchData= [ ['albumdownloadstatus',['AlbumDownloadStatus',['../_status_define_8h.html#a358025838b491343e05ba15d45af477f',1,'StatusDefine.h']]] ]; ================================================ FILE: doc/search/enums_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/enums_1.js ================================================ var searchData= [ ['lrcdownloadstatus',['LrcDownloadStatus',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3',1,'StatusDefine.h']]] ]; ================================================ FILE: doc/search/enumvalues_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/enumvalues_0.js ================================================ var searchData= [ ['albumdownloadfailed',['AlbumDownloadFailed',['../_status_define_8h.html#a358025838b491343e05ba15d45af477fa05471db1602d8fc961a05365f690d1bb',1,'StatusDefine.h']]], ['albumdownloadsuccess',['AlbumDownloadSuccess',['../_status_define_8h.html#a358025838b491343e05ba15d45af477fa91de037457090fe423e0b81b6b507d79',1,'StatusDefine.h']]] ]; ================================================ FILE: doc/search/enumvalues_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/enumvalues_1.js ================================================ var searchData= [ ['lrcdownloadfailed',['LrcDownloadFailed',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3a58287d52a0972aceefaa36ae4e350c56',1,'StatusDefine.h']]], ['lrcdownloadsuccess',['LrcDownloadSuccess',['../_status_define_8h.html#a0c158ccea7af97f1c7e487cd30ec0da3a03642c571d5f1be5a17690f22fca2068',1,'StatusDefine.h']]] ]; ================================================ FILE: doc/search/files_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_0.js ================================================ var searchData= [ ['aboutpage_2ecpp',['AboutPage.cpp',['../_about_page_8cpp.html',1,'']]], ['aboutpage_2eh',['AboutPage.h',['../_about_page_8h.html',1,'']]], ['aboutpanel_2ecpp',['AboutPanel.cpp',['../_about_panel_8cpp.html',1,'']]], ['aboutpanel_2eh',['AboutPanel.h',['../_about_panel_8h.html',1,'']]], ['albumthread_2ecpp',['AlbumThread.cpp',['../_album_thread_8cpp.html',1,'']]], ['albumthread_2eh',['AlbumThread.h',['../_album_thread_8h.html',1,'']]], ['authorpage_2ecpp',['AuthorPage.cpp',['../_author_page_8cpp.html',1,'']]], ['authorpage_2eh',['AuthorPage.h',['../_author_page_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_1.js ================================================ var searchData= [ ['basicplayer_2ecpp',['BasicPlayer.cpp',['../_basic_player_8cpp.html',1,'']]], ['basicplayer_2eh',['BasicPlayer.h',['../_basic_player_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_2.js ================================================ var searchData= [ ['collectionpanel_2ecpp',['CollectionPanel.cpp',['../_collection_panel_8cpp.html',1,'']]], ['collectionpanel_2eh',['CollectionPanel.h',['../_collection_panel_8h.html',1,'']]], ['configdialog_2ecpp',['ConfigDialog.cpp',['../_config_dialog_8cpp.html',1,'']]], ['configdialog_2eh',['ConfigDialog.h',['../_config_dialog_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_3.js ================================================ var searchData= [ ['dbmodule_2ecpp',['DBModule.cpp',['../_d_b_module_8cpp.html',1,'']]], ['dbmodule_2eh',['DBModule.h',['../_d_b_module_8h.html',1,'']]], ['downloadlistpanel_2ecpp',['DownloadListPanel.cpp',['../_download_list_panel_8cpp.html',1,'']]], ['downloadlistpanel_2eh',['DownloadListPanel.h',['../_download_list_panel_8h.html',1,'']]], ['downloadsettingspage_2ecpp',['DownloadSettingsPage.cpp',['../_download_settings_page_8cpp.html',1,'']]], ['downloadsettingspage_2eh',['DownloadSettingsPage.h',['../_download_settings_page_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_4.js ================================================ var searchData= [ ['edithotkeydialog_2ecpp',['EditHotkeyDialog.cpp',['../_edit_hotkey_dialog_8cpp.html',1,'']]], ['edithotkeydialog_2eh',['EditHotkeyDialog.h',['../_edit_hotkey_dialog_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_5.js ================================================ var searchData= [ ['generalsettingspage_2ecpp',['GeneralSettingsPage.cpp',['../_general_settings_page_8cpp.html',1,'']]], ['generalsettingspage_2eh',['GeneralSettingsPage.h',['../_general_settings_page_8h.html',1,'']]], ['globalconfig_2ecpp',['GlobalConfig.cpp',['../_global_config_8cpp.html',1,'']]], ['globalconfig_2eh',['GlobalConfig.h',['../_global_config_8h.html',1,'']]], ['globalhotkey_2ecpp',['GlobalHotkey.cpp',['../_global_hotkey_8cpp.html',1,'']]], ['globalhotkey_2eh',['GlobalHotkey.h',['../_global_hotkey_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_6.js ================================================ var searchData= [ ['hotkeyssettingspage_2ecpp',['HotkeysSettingsPage.cpp',['../_hotkeys_settings_page_8cpp.html',1,'']]], ['hotkeyssettingspage_2eh',['HotkeysSettingsPage.h',['../_hotkeys_settings_page_8h.html',1,'']]], ['hotkeystablewidget_2ecpp',['HotkeysTableWidget.cpp',['../_hotkeys_table_widget_8cpp.html',1,'']]], ['hotkeystablewidget_2eh',['HotkeysTableWidget.h',['../_hotkeys_table_widget_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_7.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_7.js ================================================ var searchData= [ ['loadmusicthread_2ecpp',['LoadMusicThread.cpp',['../_load_music_thread_8cpp.html',1,'']]], ['loadmusicthread_2eh',['LoadMusicThread.h',['../_load_music_thread_8h.html',1,'']]], ['lrcdemo_2ecpp',['LrcDemo.cpp',['../_lrc_demo_8cpp.html',1,'']]], ['lrcdemo_2eh',['LrcDemo.h',['../_lrc_demo_8h.html',1,'']]], ['lrcportraitpanel_2ecpp',['LrcPortraitPanel.cpp',['../_lrc_portrait_panel_8cpp.html',1,'']]], ['lrcportraitpanel_2eh',['LrcPortraitPanel.h',['../_lrc_portrait_panel_8h.html',1,'']]], ['lrcsettingspage_2ecpp',['LrcSettingsPage.cpp',['../_lrc_settings_page_8cpp.html',1,'']]], ['lrcsettingspage_2eh',['LrcSettingsPage.h',['../_lrc_settings_page_8h.html',1,'']]], ['lrcthread_2ecpp',['LrcThread.cpp',['../_lrc_thread_8cpp.html',1,'']]], ['lrcthread_2eh',['LrcThread.h',['../_lrc_thread_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_8.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_8.js ================================================ var searchData= [ ['main_2ecpp',['main.cpp',['../main_8cpp.html',1,'']]], ['mainwidget_2eh',['MainWidget.h',['../_main_widget_8h.html',1,'']]], ['mediawidget_2ecpp',['MediaWidget.cpp',['../_media_widget_8cpp.html',1,'']]], ['mediawidget_2eh',['MediaWidget.h',['../_media_widget_8h.html',1,'']]], ['minmusicwidget_2ecpp',['MinMusicWidget.cpp',['../_min_music_widget_8cpp.html',1,'']]], ['minmusicwidget_2eh',['MinMusicWidget.h',['../_min_music_widget_8h.html',1,'']]], ['musicinfoentity_2ecpp',['MusicInfoEntity.cpp',['../_music_info_entity_8cpp.html',1,'']]], ['musicinfoentity_2eh',['MusicInfoEntity.h',['../_music_info_entity_8h.html',1,'']]], ['musiclist_2ecpp',['MusicList.cpp',['../_music_list_8cpp.html',1,'']]], ['musiclist_2eh',['MusicList.h',['../_music_list_8h.html',1,'']]], ['musiclistsaveformatentity_2ecpp',['MusicListSaveFormatEntity.cpp',['../_music_list_save_format_entity_8cpp.html',1,'']]], ['musiclistsaveformatentity_2eh',['MusicListSaveFormatEntity.h',['../_music_list_save_format_entity_8h.html',1,'']]], ['musiclistwidget_2ecpp',['MusicListWidget.cpp',['../_music_list_widget_8cpp.html',1,'']]], ['musiclistwidget_2eh',['MusicListWidget.h',['../_music_list_widget_8h.html',1,'']]], ['musiclrc_2ecpp',['MusicLrc.cpp',['../_music_lrc_8cpp.html',1,'']]], ['musiclrc_2eh',['MusicLrc.h',['../_music_lrc_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_9.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_9.js ================================================ var searchData= [ ['radiopanel_2ecpp',['RadioPanel.cpp',['../_radio_panel_8cpp.html',1,'']]], ['radiopanel_2eh',['RadioPanel.h',['../_radio_panel_8h.html',1,'']]], ['rankingpanel_2ecpp',['RankingPanel.cpp',['../_ranking_panel_8cpp.html',1,'']]], ['rankingpanel_2eh',['RankingPanel.h',['../_ranking_panel_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_a.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_a.js ================================================ var searchData= [ ['searchpanel_2ecpp',['SearchPanel.cpp',['../_search_panel_8cpp.html',1,'']]], ['searchpanel_2eh',['SearchPanel.h',['../_search_panel_8h.html',1,'']]], ['shareddialog_2ecpp',['SharedDialog.cpp',['../_shared_dialog_8cpp.html',1,'']]], ['shareddialog_2eh',['SharedDialog.h',['../_shared_dialog_8h.html',1,'']]], ['soundcontrol_2ecpp',['SoundControl.cpp',['../_sound_control_8cpp.html',1,'']]], ['soundcontrol_2eh',['SoundControl.h',['../_sound_control_8h.html',1,'']]], ['spectrograph_2ecpp',['SpectroGraph.cpp',['../_spectro_graph_8cpp.html',1,'']]], ['spectrograph_2eh',['SpectroGraph.h',['../_spectro_graph_8h.html',1,'']]], ['statusdefine_2eh',['StatusDefine.h',['../_status_define_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_b.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_b.js ================================================ var searchData= [ ['thankspage_2ecpp',['ThanksPage.cpp',['../_thanks_page_8cpp.html',1,'']]], ['thankspage_2eh',['ThanksPage.h',['../_thanks_page_8h.html',1,'']]], ['tr_2eh',['TR.h',['../_t_r_8h.html',1,'']]] ]; ================================================ FILE: doc/search/files_c.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/files_c.js ================================================ var searchData= [ ['updatepage_2ecpp',['UpdatePage.cpp',['../_update_page_8cpp.html',1,'']]], ['updatepage_2eh',['UpdatePage.h',['../_update_page_8h.html',1,'']]] ]; ================================================ FILE: doc/search/functions_0.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_0.js ================================================ var searchData= [ ['aboutpage',['AboutPage',['../class_about_page.html#ac52d377f31a7c9d7cf099dbfd4a3fff5',1,'AboutPage']]], ['aboutpanel',['AboutPanel',['../class_about_panel.html#aa978a370515f2eb8e26ee48555f830e6',1,'AboutPanel']]], ['albumpath',['albumPath',['../class_global_config.html#a61e28d38356f48866f965c927e11ec44',1,'GlobalConfig']]], ['albumthread',['AlbumThread',['../class_album_thread.html#a32b061eed3f353f5fdc038303130117b',1,'AlbumThread']]], ['apply',['apply',['../class_download_settings_page.html#ad57295b6ad6898ea93c0434e2c57e707',1,'DownloadSettingsPage::apply()'],['../class_general_settings_page.html#ad7acec6097df8b58f51dbf3c4d125687',1,'GeneralSettingsPage::apply()'],['../class_hot_keys_settings_page.html#a7b448849a8f4320851f1dbf492d2464e',1,'HotKeysSettingsPage::apply()'],['../class_lrc_settings_page.html#a1f0c5fbce89ddec5e1bf5af4fcb60644',1,'LrcSettingsPage::apply()']]], ['authorpage',['AuthorPage',['../class_author_page.html#a8fb8ee9b9b0e3b5fa4fbf5a427492e91',1,'AuthorPage']]], ['autogreetings',['autoGreetings',['../class_global_config.html#abb9f5e91894e324f2a579ff35b946a78',1,'GlobalConfig']]], ['autoplaymusic',['autoPlayMusic',['../class_global_config.html#ae6ded11a14b1cbb2c76c330a52b00ac6',1,'GlobalConfig']]], ['autorunplayer',['autoRunPlayer',['../class_global_config.html#a48d45e00d63c344a387933257a34b8a1',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_1.js ================================================ var searchData= [ ['cbasicplayer',['CBasicPlayer',['../class_c_basic_player.html#a4b063ea6136b9373fd132252af403ba5',1,'CBasicPlayer']]], ['changealbumimage',['changeAlbumImage',['../class_min_music_widget.html#a10315723b03e291b88a478b56af00047',1,'MinMusicWidget']]], ['cleardb',['clearDB',['../class_d_b_module.html#ae9f17b6c46496876f77bea192daf7e9f',1,'DBModule']]], ['closeevent',['closeEvent',['../class_config_dialog.html#aa4097fc80358bf4fe7a3ef7689a49f48',1,'ConfigDialog']]], ['collectionpanel',['CollectionPanel',['../class_collection_panel.html#ab80b09255b9b6e1b2d39bd617381c162',1,'CollectionPanel']]], ['configdialog',['ConfigDialog',['../class_config_dialog.html#ae6615f6129fc57116c23b275a8cf0997',1,'ConfigDialog']]], ['contextmenuevent',['contextMenuEvent',['../class_music_lrc.html#a022ec9cc9d9e1f784a48825297c5670e',1,'MusicLrc::contextMenuEvent()'],['../class_main_widget.html#a7eb48b3beb05269d2bca40670e37b0c1',1,'MainWidget::contextMenuEvent()'],['../class_min_music_widget.html#a5c442e71137032769a6ebe5888bc7425',1,'MinMusicWidget::contextMenuEvent()'],['../class_music_list.html#ae26d3d227b834b524325f2585e92fc21',1,'MusicList::contextMenuEvent()']]], ['createconnection',['createConnection',['../class_d_b_module.html#a338797c1de48e9e72f063262ff1d1fcf',1,'DBModule']]], ['createtable',['createTable',['../class_d_b_module.html#a2ba0e92be0762a1c143122038440f30e',1,'DBModule']]] ]; ================================================ FILE: doc/search/functions_10.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_10.js ================================================ var searchData= [ ['unlocklrc',['unlockLrc',['../class_music_lrc.html#a03cf87cd71ba0fbaadce457a553e741c',1,'MusicLrc']]], ['updatealbumurlpath',['updateAlbumUrlPath',['../class_d_b_module.html#ab46de76e6935e282ef4378a05a0fb7f9',1,'DBModule']]], ['updatepage',['UpdatePage',['../class_update_page.html#a79b95fb155dc683ffa2728e83c48baf4',1,'UpdatePage']]] ]; ================================================ FILE: doc/search/functions_11.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_11.js ================================================ var searchData= [ ['volume',['volume',['../class_global_config.html#ab3431f3e10d43d6d9b4d6082c6244792',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_12.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_12.js ================================================ var searchData= [ ['_7eaboutpage',['~AboutPage',['../class_about_page.html#a34933514a49064927aa95c32f7d0b085',1,'AboutPage']]], ['_7eaboutpanel',['~AboutPanel',['../class_about_panel.html#a3064261db6c85917f9be6c614b31e24d',1,'AboutPanel']]], ['_7ealbumthread',['~AlbumThread',['../class_album_thread.html#a415bbb58b43f992f35370569821e34f9',1,'AlbumThread']]], ['_7eauthorpage',['~AuthorPage',['../class_author_page.html#a1757018eb33a6660a4d5352cc2dd2d02',1,'AuthorPage']]], ['_7ecbasicplayer',['~CBasicPlayer',['../class_c_basic_player.html#a2df79ab9ea5a52ae878b5cf8833d8e4f',1,'CBasicPlayer']]], ['_7ecollectionpanel',['~CollectionPanel',['../class_collection_panel.html#a0c9e9858c60ee911e06ad9332c891462',1,'CollectionPanel']]], ['_7econfigdialog',['~ConfigDialog',['../class_config_dialog.html#a485badac4dffa04603f800bb9d396e1d',1,'ConfigDialog']]], ['_7edownloadlistpanel',['~DownloadListPanel',['../class_download_list_panel.html#a6b9986022dbca6baac47f64cca48c9b4',1,'DownloadListPanel']]], ['_7edownloadsettingspage',['~DownloadSettingsPage',['../class_download_settings_page.html#a6f833afd2e35d6b8b9a85667483f0a88',1,'DownloadSettingsPage']]], ['_7eedithotkeydialog',['~EditHotkeyDialog',['../class_edit_hotkey_dialog.html#a62177ad2622bd2efab81aa8fc99e9a19',1,'EditHotkeyDialog']]], ['_7egeneralsettingspage',['~GeneralSettingsPage',['../class_general_settings_page.html#af0a724ac028192ba30e518c6598ee8f2',1,'GeneralSettingsPage']]], ['_7eglobalhotkey',['~GlobalHotKey',['../class_global_hot_key.html#a6aa5957d852aea5418f94f66b404fd7a',1,'GlobalHotKey']]], ['_7ehotkeyssettingspage',['~HotKeysSettingsPage',['../class_hot_keys_settings_page.html#a2640178d50906df129d52e63ba23e72c',1,'HotKeysSettingsPage']]], ['_7ehotkeystablewidget',['~HotKeysTableWidget',['../class_hot_keys_table_widget.html#a1da65ddf2a0a4eda046bd9c423472da2',1,'HotKeysTableWidget']]], ['_7eloadmusicthread',['~LoadMusicThread',['../class_load_music_thread.html#a0647b93173158d483ab9056dcab371cf',1,'LoadMusicThread']]], ['_7eloadmusicthreadevent',['~LoadMusicThreadEvent',['../class_load_music_thread_event.html#ad5d7bb7de030266369e90499ee4284ff',1,'LoadMusicThreadEvent']]], ['_7elrcdemo',['~LrcDemo',['../class_lrc_demo.html#afdfedf35d9603d547b2962056b257e40',1,'LrcDemo']]], ['_7elrcportraitpanel',['~LrcPortraitPanel',['../class_lrc_portrait_panel.html#a642af99db5457dd28544a4b91ab76f73',1,'LrcPortraitPanel']]], ['_7elrcsettingspage',['~LrcSettingsPage',['../class_lrc_settings_page.html#a659bc020cbf596a371dd1bf0f0f7537e',1,'LrcSettingsPage']]], ['_7elrcthread',['~LrcThread',['../class_lrc_thread.html#a851db551fd6141aac6002ad042dc610e',1,'LrcThread']]], ['_7emainwidget',['~MainWidget',['../class_main_widget.html#add21c63f8e799303a21a69da3d288c2f',1,'MainWidget']]], ['_7emediawidget',['~MediaWidget',['../class_media_widget.html#aa6a87e413bd2b8a7f9b5ed042d1501cd',1,'MediaWidget']]], ['_7eminmusicwidget',['~MinMusicWidget',['../class_min_music_widget.html#a2ba10fcfbaab182210cd014edda3490a',1,'MinMusicWidget']]], ['_7emusicinfoentity',['~MusicInfoEntity',['../class_music_info_entity.html#aff9786f649a104b50c632642eefc6ca0',1,'MusicInfoEntity']]], ['_7emusiclist',['~MusicList',['../class_music_list.html#a50ac37d6bb9ae0ce33daa7652e740b90',1,'MusicList']]], ['_7emusiclistsaveformatentity',['~MusicListSaveFormatEntity',['../class_music_list_save_format_entity.html#afc88ec574de819f1a03839efb71f0c91',1,'MusicListSaveFormatEntity']]], ['_7emusiclistwidget',['~MusicListWidget',['../class_music_list_widget.html#a9399e382fe798b3ed27de1f2b18336b2',1,'MusicListWidget']]], ['_7emusiclrc',['~MusicLrc',['../class_music_lrc.html#a785603e7032633e428ea449c8cac8c7f',1,'MusicLrc']]], ['_7eradiopanel',['~RadioPanel',['../class_radio_panel.html#ab802d34b8dc251d3a38351f8442b2d57',1,'RadioPanel']]], ['_7erankingpanel',['~RankingPanel',['../class_ranking_panel.html#a940126638c74c3ff50f6d8ebb21e2cf4',1,'RankingPanel']]], ['_7esearchpanel',['~SearchPanel',['../class_search_panel.html#a3e85562d33adde88afac0e0ff26cf49d',1,'SearchPanel']]], ['_7eshareddialog',['~SharedDialog',['../class_shared_dialog.html#a6f9e41bbabb622d17f73e693393293e9',1,'SharedDialog']]], ['_7espectrograph',['~Spectrograph',['../class_spectrograph.html#aede83dadf66ffca77b01b023ee35d8b6',1,'Spectrograph']]], ['_7ethankspage',['~ThanksPage',['../class_thanks_page.html#a039006a9cb2a3f34cfcdb3b428f54f42',1,'ThanksPage']]], ['_7eupdatepage',['~UpdatePage',['../class_update_page.html#aab2adab98f243a7e24e35af02a6946a4',1,'UpdatePage']]] ]; ================================================ FILE: doc/search/functions_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_2.js ================================================ var searchData= [ ['defaultchoicecolor',['defaultChoiceColor',['../class_global_config.html#a53469e44ef7d3167684597e836202585',1,'GlobalConfig']]], ['defaultplayer',['defaultPlayer',['../class_global_config.html#af9f70ca0cb4848f425ce41e23bb4d891',1,'GlobalConfig']]], ['delinstance',['delInstance',['../class_global_config.html#a4c707002e54cf452c9419be0cf372088',1,'GlobalConfig']]], ['delline',['delLine',['../class_d_b_module.html#a1bba2328aa044f56e639391182820356',1,'DBModule']]], ['downloadlistpanel',['DownloadListPanel',['../class_download_list_panel.html#a01e1d23931a45c02e27d678949a9c7ea',1,'DownloadListPanel']]], ['downloadsettingspage',['DownloadSettingsPage',['../class_download_settings_page.html#a159b55279093dd6c3b67824f838070e0',1,'DownloadSettingsPage']]], ['dragenterevent',['dragEnterEvent',['../class_main_widget.html#a90b7408bc9765b6b09f46cc6acac3bc8',1,'MainWidget']]], ['dropevent',['dropEvent',['../class_main_widget.html#afb03e15a9705c20c17abdf7aa417cc87',1,'MainWidget']]] ]; ================================================ FILE: doc/search/functions_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_3.js ================================================ var searchData= [ ['edithotkeydialog',['EditHotkeyDialog',['../class_edit_hotkey_dialog.html#a7c5852e58824607447124522b32e531f',1,'EditHotkeyDialog']]], ['eventfilter',['eventFilter',['../class_edit_hotkey_dialog.html#ab210f76fde3c8b39c7868796f8ff587c',1,'EditHotkeyDialog::eventFilter()'],['../class_music_list_widget.html#aff913742f850f364b1b4d25a759817df',1,'MusicListWidget::eventFilter()']]] ]; ================================================ FILE: doc/search/functions_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_4.js ================================================ var searchData= [ ['filename',['fileName',['../class_music_info_entity.html#a7000e73426aea59711f69137a8d763e4',1,'MusicInfoEntity::fileName()'],['../class_music_list_save_format_entity.html#a2def014bc5d64f2217aaafc9ff74cf7d',1,'MusicListSaveFormatEntity::fileName()']]], ['filepath',['filePath',['../class_music_info_entity.html#ae33cee162f02512a7d5694d0806bec69',1,'MusicInfoEntity::filePath()'],['../class_music_list_save_format_entity.html#a3b57ce569a15fe23cb6464539bcf2573',1,'MusicListSaveFormatEntity::filePath()']]], ['fontname',['fontName',['../class_global_config.html#ab44bfa507df285ce567dfe38313bee98',1,'GlobalConfig']]], ['fontsize',['fontSize',['../class_global_config.html#a269d05da26561e3a40d78f6bca03d826',1,'GlobalConfig']]], ['fonttype',['fontType',['../class_global_config.html#abf66780c94e90a63048b474a9b2f9973',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_5.js ================================================ var searchData= [ ['generalsettingspage',['GeneralSettingsPage',['../class_general_settings_page.html#a92cb17c9f2c07b4503d7fbae07e9090b',1,'GeneralSettingsPage']]], ['getinput',['GetInput',['../class_c_basic_player.html#a80ed1111ee4f56ac4f77a4bc70a33cc1',1,'CBasicPlayer']]], ['getlongframeposition',['GetLongFramePosition',['../class_c_basic_player.html#a9cec3701ade8bab7f1ce20d2082a7207',1,'CBasicPlayer']]], ['getvolume',['getVolume',['../class_sound_control.html#ac3f9b1f1fbeb78580e3505a9813d91ef',1,'SoundControl']]], ['globalhotkey',['GlobalHotKey',['../class_global_hot_key.html#a8528625381dbde7d0cff1eb7c2e10278',1,'GlobalHotKey']]] ]; ================================================ FILE: doc/search/functions_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_6.js ================================================ var searchData= [ ['handlefinished',['handleFinished',['../class_c_basic_player.html#afbda99b45acd28245ea5013b240e0aa2',1,'CBasicPlayer']]], ['handlespectrumchanged',['handleSpectrumChanged',['../class_spectrograph.html#ac2b74df2b8fc7e7ba3eff78361b84efa',1,'Spectrograph']]], ['hotkeyssettingspage',['HotKeysSettingsPage',['../class_hot_keys_settings_page.html#a95c5d5d41b0c317db30f5a33b2a1f059',1,'HotKeysSettingsPage']]], ['hotkeystablewidget',['HotKeysTableWidget',['../class_hot_keys_table_widget.html#a9fe94db1293190bacd376ec6917d77a5',1,'HotKeysTableWidget']]] ]; ================================================ FILE: doc/search/functions_7.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_7.js ================================================ var searchData= [ ['init',['init',['../class_about_panel.html#a9bd41f09b01e2f2c6d0a412d16bc791e',1,'AboutPanel::init()'],['../class_config_dialog.html#a1c633059d74a617a39813a0582dd7f7d',1,'ConfigDialog::init()'],['../class_download_settings_page.html#ad0ba1e33a127efa02d43ebc709970ef4',1,'DownloadSettingsPage::init()'],['../class_edit_hotkey_dialog.html#a755223d6c34545736525f2047aaed30b',1,'EditHotkeyDialog::init()'],['../class_general_settings_page.html#afcf6e1dbdf85c3bd09e222059244db35',1,'GeneralSettingsPage::init()'],['../class_hot_keys_settings_page.html#adaf557f31ffde183c52b66b36923377f',1,'HotKeysSettingsPage::init()'],['../class_lrc_settings_page.html#ab938c3442653a7edb1bf4d6fc0921026',1,'LrcSettingsPage::init()'],['../class_shared_dialog.html#a734164cf28e5c7ad788f354997b013da',1,'SharedDialog::init()']]], ['initdb',['initDB',['../class_d_b_module.html#aa6b3b15ba1e1ec8d902d0b2168105f8d',1,'DBModule']]], ['insertline',['insertLine',['../class_d_b_module.html#a170ceff321bc61501b63d18c1248ff35',1,'DBModule']]], ['instance',['instance',['../class_global_config.html#a57c19a50c9e02584c7dd258a7ac14b2a',1,'GlobalConfig']]], ['isvaild',['isVaild',['../class_c_basic_player.html#a1e414657ca9072f8b1843032711c8c6c',1,'CBasicPlayer']]] ]; ================================================ FILE: doc/search/functions_8.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_8.js ================================================ var searchData= [ ['lasthotkey',['lastHotKey',['../class_global_config.html#a35eed45c66aa9bb5022f9909a787b325',1,'GlobalConfig']]], ['loadmusicthread',['LoadMusicThread',['../class_load_music_thread.html#a6ed424e435074afdf1003823d334aadb',1,'LoadMusicThread']]], ['loadmusicthreadevent',['LoadMusicThreadEvent',['../class_load_music_thread_event.html#a6e8996c90c971352f4f5e780dbbbac2c',1,'LoadMusicThreadEvent']]], ['lrcdemo',['LrcDemo',['../class_lrc_demo.html#a6300c91fbff10da3fb38c5194657ebcd',1,'LrcDemo']]], ['lrcpath',['lrcPath',['../class_global_config.html#a6faba12944439a17698f44eee7afba19',1,'GlobalConfig']]], ['lrcportraitpanel',['LrcPortraitPanel',['../class_lrc_portrait_panel.html#ad2984bcb9f9f53b07ffec52189b50966',1,'LrcPortraitPanel']]], ['lrcsettingspage',['LrcSettingsPage',['../class_lrc_settings_page.html#a414e9e2e0cf7ea2de9eece06ea3fe457',1,'LrcSettingsPage']]], ['lrcthread',['LrcThread',['../class_lrc_thread.html#a6f901c8fd61beb041c18384ddc9e3ccf',1,'LrcThread']]] ]; ================================================ FILE: doc/search/functions_9.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_9.js ================================================ var searchData= [ ['mainwidget',['MainWidget',['../class_main_widget.html#a91bfa8c7c3e1a79af843b76705ca892d',1,'MainWidget']]], ['mediawidget',['MediaWidget',['../class_media_widget.html#a23958dfbb6d77d1338a4576aefaa7510',1,'MediaWidget']]], ['minmusicwidget',['MinMusicWidget',['../class_min_music_widget.html#a42c77faa88a09b435789e5af31670741',1,'MinMusicWidget']]], ['mintotrayhotkey',['minToTrayHotKey',['../class_global_config.html#a603068006c9320442e451dd55dfc79b4',1,'GlobalConfig']]], ['mousemoveevent',['mouseMoveEvent',['../class_music_lrc.html#a687d718edd94af97a67e70a7155d24f0',1,'MusicLrc::mouseMoveEvent()'],['../class_main_widget.html#ab7846f0e9bf1a9e07a9cc3e74bf7d863',1,'MainWidget::mouseMoveEvent()'],['../class_min_music_widget.html#ad5c1f18ef5de86e27c1258cd019628e8',1,'MinMusicWidget::mouseMoveEvent()']]], ['mousepressevent',['mousePressEvent',['../class_music_lrc.html#a2135be03e435d5c3d1daacb4b52709e3',1,'MusicLrc::mousePressEvent()'],['../class_main_widget.html#acacbce4003a49640148203a497e7ab4a',1,'MainWidget::mousePressEvent()'],['../class_min_music_widget.html#a93f0dcea4d87cb649844dfd23f883ba8',1,'MinMusicWidget::mousePressEvent()']]], ['musicinfoentity',['MusicInfoEntity',['../class_music_info_entity.html#a0e26dede31aa77957f6eb136814cad5e',1,'MusicInfoEntity::MusicInfoEntity()'],['../class_music_info_entity.html#ae619b1f5d87339389e2707042a1ccab1',1,'MusicInfoEntity::MusicInfoEntity(const QString &fileName, const QString &time, const QString &filePath)']]], ['musiclist',['MusicList',['../class_music_list.html#ab1d1b3abc4f714c2f5d658a924b8fa7f',1,'MusicList']]], ['musiclistsaveformatentity',['MusicListSaveFormatEntity',['../class_music_list_save_format_entity.html#a4b4fd3a35b58d72355e23065c4b6c7f6',1,'MusicListSaveFormatEntity::MusicListSaveFormatEntity()'],['../class_music_list_save_format_entity.html#a239b53df881efa20866cc5d3cdb5e09d',1,'MusicListSaveFormatEntity::MusicListSaveFormatEntity(const QString &fileName, const QString &time, const QString &filePath)']]], ['musiclistwidget',['MusicListWidget',['../class_music_list_widget.html#afeb33f89c66255d30f48cd5a870a3354',1,'MusicListWidget']]], ['musiclrc',['MusicLrc',['../class_music_lrc.html#ad828837a7490df7bea359187cc6a5021',1,'MusicLrc']]], ['musicpath',['musicPath',['../class_global_config.html#adcbc795eb6b3667e581a43a380411dfa',1,'GlobalConfig']]], ['mute',['mute',['../class_global_config.html#a84eb8213f5265684e884b4aa437796f9',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_a.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_a.js ================================================ var searchData= [ ['nexthotkey',['nextHotKey',['../class_global_config.html#a6142032e64f5d789b31d141130a7befd',1,'GlobalConfig']]], ['noplayshang',['noPlayShang',['../class_global_config.html#a16d4905ae48a360f791b3ead3ca4746a',1,'GlobalConfig']]], ['noplayxia',['noPlayXia',['../class_global_config.html#addb88dbe7df5e7224d89d9077d8b505f',1,'GlobalConfig']]], ['noplayzhong',['noPlayZhong',['../class_global_config.html#ac8067ae24e5ec50219fec3d0e2ee7717',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_b.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_b.js ================================================ var searchData= [ ['openlistwidgethotkey',['openListWidgetHotKey',['../class_global_config.html#a3a47a8c78dec1972a7c2d2582d07cb43',1,'GlobalConfig']]], ['openlrchotkey',['openLrcHotKey',['../class_global_config.html#a104ef91b1b59b30a10a516e3a28089d9',1,'GlobalConfig']]], ['openmediawidgethotkey',['openMediaWidgetHotKey',['../class_global_config.html#abd8ed12ed1321639412ea2585263e018',1,'GlobalConfig']]], ['openminwidgethotkey',['openMinWidgetHotKey',['../class_global_config.html#a746c5fd1ed83fdde1bbab9a38c873162',1,'GlobalConfig']]], ['openmusicfilehotkey',['openMusicFileHotKey',['../class_global_config.html#a7512961cb94de6b1a45026e936537961',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_c.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_c.js ================================================ var searchData= [ ['paintevent',['paintEvent',['../class_lrc_demo.html#a8ac7a9d315d4d114fb2fa214ce94a16b',1,'LrcDemo::paintEvent()'],['../class_spectrograph.html#a7b9646632ae65c638b5953ba9e6f1830',1,'Spectrograph::paintEvent()'],['../class_music_lrc.html#a60a8c9b79cf79eb8582d4c3c98cf2fcb',1,'MusicLrc::paintEvent()'],['../class_main_widget.html#a2de850fce0b9cc3a868e4af839312df9',1,'MainWidget::paintEvent()'],['../class_media_widget.html#acd28267c353b42798983163a2f13b275',1,'MediaWidget::paintEvent()'],['../class_min_music_widget.html#a4ddbb9c34b27bf01b8285e895a97cf88',1,'MinMusicWidget::paintEvent()'],['../class_music_list_widget.html#ad885de95b4f1d994d9505ba02c4a31ac',1,'MusicListWidget::paintEvent()']]], ['pause',['Pause',['../class_c_basic_player.html#a756ac686fdd160177834a607acfdbdd4',1,'CBasicPlayer']]], ['pausehotkey',['pauseHotKey',['../class_global_config.html#a1a0a6275d805097d71d531ffdd08c018',1,'GlobalConfig']]], ['play',['Play',['../class_c_basic_player.html#a11a26def96e29eeca6383f98bbc4e4b0',1,'CBasicPlayer']]], ['playedshang',['playedShang',['../class_global_config.html#a08c602010b2b2fdfb59f9b592e1f6e43',1,'GlobalConfig']]], ['playedxia',['playedXia',['../class_global_config.html#a2d135b6bf8f6b572266a4f53b80f077a',1,'GlobalConfig']]], ['playedzhong',['playedZhong',['../class_global_config.html#a7adccbba5a1604744566a757c7b66791',1,'GlobalConfig']]], ['playmode',['playMode',['../class_global_config.html#a1a474f623a029077d7471bb40f46f3e1',1,'GlobalConfig']]] ]; ================================================ FILE: doc/search/functions_d.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_d.js ================================================ var searchData= [ ['radiopanel',['RadioPanel',['../class_radio_panel.html#aa6c8f39c33db7f1f63e6798a0293ab09',1,'RadioPanel']]], ['rankingpanel',['RankingPanel',['../class_ranking_panel.html#a46b2be0d1f28188310800bf5d45f309f',1,'RankingPanel']]], ['readalbumurlpathfromdb',['readAlbumUrlPathFromDB',['../class_d_b_module.html#a4e5d6efc6419e40703896e5c95045f7b',1,'DBModule']]], ['readfilepath',['readFilePath',['../class_d_b_module.html#ace3c271b20909f9ecadd799e4d6e0760',1,'DBModule']]], ['readmusicinfoentity',['readMusicInfoEntity',['../class_d_b_module.html#af2d87fc2deb0116f7981d42d911d348b',1,'DBModule']]], ['readmusiclistsaveformatentity',['readMusicListSaveFormatEntity',['../class_d_b_module.html#a79611bccda3816489c069a7146b9f362',1,'DBModule']]], ['reload',['reload',['../class_global_config.html#ad041744166a17de9d6401019b9292c51',1,'GlobalConfig']]], ['reset',['reset',['../class_spectrograph.html#a63c0355273ab24b5206817695421747d',1,'Spectrograph']]], ['run',['run',['../class_album_thread.html#ac14428e9aa20cf7be7ba8e8b01f8cd01',1,'AlbumThread::run()'],['../class_load_music_thread.html#afc7d46fd8c97421bdef319eb58251d49',1,'LoadMusicThread::run()'],['../class_lrc_thread.html#acf69734636f2471172fe0f19d8cd4a27',1,'LrcThread::run()']]] ]; ================================================ FILE: doc/search/functions_e.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_e.js ================================================ var searchData= [ ['save',['save',['../class_global_config.html#a7cb915baea4cf7f0b8e95a99c0f9b4c6',1,'GlobalConfig']]], ['searchpanel',['SearchPanel',['../class_search_panel.html#ae4da9069ad97ac85c1db41faeac0448e',1,'SearchPanel']]], ['setalbumpath',['setAlbumPath',['../class_global_config.html#ac4c0bbac551af069da4acf237e22a880',1,'GlobalConfig']]], ['setautogreetings',['setAutoGreetings',['../class_global_config.html#a756f2fb271ba63ac5b0e9123a5d8995d',1,'GlobalConfig']]], ['setautoplaymusic',['setAutoPlayMusic',['../class_global_config.html#a09cc1756f576ca5562132bd9d360c3fd',1,'GlobalConfig']]], ['setautorunplayer',['setAutoRunPlayer',['../class_global_config.html#a994147096c96517895112b828c4a9a3c',1,'GlobalConfig']]], ['setconfigoptionshotkeywork',['setConfigOptionsHotkeyWork',['../class_global_hot_key.html#ad7f329a231fbaa786a63f40157bf234d',1,'GlobalHotKey']]], ['setcurrentmusicrow',['setCurrentMusicRow',['../class_music_list.html#a0066216dc9472b66c15f23283fcaf56d',1,'MusicList']]], ['setdefaultchoicecolor',['setDefaultChoiceColor',['../class_global_config.html#a53dbe42975745c8466b40eb00bab0304',1,'GlobalConfig']]], ['setdefaultplayer',['setDefaultPlayer',['../class_global_config.html#abb5e34a4c96b4459db17f6750950cec9',1,'GlobalConfig']]], ['setfilename',['setFileName',['../class_music_info_entity.html#a6354d7c348554604885948f41bb51b3a',1,'MusicInfoEntity::setFileName()'],['../class_music_list_save_format_entity.html#ab3fe17198ba6e6ef3468d4f8595ef16a',1,'MusicListSaveFormatEntity::setFileName()']]], ['setfilepath',['setFilePath',['../class_music_info_entity.html#a53b9a6a6088ffa97a6071a78f8c77abe',1,'MusicInfoEntity::setFilePath()'],['../class_music_list_save_format_entity.html#ab8c338449137d347296d47a9acc8ca04',1,'MusicListSaveFormatEntity::setFilePath()']]], ['setfontname',['setFontName',['../class_global_config.html#a4e1670f1df9385cd95d170b8a7e882c8',1,'GlobalConfig::setFontName()'],['../class_lrc_demo.html#a3482c4ed6a8760afaf3b30d1d7dc3e9c',1,'LrcDemo::setFontName()']]], ['setfontsize',['setFontSize',['../class_global_config.html#a90caad56077325e072ebd7118bce4c7a',1,'GlobalConfig::setFontSize()'],['../class_lrc_demo.html#abc6916ad2b9fc626accd2e8b2e836e25',1,'LrcDemo::setFontSize()']]], ['setfonttype',['setFontType',['../class_global_config.html#a3d05f0d5d5559c9a0191d8fd8c1df9d2',1,'GlobalConfig::setFontType()'],['../class_lrc_demo.html#acac5ca74450a5db8eb48ac3df9942c68',1,'LrcDemo::setFontType()']]], ['setlasthotkey',['setLastHotKey',['../class_global_config.html#a0048734b58ec946010cc72ec15a69236',1,'GlobalConfig']]], ['setlasthotkeywork',['setLastHotkeyWork',['../class_global_hot_key.html#ab84bfb73b127995c01061c5a29b60ec1',1,'GlobalHotKey']]], ['setlineargradient',['setLinearGradient',['../class_lrc_demo.html#a58b10ce6a71500397688886945da376b',1,'LrcDemo']]], ['setlineargradient2',['setLinearGradient2',['../class_lrc_demo.html#a217f59ab101d973d37e08f7f442c4f33',1,'LrcDemo']]], ['setlineargradient3',['setLinearGradient3',['../class_lrc_demo.html#ad42dc5427033498bb6ba268ebbcb3d39',1,'LrcDemo']]], ['setlrcdemoshadow',['setLrcDemoShadow',['../class_lrc_demo.html#a46d3eec6eeeefb37564dc4edb9c3a889',1,'LrcDemo']]], ['setlrcpath',['setLrcPath',['../class_global_config.html#a746fd1b1f53e6e6da933628fe742c681',1,'GlobalConfig']]], ['setmasklineargradient',['setMaskLinearGradient',['../class_lrc_demo.html#abfdd9a01fb1dabae9a9480e6aff24547',1,'LrcDemo']]], ['setmasklineargradient2',['setMaskLinearGradient2',['../class_lrc_demo.html#a7dc0574812a61f3e0bb5eebfd3e2ffcc',1,'LrcDemo']]], ['setmasklineargradient3',['setMaskLinearGradient3',['../class_lrc_demo.html#a9f7bc1df5f6de7fd4e7a3b107a7a3a35',1,'LrcDemo']]], ['setminmainwidgethotkeywork',['setMinMainWidgetHotkeyWork',['../class_global_hot_key.html#a2e9a1b2ee3f049121a0b35b7f7a1e902',1,'GlobalHotKey']]], ['setminmusiclrcactiontext',['setMinMusicLrcActionText',['../class_min_music_widget.html#ae976d8a3d784cce7c4c58ccdb2157e52',1,'MinMusicWidget']]], ['setmintotrayhotkey',['setMinToTrayHotKey',['../class_global_config.html#ac9b9e5f6a81c7b682cec10a1dcdbee83',1,'GlobalConfig']]], ['setmusicpath',['setMusicPath',['../class_global_config.html#ae840a0f9ff2707af1aef1ab14ee4f0bb',1,'GlobalConfig']]], ['setmute',['setMute',['../class_global_config.html#a939534ef6626673752202f3cbe06b2dc',1,'GlobalConfig']]], ['setnexthotkey',['setNextHotKey',['../class_global_config.html#ac9ab217ed35e341d3c23cdf9931758ff',1,'GlobalConfig']]], ['setnexthotkeywork',['setNextHotkeyWork',['../class_global_hot_key.html#afd87fa80768238a8d72f04193bd58318',1,'GlobalHotKey']]], ['setnoplayshang',['setNoPlayShang',['../class_global_config.html#a2e8f8c7fd29e73394ee4cf374377a6dc',1,'GlobalConfig']]], ['setnoplayxia',['setNoPlayXia',['../class_global_config.html#a311fc05adff7167c5319c1a1c91a2a41',1,'GlobalConfig']]], ['setnoplayzhong',['setNoPlayZhong',['../class_global_config.html#a0172c1dd5b0c760867eb47e98a3d2f8e',1,'GlobalConfig']]], ['setopenlistwidgethotkey',['setOpenListWidgetHotKey',['../class_global_config.html#a4e6f6d531efb025a72bce8dc3d9d7692',1,'GlobalConfig']]], ['setopenlrchotkey',['setOpenLrcHotKey',['../class_global_config.html#a95bad90491199b4a7c0c5546c1413fc3',1,'GlobalConfig']]], ['setopenmediawidgethotkey',['setOpenMediaWidgetHotKey',['../class_global_config.html#a6ea3fa3f66eadd3347e7d49148d6dbb7',1,'GlobalConfig']]], ['setopenminwidgethotkey',['setOpenMinWidgetHotKey',['../class_global_config.html#acabfd482ec2e4bfdfc41001d6d7d5c18',1,'GlobalConfig']]], ['setopenmusicfilehotkey',['setOpenMusicFileHotKey',['../class_global_config.html#a494cc0da52d8cd30658821b5b13d5045',1,'GlobalConfig']]], ['setopenmusicfilehotkeywork',['setOpenMusicfileHotkeyWork',['../class_global_hot_key.html#a56044f5695a24854e1867031972d90d8',1,'GlobalHotKey']]], ['setparams',['setParams',['../class_spectrograph.html#a7dc65ec5db7323500973cfccb65e1a33',1,'Spectrograph']]], ['setpausehotkey',['setPauseHotKey',['../class_global_config.html#a7a7f01246ff08e34c9cabcb1c7822f63',1,'GlobalConfig']]], ['setplayedshang',['setPlayedShang',['../class_global_config.html#a5974fe806433deb48e70c335f26ea9e3',1,'GlobalConfig']]], ['setplayedxia',['setPlayedXia',['../class_global_config.html#ad9af0089d855b396779a2e56a0c4c4e3',1,'GlobalConfig']]], ['setplayedzhong',['setPlayedZhong',['../class_global_config.html#a3005ea584a6193d7333cda5a7af3c910',1,'GlobalConfig']]], ['setplaymode',['setPlayMode',['../class_global_config.html#a69074fbc20b3ba94d6951b73c01b73ab',1,'GlobalConfig']]], ['setplaypausehotkeywork',['setPlayPauseHotkeyWork',['../class_global_hot_key.html#ac1810c5ac62226597fa16aafbebe8df7',1,'GlobalHotKey']]], ['setreleaseresource',['setReleaseResource',['../class_global_config.html#a9c3910cc6d1ae54771349a344829f27d',1,'GlobalConfig']]], ['setsettingshotkey',['setSettingsHotKey',['../class_global_config.html#a71b3128197ef1efd32d822ea277eaf68',1,'GlobalConfig']]], ['setshadow',['setShadow',['../class_global_config.html#adac275ef3135ea1f164a00aafce496e2',1,'GlobalConfig']]], ['setshowdownloadhotkeywork',['setShowDownloadHotkeyWork',['../class_global_hot_key.html#a99485ea33010765df811b3af1d2513e9',1,'GlobalHotKey']]], ['setshowhidemainwidgethotkeywork',['setShowHideMainWidgetHotkeyWork',['../class_global_hot_key.html#adb7137418dea05de09be6efea4b38042',1,'GlobalHotKey']]], ['setshowlrchotkeywork',['setShowLrcHotkeyWork',['../class_global_hot_key.html#a3327a5296328757033e8f091b28ceff0',1,'GlobalHotKey']]], ['setshowmusiclisthotkeywork',['setShowMusicListHotkeyWork',['../class_global_hot_key.html#a96a47e0cd5ed1414a1f31f2daa3bec3a',1,'GlobalHotKey']]], ['settime',['setTime',['../class_music_info_entity.html#ae78b87be54e88d63e7cf7c7d6187979b',1,'MusicInfoEntity::setTime()'],['../class_music_list_save_format_entity.html#aa20cfe728c87a079a6f4a0132b7d1b95',1,'MusicListSaveFormatEntity::setTime()']]], ['settingshotkey',['settingsHotKey',['../class_global_config.html#a85ffa47062f3ed166ed2cb3472e6c44e',1,'GlobalConfig']]], ['setvolume',['setVolume',['../class_global_config.html#ab181fd85899e30d076e3e4f579750190',1,'GlobalConfig::setVolume()'],['../class_sound_control.html#ab3e662d324b39b220b53f6ff6b78cef0',1,'SoundControl::setVolume()']]], ['setwork',['setWork',['../class_min_music_widget.html#aca7973ad9dde5ccdb36320f0aacf0a1e',1,'MinMusicWidget']]], ['shadow',['shadow',['../class_global_config.html#a081a43db772952e3286d41363431d38b',1,'GlobalConfig']]], ['shareddialog',['SharedDialog',['../class_shared_dialog.html#af704936a4ed890e01b7e6de494e37cf1',1,'SharedDialog']]], ['sigaddmusic',['sigAddMusic',['../class_load_music_thread_event.html#a894e64fed6cda32122461c103b183bb8',1,'LoadMusicThreadEvent']]], ['sigalbumdownloadstatus',['sigAlbumDownloadStatus',['../class_album_thread.html#add4e10a3b85e53390a473a060898d7c2',1,'AlbumThread']]], ['sigalbumpathchanged',['sigAlbumPathChanged',['../class_global_config.html#ad7a4e811bf237e1341960dcbbaa98ca8',1,'GlobalConfig']]], ['sigautogreetingschanged',['sigAutoGreetingsChanged',['../class_global_config.html#accf0c883729a1d3fb32cca44a13d1221',1,'GlobalConfig']]], ['sigautoplaymusicchanged',['sigAutoPlayMusicChanged',['../class_global_config.html#a1a8601e13d6402347c8aaa183c26f0f8',1,'GlobalConfig']]], ['sigautorunplayerchanged',['sigAutoRunPlayerChanged',['../class_global_config.html#a55d0de96656fb13acb5b3624f7368328',1,'GlobalConfig']]], ['sigconfigdialogclosed',['sigConfigDialogClosed',['../class_config_dialog.html#ab4e4059aa9a3b04c31915500c7434713',1,'ConfigDialog']]], ['sigdefaultchoicecolorchanged',['sigDefaultChoiceColorChanged',['../class_global_config.html#a2855044dd57ac841f4e0490f29eeddbb',1,'GlobalConfig']]], ['sigdefaultplayerchanged',['sigDefaultPlayerChanged',['../class_global_config.html#a5f263c1cd118fb553c8acce56d2389bf',1,'GlobalConfig']]], ['sigdownloadsettingschanged',['sigDownloadSettingsChanged',['../class_download_settings_page.html#a57b0fe7b6e858e9f5c468f7a472afc8d',1,'DownloadSettingsPage']]], ['sigedithotkeyfinished',['sigEditHotkeyFinished',['../class_edit_hotkey_dialog.html#af8de31de43d8b1ad73b0a20eb9ecd988',1,'EditHotkeyDialog']]], ['sigfontnamechanged',['sigFontNameChanged',['../class_global_config.html#a33d27cebf11578d8d97aa577fcbfdd7c',1,'GlobalConfig']]], ['sigfontsizechanged',['sigFontSizeChanged',['../class_global_config.html#a607985421d853f7e37305cb1c5503d66',1,'GlobalConfig']]], ['sigfonttypechanged',['sigFontTypeChanged',['../class_global_config.html#a1238a1ce340e18ef4fb62882061e8116',1,'GlobalConfig']]], ['siggeneralsettingschanged',['sigGeneralSettingsChanged',['../class_general_settings_page.html#a612a34b0dcdd35f1bf6e799df11b5f9f',1,'GeneralSettingsPage']]], ['sighidelrc',['sigHideLrc',['../class_music_lrc.html#afbb50fb027c3cdf17759917ab375c267',1,'MusicLrc']]], ['sighotkeyssettingschanged',['sigHotKeysSettingsChanged',['../class_hot_keys_settings_page.html#ab13d45baa7a6c542d21e4f2ea500c38b',1,'HotKeysSettingsPage']]], ['siglasthotkeychanged',['sigLastHotKeyChanged',['../class_global_config.html#a3db2121212cd65c622b989d1a8e02593',1,'GlobalConfig']]], ['sigloadmusiclisterror',['sigLoadMusicListError',['../class_load_music_thread_event.html#af52c0d91838427736db184671be0645d',1,'LoadMusicThreadEvent']]], ['sigloadmusiclistfinished',['sigLoadMusicListFinished',['../class_load_music_thread_event.html#a727f9bff9454063d034104a662f5d983',1,'LoadMusicThreadEvent']]], ['siglrcdownloadstatus',['sigLrcDownloadStatus',['../class_lrc_thread.html#a1e3145b47567e4e36a2ef4ab47756096',1,'LrcThread']]], ['siglrclocked',['sigLrcLocked',['../class_music_lrc.html#a24473c4893460c5cefa3a436fe97dcf9',1,'MusicLrc']]], ['siglrcpathchanged',['sigLrcPathChanged',['../class_global_config.html#ab6207cee51cb9aef5d7d65f0fe33e557',1,'GlobalConfig']]], ['siglrcsettingschanged',['sigLrcSettingsChanged',['../class_lrc_settings_page.html#a9db15d2685a05bb1d6e9749cce6a1b5d',1,'LrcSettingsPage']]], ['siglrcunlocked',['sigLrcUnlocked',['../class_music_lrc.html#afcb70601b2e42a03fd5316487cd7d53c',1,'MusicLrc']]], ['sigmintotrayhotkeychanged',['sigMinToTrayHotKeyChanged',['../class_global_config.html#acbe3eba91b664b01b823091f619aaa65',1,'GlobalConfig']]], ['sigmusicpathchanged',['sigMusicPathChanged',['../class_global_config.html#a18dabede42ac7bb98423fb59e98056f3',1,'GlobalConfig']]], ['sigmutechanged',['sigMuteChanged',['../class_global_config.html#aa314d5ffd21047546f2dfeba5bc1eac8',1,'GlobalConfig']]], ['signexthotkeychanged',['sigNextHotKeyChanged',['../class_global_config.html#ad917276bede36480430cfa31f7ce071c',1,'GlobalConfig']]], ['signoplayshangchanged',['sigNoPlayShangChanged',['../class_global_config.html#a956e66e7ce6e4cd9e234e7b9fa4caee0',1,'GlobalConfig']]], ['signoplayxiachanged',['sigNoPlayXiaChanged',['../class_global_config.html#a316e6d2e0628a77b0a6af59224109895',1,'GlobalConfig']]], ['signoplayzhongchanged',['sigNoPlayZhongChanged',['../class_global_config.html#a2c7b8cf25a59df246b4067eda600ce2b',1,'GlobalConfig']]], ['sigopenlistwidgethotkeychanged',['sigOpenListWidgetHotKeyChanged',['../class_global_config.html#a1d53f37c79eaaac982794acdfa384122',1,'GlobalConfig']]], ['sigopenlrchotkeychanged',['sigOpenLrcHotKeyChanged',['../class_global_config.html#adab25f897dfa9be078560368f259db43',1,'GlobalConfig']]], ['sigopenmediawidgethotkeychanged',['sigOpenMediaWidgetHotKeyChanged',['../class_global_config.html#a240146181e41da41263cbb9de373a70c',1,'GlobalConfig']]], ['sigopenminwidgethotkeychanged',['sigOpenMinWidgetHotKeyChanged',['../class_global_config.html#a3dcfe49635d163f670fdbcf8fa36e089',1,'GlobalConfig']]], ['sigopenmusicfilehotkeychanged',['sigOpenMusicFileHotKeyChanged',['../class_global_config.html#a33335b831320a53ec48820f44becc8e4',1,'GlobalConfig']]], ['sigpausehotkeychanged',['sigPauseHotKeyChanged',['../class_global_config.html#ae3328f7362c6f1b2099e53b75b64e8bb',1,'GlobalConfig']]], ['sigplayedshangchanged',['sigPlayedShangChanged',['../class_global_config.html#a0f8f1d2ba7e0beb075b04fa2776d5583',1,'GlobalConfig']]], ['sigplayedxiachanged',['sigPlayedXiaChanged',['../class_global_config.html#ac65d8d451c72e44fa2be0012845ed86c',1,'GlobalConfig']]], ['sigplayedzhongchanged',['sigPlayedZhongChanged',['../class_global_config.html#a68b194d8fdcce82ac9dc707dbd525192',1,'GlobalConfig']]], ['sigplaylistcleanfinshed',['sigPlayListCleanFinshed',['../class_music_list.html#ac3bf69245aba294af6aca364d4ce1ba2',1,'MusicList']]], ['sigplaymodechanged',['sigPlayModeChanged',['../class_global_config.html#aae74bbe090d7dc5a087846da070f5ce0',1,'GlobalConfig']]], ['sigrowselected',['sigRowSelected',['../class_music_list.html#add20d03c2b799647aed83bd73ccb33ba',1,'MusicList']]], ['sigsettingshotkeychanged',['sigSettingsHotKeyChanged',['../class_global_config.html#a86e76aeb2256d5cbfe307786fa99a8b6',1,'GlobalConfig']]], ['sigshadowchanged',['sigShadowChanged',['../class_global_config.html#ab21d9e2a37e27bc6672b669405ebf9ba',1,'GlobalConfig']]], ['sigsharedcurrentmusic',['sigSharedCurrentMusic',['../class_music_list.html#adac1dcf99c3a3227052352b95e89169b',1,'MusicList']]], ['sigshowmainwidget',['sigShowMainWidget',['../class_main_widget.html#a57b61798e8f1f7e0501bfea154683ec2',1,'MainWidget']]], ['sigshowmusicpanel',['sigShowMusicPanel',['../class_min_music_widget.html#ad0eff7fdcbaec1494ce421356b33c7af',1,'MinMusicWidget']]], ['sigspectrumchanged',['sigSpectrumChanged',['../class_main_widget.html#aa48e6edcfe29974ab0e2814e21a47a3d',1,'MainWidget']]], ['sigstartloadmusic',['sigStartloadMusic',['../class_main_widget.html#a7a47666da4545155ac66fb7fc97084a7',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#a87683d7994ce646808e67e83765a57e7',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#afe405fe390e7ae8c0768e43bb5eeaf1b',1,'MainWidget::sigStartloadMusic()'],['../class_main_widget.html#a1d5c815e8149a0127f618b83fea987fe',1,'MainWidget::sigStartloadMusic()']]], ['sigvolumechanged',['sigVolumeChanged',['../class_global_config.html#afbc424e3c72c0ff0267cb41fd7993439',1,'GlobalConfig']]], ['spectrograph',['Spectrograph',['../class_spectrograph.html#a78e8bcc58d3f3af6763be21b8ace52ea',1,'Spectrograph']]], ['start',['Start',['../class_c_basic_player.html#a923965049cd93edc1f6a1e8949366046',1,'CBasicPlayer']]], ['startlrcmask',['startLrcMask',['../class_music_lrc.html#a945e08a0a944c66b722bbd75450e65ee',1,'MusicLrc']]], ['stop',['Stop',['../class_c_basic_player.html#a18edbe2cd19fcdf54f6a8693e5ca9933',1,'CBasicPlayer']]], ['stoplrcmask',['stopLrcMask',['../class_music_lrc.html#a58fabf435d2338edbcedff96bb1d15f1',1,'MusicLrc']]] ]; ================================================ FILE: doc/search/functions_f.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/functions_f.js ================================================ var searchData= [ ['thankspage',['ThanksPage',['../class_thanks_page.html#a67196e0c510047a6469162de13343fc5',1,'ThanksPage']]], ['time',['time',['../class_music_info_entity.html#a631ab170b6da4911e2368fe5f2547574',1,'MusicInfoEntity::time()'],['../class_music_list_save_format_entity.html#af36af6b3459cd91001e21b63a740ffc0',1,'MusicListSaveFormatEntity::time()']]] ]; ================================================ FILE: doc/search/nomatches.html ================================================
未找到
================================================ FILE: doc/search/search.css ================================================ /*---------------- Search Box */ #FSearchBox { float: left; } #MSearchBox { white-space : nowrap; position: absolute; float: none; display: inline; margin-top: 8px; right: 0px; width: 170px; z-index: 102; background-color: white; } #MSearchBox .left { display:block; position:absolute; left:10px; width:20px; height:19px; background:url('search_l.png') no-repeat; background-position:right; } #MSearchSelect { display:block; position:absolute; width:20px; height:19px; } .left #MSearchSelect { left:4px; } .right #MSearchSelect { right:5px; } #MSearchField { display:block; position:absolute; height:19px; background:url('search_m.png') repeat-x; border:none; width:111px; margin-left:20px; padding-left:4px; color: #909090; outline: none; font: 9pt Arial, Verdana, sans-serif; } #FSearchBox #MSearchField { margin-left:15px; } #MSearchBox .right { display:block; position:absolute; right:10px; top:0px; width:20px; height:19px; background:url('search_r.png') no-repeat; background-position:left; } #MSearchClose { display: none; position: absolute; top: 4px; background : none; border: none; margin: 0px 4px 0px 0px; padding: 0px 0px; outline: none; } .left #MSearchClose { left: 6px; } .right #MSearchClose { right: 2px; } .MSearchBoxActive #MSearchField { color: #000000; } /*---------------- Search filter selection */ #MSearchSelectWindow { display: none; position: absolute; left: 0; top: 0; border: 1px solid #B7B86E; background-color: #FBFBF7; z-index: 1; padding-top: 4px; padding-bottom: 4px; -moz-border-radius: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } .SelectItem { font: 8pt Arial, Verdana, sans-serif; padding-left: 2px; padding-right: 12px; border: 0px; } span.SelectionMark { margin-right: 4px; font-family: monospace; outline-style: none; text-decoration: none; } a.SelectItem { display: block; outline-style: none; color: #000000; text-decoration: none; padding-left: 6px; padding-right: 12px; } a.SelectItem:focus, a.SelectItem:active { color: #000000; outline-style: none; text-decoration: none; } a.SelectItem:hover { color: #FFFFFF; background-color: #57582B; outline-style: none; text-decoration: none; cursor: pointer; display: block; } /*---------------- Search results window */ iframe#MSearchResults { width: 60ex; height: 15em; } #MSearchResultsWindow { display: none; position: absolute; left: 0; top: 0; border: 1px solid #000; background-color: #F3F3E7; } /* ----------------------------------- */ #SRIndex { clear:both; padding-bottom: 15px; } .SREntry { font-size: 10pt; padding-left: 1ex; } .SRPage .SREntry { font-size: 8pt; padding: 1px 5px; } body.SRPage { margin: 5px 2px; } .SRChildren { padding-left: 3ex; padding-bottom: .5em } .SRPage .SRChildren { display: none; } .SRSymbol { font-weight: bold; color: #616230; font-family: Arial, Verdana, sans-serif; text-decoration: none; outline: none; } a.SRScope { display: block; color: #616230; font-family: Arial, Verdana, sans-serif; text-decoration: none; outline: none; } a.SRSymbol:focus, a.SRSymbol:active, a.SRScope:focus, a.SRScope:active { text-decoration: underline; } span.SRScope { padding-left: 4px; } .SRPage .SRStatus { padding: 2px 5px; font-size: 8pt; font-style: italic; } .SRResult { display: none; } DIV.searchresults { margin-left: 10px; margin-right: 10px; } /*---------------- External search page results */ .searchresult { background-color: #F4F5EA; } .pages b { color: white; padding: 5px 5px 3px 5px; background-image: url("../tab_a.png"); background-repeat: repeat-x; text-shadow: 0 1px 1px #000000; } .pages { line-height: 17px; margin-left: 4px; text-decoration: none; } .hl { font-weight: bold; } #searchresults { margin-bottom: 20px; } .searchpages { margin-top: 10px; } ================================================ FILE: doc/search/search.js ================================================ // Search script generated by doxygen // Copyright (C) 2009 by Dimitri van Heesch. // The code in this file is loosly based on main.js, part of Natural Docs, // which is Copyright (C) 2003-2008 Greg Valure // Natural Docs is licensed under the GPL. var indexSectionsWithContent = { 0: "_abcdefghilmnopqrstuvwx~", 1: "_acdeghlmnrstuwx", 2: "abcdeghlmrstu", 3: "acdefghilmnoprstuv~", 4: "_admqrs", 5: "al", 6: "al", 7: "abcdeghlmrstu" }; var indexSectionNames = { 0: "all", 1: "classes", 2: "files", 3: "functions", 4: "variables", 5: "enums", 6: "enumvalues", 7: "defines" }; function convertToId(search) { var result = ''; for (i=0;i do a search { this.Search(); } } this.OnSearchSelectKey = function(evt) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==40 && this.searchIndex0) // Up { this.searchIndex--; this.OnSelectItem(this.searchIndex); } else if (e.keyCode==13 || e.keyCode==27) { this.OnSelectItem(this.searchIndex); this.CloseSelectionWindow(); this.DOMSearchField().focus(); } return false; } // --------- Actions // Closes the results window. this.CloseResultsWindow = function() { this.DOMPopupSearchResultsWindow().style.display = 'none'; this.DOMSearchClose().style.display = 'none'; this.Activate(false); } this.CloseSelectionWindow = function() { this.DOMSearchSelectWindow().style.display = 'none'; } // Performs a search. this.Search = function() { this.keyTimeout = 0; // strip leading whitespace var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); var code = searchValue.toLowerCase().charCodeAt(0); var idxChar = searchValue.substr(0, 1).toLowerCase(); if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair { idxChar = searchValue.substr(0, 2); } var resultsPage; var resultsPageWithSearch; var hasResultsPage; var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); if (idx!=-1) { var hexCode=idx.toString(16); resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; } else // nothing available for this search term { resultsPage = this.resultsPath + '/nomatches.html'; resultsPageWithSearch = resultsPage; hasResultsPage = false; } window.frames.MSearchResults.location = resultsPageWithSearch; var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); if (domPopupSearchResultsWindow.style.display!='block') { var domSearchBox = this.DOMSearchBox(); this.DOMSearchClose().style.display = 'inline'; if (this.insideFrame) { var domPopupSearchResults = this.DOMPopupSearchResults(); domPopupSearchResultsWindow.style.position = 'relative'; domPopupSearchResultsWindow.style.display = 'block'; var width = document.body.clientWidth - 8; // the -8 is for IE :-( domPopupSearchResultsWindow.style.width = width + 'px'; domPopupSearchResults.style.width = width + 'px'; } else { var domPopupSearchResults = this.DOMPopupSearchResults(); var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; domPopupSearchResultsWindow.style.display = 'block'; left -= domPopupSearchResults.offsetWidth; domPopupSearchResultsWindow.style.top = top + 'px'; domPopupSearchResultsWindow.style.left = left + 'px'; } } this.lastSearchValue = searchValue; this.lastResultsPage = resultsPage; } // -------- Activation Functions // Activates or deactivates the search panel, resetting things to // their default values if necessary. this.Activate = function(isActive) { if (isActive || // open it this.DOMPopupSearchResultsWindow().style.display == 'block' ) { this.DOMSearchBox().className = 'MSearchBoxActive'; var searchField = this.DOMSearchField(); if (searchField.value == this.searchLabel) // clear "Search" term upon entry { searchField.value = ''; this.searchActive = true; } } else if (!isActive) // directly remove the panel { this.DOMSearchBox().className = 'MSearchBoxInactive'; this.DOMSearchField().value = this.searchLabel; this.searchActive = false; this.lastSearchValue = '' this.lastResultsPage = ''; } } } // ----------------------------------------------------------------------- // The class that handles everything on the search results page. function SearchResults(name) { // The number of matches from the last run of . this.lastMatchCount = 0; this.lastKey = 0; this.repeatOn = false; // Toggles the visibility of the passed element ID. this.FindChildElement = function(id) { var parentElement = document.getElementById(id); var element = parentElement.firstChild; while (element && element!=parentElement) { if (element.nodeName == 'DIV' && element.className == 'SRChildren') { return element; } if (element.nodeName == 'DIV' && element.hasChildNodes()) { element = element.firstChild; } else if (element.nextSibling) { element = element.nextSibling; } else { do { element = element.parentNode; } while (element && element!=parentElement && !element.nextSibling); if (element && element!=parentElement) { element = element.nextSibling; } } } } this.Toggle = function(id) { var element = this.FindChildElement(id); if (element) { if (element.style.display == 'block') { element.style.display = 'none'; } else { element.style.display = 'block'; } } } // Searches for the passed string. If there is no parameter, // it takes it from the URL query. // // Always returns true, since other documents may try to call it // and that may or may not be possible. this.Search = function(search) { if (!search) // get search word from URL { search = window.location.search; search = search.substring(1); // Remove the leading '?' search = unescape(search); } search = search.replace(/^ +/, ""); // strip leading spaces search = search.replace(/ +$/, ""); // strip trailing spaces search = search.toLowerCase(); search = convertToId(search); var resultRows = document.getElementsByTagName("div"); var matches = 0; var i = 0; while (i < resultRows.length) { var row = resultRows.item(i); if (row.className == "SRResult") { var rowMatchName = row.id.toLowerCase(); rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' if (search.length<=rowMatchName.length && rowMatchName.substr(0, search.length)==search) { row.style.display = 'block'; matches++; } else { row.style.display = 'none'; } } i++; } document.getElementById("Searching").style.display='none'; if (matches == 0) // no results { document.getElementById("NoMatches").style.display='block'; } else // at least one result { document.getElementById("NoMatches").style.display='none'; } this.lastMatchCount = matches; return true; } // return the first item with index index or higher that is visible this.NavNext = function(index) { var focusItem; while (1) { var focusName = 'Item'+index; focusItem = document.getElementById(focusName); if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { break; } else if (!focusItem) // last element { break; } focusItem=null; index++; } return focusItem; } this.NavPrev = function(index) { var focusItem; while (1) { var focusName = 'Item'+index; focusItem = document.getElementById(focusName); if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { break; } else if (!focusItem) // last element { break; } focusItem=null; index--; } return focusItem; } this.ProcessKeys = function(e) { if (e.type == "keydown") { this.repeatOn = false; this.lastKey = e.keyCode; } else if (e.type == "keypress") { if (!this.repeatOn) { if (this.lastKey) this.repeatOn = true; return false; // ignore first keypress after keydown } } else if (e.type == "keyup") { this.lastKey = 0; this.repeatOn = false; } return this.lastKey!=0; } this.Nav = function(evt,itemIndex) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==13) return true; if (!this.ProcessKeys(e)) return false; if (this.lastKey==38) // Up { var newIndex = itemIndex-1; var focusItem = this.NavPrev(newIndex); if (focusItem) { var child = this.FindChildElement(focusItem.parentNode.parentNode.id); if (child && child.style.display == 'block') // children visible { var n=0; var tmpElem; while (1) // search for last child { tmpElem = document.getElementById('Item'+newIndex+'_c'+n); if (tmpElem) { focusItem = tmpElem; } else // found it! { break; } n++; } } } if (focusItem) { focusItem.focus(); } else // return focus to search field { parent.document.getElementById("MSearchField").focus(); } } else if (this.lastKey==40) // Down { var newIndex = itemIndex+1; var focusItem; var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem && elem.style.display == 'block') // children visible { focusItem = document.getElementById('Item'+itemIndex+'_c0'); } if (!focusItem) focusItem = this.NavNext(newIndex); if (focusItem) focusItem.focus(); } else if (this.lastKey==39) // Right { var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem) elem.style.display = 'block'; } else if (this.lastKey==37) // Left { var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem) elem.style.display = 'none'; } else if (this.lastKey==27) // Escape { parent.searchBox.CloseResultsWindow(); parent.document.getElementById("MSearchField").focus(); } else if (this.lastKey==13) // Enter { return true; } return false; } this.NavChild = function(evt,itemIndex,childIndex) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==13) return true; if (!this.ProcessKeys(e)) return false; if (this.lastKey==38) // Up { if (childIndex>0) { var newIndex = childIndex-1; document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); } else // already at first child, jump to parent { document.getElementById('Item'+itemIndex).focus(); } } else if (this.lastKey==40) // Down { var newIndex = childIndex+1; var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); if (!elem) // last child, jump to parent next parent { elem = this.NavNext(itemIndex+1); } if (elem) { elem.focus(); } } else if (this.lastKey==27) // Escape { parent.searchBox.CloseResultsWindow(); parent.document.getElementById("MSearchField").focus(); } else if (this.lastKey==13) // Enter { return true; } return false; } } function setKeyActions(elem,action) { elem.setAttribute('onkeydown',action); elem.setAttribute('onkeypress',action); elem.setAttribute('onkeyup',action); } function setClassAttr(elem,attr) { elem.setAttribute('class',attr); elem.setAttribute('className',attr); } function createResults() { var results = document.getElementById("SRResults"); for (var e=0; e
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_0.js ================================================ var searchData= [ ['_5f_5fpad0_5f_5f',['__pad0__',['../class_c_basic_player.html#a9eb7fecf4500b14f50ec4f5f11f3e7ae',1,'CBasicPlayer']]] ]; ================================================ FILE: doc/search/variables_1.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_1.js ================================================ var searchData= [ ['appname',['AppName',['../main_8cpp.html#a792d7cf52c15cc2ff95897c5bd199acc',1,'main.cpp']]] ]; ================================================ FILE: doc/search/variables_2.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_2.js ================================================ var searchData= [ ['dbfile',['DBFile',['../_d_b_module_8cpp.html#aa2b0b84f8f4e50449243b8d236f02e83',1,'DBModule.cpp']]], ['dbtype',['DBType',['../_d_b_module_8cpp.html#a58987fc8480ef06331f46f6dca63dda7',1,'DBModule.cpp']]] ]; ================================================ FILE: doc/search/variables_3.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_3.js ================================================ var searchData= [ ['m_5flabel',['m_label',['../class_about_page.html#a63010ae179f12759c10ac63cbf0fa489',1,'AboutPage']]], ['m_5fthankslabel',['m_thanksLabel',['../class_thanks_page.html#ae2ce11b642888b534b95fce62380f554',1,'ThanksPage']]] ]; ================================================ FILE: doc/search/variables_4.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_4.js ================================================ var searchData= [ ['qssfilepath',['QssFilePath',['../main_8cpp.html#af11f31f1c1959d5da35dd927058c9fff',1,'main.cpp']]] ]; ================================================ FILE: doc/search/variables_5.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_5.js ================================================ var searchData= [ ['radius',['Radius',['../_min_music_widget_8cpp.html#a75ae4b75ad7e6bee6ce567640301a42e',1,'MinMusicWidget.cpp']]] ]; ================================================ FILE: doc/search/variables_6.html ================================================
载入中...
搜索中...
未找到
================================================ FILE: doc/search/variables_6.js ================================================ var searchData= [ ['sigfinished',['sigFinished',['../class_c_basic_player.html#a08a5907c92c6e20007494ac965e4fccb',1,'CBasicPlayer']]] ]; ================================================ FILE: doc/signal__slot_8h_source.html ================================================ CZPlayer: signal_slot.h 源文件
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
signal_slot.h
1 #ifndef SIGNAL_handleH
2 #define SIGNAL_handleH
3 
9 #include <vector>
10 #define c_emit
11 #define c_slots
12 #define c_signals public
13 #define c_connect(sender, signal, receiver, slot) ((sender) ->signal.Bind(receiver, slot))
14 
16 
19 class SlotBase
20 {
21 public:
22  virtual ~SlotBase() {}
23  virtual void exec() = 0;
24 };
25 
29 template<class T>
30 class SlotImpl : public SlotBase
31 {
32 public:
33  SlotImpl(T *pObj, void (T::*func)())
34  {
35  m_pObj = pObj;
36  m_Func = func;
37  }
38 
39  void exec()
40  {
41  (m_pObj ->*m_Func)();
42  }
43 
44 private:
45  T *m_pObj;
46  void (T::*m_Func)();
47 };
48 
52 class Slot
53 {
54 public:
55  template<class T>
56  Slot(T *pObj, void (T::*func)())
57  {
58  m_pSlotBase = new SlotImpl<T>(pObj, func);
59  }
60 
61  ~Slot()
62  {
63  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
64  }
65 
66  void exec()
67  {
68  m_pSlotBase ->exec();
69  }
70 
71 private:
72  SlotBase *m_pSlotBase;
73 };
74 
78 class Signal
79 {
80 public:
81  template<class T>
82  void Bind(T *pObj, void (T::*func)())
83  {
84  m_pSlotVec.push_back(new Slot(pObj, func));
85  }
86 
87  ~Signal()
88  {
89  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
90  {
91  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
92  }
93  }
94 
95  void operator()()
96  {
97  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
98  {
99  m_pSlotVec[i] ->exec();
100  }
101  }
102 
103 private:
104  std::vector< Slot* > m_pSlotVec;
105 };
106 
108 
111 template<class T1>
113 {
114 public:
115  virtual ~SlotBase1() {}
116  virtual void exec(T1 t1) = 0;
117 };
118 
122 template<class T, class T1>
123 class SlotImpl1 : public SlotBase1<T1>
124 {
125 public:
126  SlotImpl1(T *pObj, void (T::*func)(T1))
127  {
128  m_pObj = pObj;
129  m_Func = func;
130  }
131 
132  void exec(T1 t1)
133  {
134  (m_pObj ->*m_Func)(t1);
135  }
136 
137 private:
138  T *m_pObj;
139  void (T::*m_Func)(T1);
140 };
141 
145 template<class T1>
146 class Slot1
147 {
148 public:
149  template<class T>
150  Slot1(T *pObj, void (T::*func)(T1))
151  {
152  m_pSlotBase = new SlotImpl1<T, T1>(pObj, func);
153  }
154 
155  ~Slot1()
156  {
157  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
158  }
159 
160  void exec(T1 t1)
161  {
162  m_pSlotBase ->exec(t1);
163  }
164 
165 private:
166  SlotBase1<T1> *m_pSlotBase;
167 };
168 
172 template<class T1>
173 class Signal1
174 {
175 public:
176  template<class T>
177  void Bind(T *pObj, void (T::*func)(T1))
178  {
179  m_pSlotVec.push_back(new Slot1<T1>(pObj, func));
180  }
181 
182  ~Signal1()
183  {
184  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
185  {
186  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
187  }
188  }
189 
190  void operator()(T1 t1)
191  {
192  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
193  {
194  m_pSlotVec[i] ->exec(t1);
195  }
196  }
197 
198 private:
199  std::vector< Slot1<T1>* > m_pSlotVec;
200 };
201 
203 
206 template<class T1, class T2>
208 {
209 public:
210  virtual ~SlotBase2() {}
211  virtual void exec(T1 t1, T2 t2) = 0;
212 };
213 
217 template<class T, class T1, class T2>
218 class SlotImpl2 : public SlotBase2<T1, T2>
219 {
220 public:
221  SlotImpl2(T *pObj, void (T::*func)(T1, T2))
222  {
223  m_pObj = pObj;
224  m_Func = func;
225  }
226 
227  void exec(T1 t1, T2 t2)
228  {
229  (m_pObj ->*m_Func)(t1, t2);
230  }
231 
232 private:
233  T *m_pObj;
234  void (T::*m_Func)(T1, T2);
235 };
236 
240 template<class T1, class T2>
241 class Slot2
242 {
243 public:
244  template<class T>
245  Slot2(T *pObj, void (T::*func)(T1, T2))
246  {
247  m_pSlotBase = new SlotImpl2<T, T1, T2>(pObj, func);
248  }
249 
250  ~Slot2()
251  {
252  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
253  }
254 
255  void exec(T1 t1, T2 t2)
256  {
257  m_pSlotBase ->exec(t1, t2);
258  }
259 
260 private:
261  SlotBase2<T1, T2> *m_pSlotBase;
262 };
263 
267 template<class T1, class T2>
268 class Signal2
269 {
270 public:
271  template<class T>
272  void Bind(T *pObj, void (T::*func)(T1, T2))
273  {
274  m_pSlotVec.push_back(new Slot2<T1, T2>(pObj, func));
275  }
276 
277  ~Signal2()
278  {
279  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
280  {
281  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
282  }
283  }
284 
285  void operator()(T1 t1, T2 t2)
286  {
287  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
288  {
289  m_pSlotVec[i] ->exec(t1, t2);
290  }
291  }
292 
293 private:
294  std::vector< Slot2<T1, T2>* > m_pSlotVec;
295 };
296 
298 
301 template<class T1, class T2, class T3>
303 {
304 public:
305  virtual ~SlotBase3() {}
306  virtual void exec(T1 t1, T2 t2, T3 t3) = 0;
307 };
308 
312 template<class T, class T1, class T2, class T3>
313 class SlotImpl3 : public SlotBase3<T1, T2, T3>
314 {
315 public:
316  SlotImpl3(T *pObj, void (T::*func)(T1, T2, T3))
317  {
318  m_pObj = pObj;
319  m_Func = func;
320  }
321 
322  void exec(T1 t1, T2 t2, T3 t3)
323  {
324  (m_pObj ->*m_Func)(t1, t2, t3);
325  }
326 
327 private:
328  T *m_pObj;
329  void (T::*m_Func)(T1, T2, T3);
330 };
331 
335 template<class T1, class T2, class T3>
336 class Slot3
337 {
338 public:
339  template<class T>
340  Slot3(T *pObj, void (T::*func)(T1, T2, T3))
341  {
342  m_pSlotBase = new SlotImpl3<T, T1, T2, T3>(pObj, func);
343  }
344 
345  ~Slot3()
346  {
347  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
348  }
349 
350  void exec(T1 t1, T2 t2, T3 t3)
351  {
352  m_pSlotBase ->exec(t1, t2, t3);
353  }
354 
355 private:
356  SlotBase3<T1, T2, T3> *m_pSlotBase;
357 };
358 
362 template<class T1, class T2, class T3>
363 class Signal3
364 {
365 public:
366  template<class T>
367  void Bind(T *pObj, void (T::*func)(T1, T2, T3))
368  {
369  m_pSlotVec.push_back(new Slot3<T1, T2, T3>(pObj, func));
370  }
371 
372  ~Signal3()
373  {
374  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
375  {
376  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
377  }
378  }
379 
380  void operator()(T1 t1, T2 t2, T3 t3)
381  {
382  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
383  {
384  m_pSlotVec[i] ->exec(t1, t2, t3);
385  }
386  }
387 
388 private:
389  std::vector< Slot3<T1, T2, T3>* > m_pSlotVec;
390 };
391 
393 
396 template<class T1, class T2, class T3, class T4>
398 {
399 public:
400  virtual ~SlotBase4() {}
401  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4) = 0;
402 };
403 
407 template<class T, class T1, class T2, class T3, class T4>
408 class SlotImpl4 : public SlotBase4<T1, T2, T3, T4>
409 {
410 public:
411  SlotImpl4(T *pObj, void (T::*func)(T1, T2, T3, T4))
412  {
413  m_pObj = pObj;
414  m_Func = func;
415  }
416 
417  void exec(T1 t1, T2 t2, T3 t3, T4 t4)
418  {
419  (m_pObj ->*m_Func)(t1, t2, t3, t4);
420  }
421 
422 private:
423  T *m_pObj;
424  void (T::*m_Func)(T1, T2, T3, T4);
425 };
426 
430 template<class T1, class T2, class T3, class T4>
431 class Slot4
432 {
433 public:
434  template<class T>
435  Slot4(T *pObj, void (T::*func)(T1, T2, T3, T4))
436  {
437  m_pSlotBase = new SlotImpl4<T, T1, T2, T3, T4>(pObj, func);
438  }
439 
440  ~Slot4()
441  {
442  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
443  }
444 
445  void exec(T1 t1, T2 t2, T3 t3, T4 t4)
446  {
447  m_pSlotBase ->exec(t1, t2, t3, t4);
448  }
449 
450 private:
451  SlotBase4<T1, T2, T3, T4> *m_pSlotBase;
452 };
453 
457 template<class T1, class T2, class T3, class T4>
458 class Signal4
459 {
460 public:
461  template<class T>
462  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4))
463  {
464  m_pSlotVec.push_back(new Slot4<T1, T2, T3, T4>(pObj, func));
465  }
466 
467  ~Signal4()
468  {
469  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
470  {
471  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
472  }
473  }
474 
475  void operator()(T1 t1, T2 t2, T3 t3, T4 t4)
476  {
477  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
478  {
479  m_pSlotVec[i] ->exec(t1, t2, t3, t4);
480  }
481  }
482 
483 private:
484  std::vector< Slot4<T1, T2, T3, T4>* > m_pSlotVec;
485 };
486 
488 
491 template<class T1, class T2, class T3, class T4, class T5>
493 {
494 public:
495  virtual ~SlotBase5() {}
496  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) = 0;
497 };
498 
502 template<class T, class T1, class T2, class T3, class T4, class T5>
503 class SlotImpl5 : public SlotBase5<T1, T2, T3, T4, T5>
504 {
505 public:
506  SlotImpl5(T *pObj, void (T::*func)(T1, T2, T3, T4, T5))
507  {
508  m_pObj = pObj;
509  m_Func = func;
510  }
511 
512  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
513  {
514  (m_pObj ->*m_Func)(t1, t2, t3, t4, t5);
515  }
516 
517 private:
518  T *m_pObj;
519  void (T::*m_Func)(T1, T2, T3, T4, T5);
520 };
521 
525 template<class T1, class T2, class T3, class T4, class T5>
526 class Slot5
527 {
528 public:
529  template<class T>
530  Slot5(T *pObj, void (T::*func)(T1, T2, T3, T4, T5))
531  {
532  m_pSlotBase = new SlotImpl5<T, T1, T2, T3, T4, T5>(pObj, func);
533  }
534 
535  ~Slot5()
536  {
537  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
538  }
539 
540  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
541  {
542  m_pSlotBase ->exec(t1, t2, t3, t4, t5);
543  }
544 
545 private:
546  SlotBase5<T1, T2, T3, T4, T5> *m_pSlotBase;
547 };
548 
552 template<class T1, class T2, class T3, class T4, class T5>
553 class Signal5
554 {
555 public:
556  template<class T>
557  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5))
558  {
559  m_pSlotVec.push_back(new Slot5<T1, T2, T3, T4, T5>(pObj, func));
560  }
561 
562  ~Signal5()
563  {
564  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
565  {
566  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
567  }
568  }
569 
570  void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
571  {
572  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
573  {
574  m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5);
575  }
576  }
577 
578 private:
579  std::vector< Slot5<T1, T2, T3, T4, T5>* > m_pSlotVec;
580 };
581 
583 
586 template<class T1, class T2, class T3, class T4, class T5, class T6>
588 {
589 public:
590  virtual ~SlotBase6() {}
591  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) = 0;
592 };
593 
597 template<class T, class T1, class T2, class T3, class T4, class T5, class T6>
598 class SlotImpl6 : public SlotBase6<T1, T2, T3, T4, T5, T6>
599 {
600 public:
601  SlotImpl6(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6))
602  {
603  m_pObj = pObj;
604  m_Func = func;
605  }
606 
607  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
608  {
609  (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6);
610  }
611 
612 private:
613  T *m_pObj;
614  void (T::*m_Func)(T1, T2, T3, T4, T5, T6);
615 };
616 
620 template<class T1, class T2, class T3, class T4, class T5, class T6>
621 class Slot6
622 {
623 public:
624  template<class T>
625  Slot6(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6))
626  {
627  m_pSlotBase = new SlotImpl6<T, T1, T2, T3, T4, T5, T6>(pObj, func);
628  }
629 
630  ~Slot6()
631  {
632  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
633  }
634 
635  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
636  {
637  m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6);
638  }
639 
640 private:
642 };
643 
647 template<class T1, class T2, class T3, class T4, class T5, class T6>
648 class Signal6
649 {
650 public:
651  template<class T>
652  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6))
653  {
654  m_pSlotVec.push_back(new Slot6<T1, T2, T3, T4, T5, T6>(pObj, func));
655  }
656 
657  ~Signal6()
658  {
659  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
660  {
661  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
662  }
663  }
664 
665  void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
666  {
667  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
668  {
669  m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6);
670  }
671  }
672 
673 private:
674  std::vector< Slot6<T1, T2, T3, T4, T5, T6>* > m_pSlotVec;
675 };
676 
678 
681 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
683 {
684 public:
685  virtual ~SlotBase7() {}
686  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) = 0;
687 };
688 
692 template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
693 class SlotImpl7 : public SlotBase7<T1, T2, T3, T4, T5, T6, T7>
694 {
695 public:
696  SlotImpl7(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7))
697  {
698  m_pObj = pObj;
699  m_Func = func;
700  }
701 
702  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
703  {
704  (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7);
705  }
706 
707 private:
708  T *m_pObj;
709  void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7);
710 };
711 
715 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
716 class Slot7
717 {
718 public:
719  template<class T>
720  Slot7(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7))
721  {
722  m_pSlotBase = new SlotImpl7<T, T1, T2, T3, T4, T5, T6, T7>(pObj, func);
723  }
724 
725  ~Slot7()
726  {
727  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
728  }
729 
730  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
731  {
732  m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7);
733  }
734 
735 private:
737 };
738 
742 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
743 class Signal7
744 {
745 public:
746  template<class T>
747  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7))
748  {
749  m_pSlotVec.push_back(new Slot7<T1, T2, T3, T4, T5, T6, T7>(pObj, func));
750  }
751 
752  ~Signal7()
753  {
754  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
755  {
756  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
757  }
758  }
759 
760  void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
761  {
762  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
763  {
764  m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7);
765  }
766  }
767 
768 private:
769  std::vector< Slot7<T1, T2, T3, T4, T5, T6, T7>* > m_pSlotVec;
770 };
771 
773 
776 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
778 {
779 public:
780  virtual ~SlotBase8() {}
781  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) = 0;
782 };
783 
787 template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
788 class SlotImpl8 : public SlotBase8<T1, T2, T3, T4, T5, T6, T7, T8>
789 {
790 public:
791  SlotImpl8(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
792  {
793  m_pObj = pObj;
794  m_Func = func;
795  }
796 
797  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
798  {
799  (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7, t8);
800  }
801 
802 private:
803  T *m_pObj;
804  void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7, T8);
805 };
806 
810 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
811 class Slot8
812 {
813 public:
814  template<class T>
815  Slot8(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
816  {
817  m_pSlotBase = new SlotImpl8<T, T1, T2, T3, T4, T5, T6, T7, T8>(pObj, func);
818  }
819 
820  ~Slot8()
821  {
822  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
823  }
824 
825  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
826  {
827  m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7, t8);
828  }
829 
830 private:
832 };
833 
837 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
838 class Signal8
839 {
840 public:
841  template<class T>
842  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8))
843  {
844  m_pSlotVec.push_back(new Slot8<T1, T2, T3, T4, T5, T6, T7, T8>(pObj, func));
845  }
846 
847  ~Signal8()
848  {
849  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
850  {
851  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
852  }
853  }
854 
855  void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
856  {
857  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
858  {
859  m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7, t8);
860  }
861  }
862 
863 private:
864  std::vector< Slot8<T1, T2, T3, T4, T5, T6, T7, T8>* > m_pSlotVec;
865 };
866 
868 
871 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
873 {
874 public:
875  virtual ~SlotBase9() {}
876  virtual void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) = 0;
877 };
878 
882 template<class T, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
883 class SlotImpl9 : public SlotBase9<T1, T2, T3, T4, T5, T6, T7, T8, T9>
884 {
885 public:
886  SlotImpl9(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
887  {
888  m_pObj = pObj;
889  m_Func = func;
890  }
891 
892  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
893  {
894  (m_pObj ->*m_Func)(t1, t2, t3, t4, t5, t6, t7, t8, t9);
895  }
896 
897 private:
898  T *m_pObj;
899  void (T::*m_Func)(T1, T2, T3, T4, T5, T6, T7, T8, T9);
900 };
901 
905 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
906 class Slot9
907 {
908 public:
909  template<class T>
910  Slot9(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
911  {
912  m_pSlotBase = new SlotImpl9<T, T1, T2, T3, T4, T5, T6, T7, T8, T9>(pObj, func);
913  }
914 
915  ~Slot9()
916  {
917  if (m_pSlotBase != NULL) { delete m_pSlotBase; m_pSlotBase = NULL; }
918  }
919 
920  void exec(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
921  {
922  m_pSlotBase ->exec(t1, t2, t3, t4, t5, t6, t7, t8, t9);
923  }
924 
925 private:
927 };
928 
932 template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
933 class Signal9
934 {
935 public:
936  template<class T>
937  void Bind(T *pObj, void (T::*func)(T1, T2, T3, T4, T5, T6, T7, T8, T9))
938  {
939  m_pSlotVec.push_back(new Slot9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(pObj, func));
940  }
941 
942  ~Signal9()
943  {
944  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
945  {
946  if (m_pSlotVec[i] != NULL) { delete m_pSlotVec[i]; m_pSlotVec[i] = NULL; }
947  }
948  }
949 
950  void operator()(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9)
951  {
952  for (int i = 0; i < (int)m_pSlotVec.size(); ++i)
953  {
954  m_pSlotVec[i] ->exec(t1, t2, t3, t4, t5, t6, t7, t8, t9);
955  }
956  }
957 
958 private:
959  std::vector< Slot9<T1, T2, T3, T4, T5, T6, T7, T8, T9>* > m_pSlotVec;
960 };
961 
962 #endif // SIGNAL_handleH
Definition: signal_slot.h:621
Definition: signal_slot.h:492
Definition: signal_slot.h:458
Definition: signal_slot.h:503
Definition: signal_slot.h:777
Definition: signal_slot.h:173
Definition: signal_slot.h:19
Definition: signal_slot.h:838
Definition: signal_slot.h:788
Definition: signal_slot.h:743
Definition: signal_slot.h:146
Definition: signal_slot.h:78
Definition: signal_slot.h:336
Definition: signal_slot.h:397
Definition: signal_slot.h:553
Definition: signal_slot.h:408
Definition: signal_slot.h:682
Definition: signal_slot.h:268
Definition: signal_slot.h:716
Definition: signal_slot.h:933
Definition: signal_slot.h:693
Definition: signal_slot.h:207
Definition: signal_slot.h:241
Definition: signal_slot.h:431
Definition: signal_slot.h:302
Definition: signal_slot.h:648
Definition: signal_slot.h:218
Definition: signal_slot.h:313
Definition: signal_slot.h:30
Definition: signal_slot.h:811
Definition: signal_slot.h:112
Definition: signal_slot.h:123
Definition: signal_slot.h:526
Definition: signal_slot.h:587
Definition: signal_slot.h:363
Definition: signal_slot.h:598
Definition: signal_slot.h:872
Definition: signal_slot.h:52
Definition: signal_slot.h:906
Definition: signal_slot.h:883

================================================ FILE: doc/struct___a_c_m_wave_format-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ACMWaveFormat 成员列表

成员的完整列表,这些成员属于 _ACMWaveFormat,包括所有继承而来的类成员

format (定义于 _ACMWaveFormat)_ACMWaveFormat
RawData (定义于 _ACMWaveFormat)_ACMWaveFormat

================================================ FILE: doc/struct___a_c_m_wave_format.html ================================================ CZPlayer: _ACMWaveFormat结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ACMWaveFormat结构体 参考

Public 属性

union {
   WAVEFORMATEX   format
 
   BYTE   RawData [128]
 
}; 
 

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_ENCODE_STATE_STEREO 成员列表

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___e_n_c_o_d_e___s_t_a_t_e___s_t_e_r_e_o.html ================================================ CZPlayer: _DVI_ADPCM_ENCODE_STATE_STEREO结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_ENCODE_STATE_STEREO结构体 参考

Public 属性

SHORT PredSamp_l
 
BYTE Index_l
 
SHORT PredSamp_r
 
BYTE Index_r
 

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___i_n_f_o-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_INFO 成员列表

成员的完整列表,这些成员属于 _DVI_ADPCM_INFO,包括所有继承而来的类成员

BlockLength (定义于 _DVI_ADPCM_INFO)_DVI_ADPCM_INFO
DataSize (定义于 _DVI_ADPCM_INFO)_DVI_ADPCM_INFO
SamplesPerBlock (定义于 _DVI_ADPCM_INFO)_DVI_ADPCM_INFO

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___i_n_f_o.html ================================================ CZPlayer: _DVI_ADPCM_INFO结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_INFO结构体 参考

Public 属性

WORD BlockLength
 
WORD SamplesPerBlock
 
DWORD DataSize
 

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_STATE_STEREO 成员列表

成员的完整列表,这些成员属于 _DVI_ADPCM_STATE_STEREO,包括所有继承而来的类成员

index_l (定义于 _DVI_ADPCM_STATE_STEREO)_DVI_ADPCM_STATE_STEREO
index_r (定义于 _DVI_ADPCM_STATE_STEREO)_DVI_ADPCM_STATE_STEREO
valprev_l (定义于 _DVI_ADPCM_STATE_STEREO)_DVI_ADPCM_STATE_STEREO
valprev_r (定义于 _DVI_ADPCM_STATE_STEREO)_DVI_ADPCM_STATE_STEREO

================================================ FILE: doc/struct___d_v_i___a_d_p_c_m___s_t_a_t_e___s_t_e_r_e_o.html ================================================ CZPlayer: _DVI_ADPCM_STATE_STEREO结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVI_ADPCM_STATE_STEREO结构体 参考

Public 属性

SHORT valprev_l
 
BYTE index_l
 
SHORT valprev_r
 
BYTE index_r
 

================================================ FILE: doc/struct___d_v_i_a_d_p_c_m_block_header-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVIADPCMBlockHeader 成员列表

成员的完整列表,这些成员属于 _DVIADPCMBlockHeader,包括所有继承而来的类成员

Reserved (定义于 _DVIADPCMBlockHeader)_DVIADPCMBlockHeader
Samp0 (定义于 _DVIADPCMBlockHeader)_DVIADPCMBlockHeader
StepTableIndex (定义于 _DVIADPCMBlockHeader)_DVIADPCMBlockHeader

================================================ FILE: doc/struct___d_v_i_a_d_p_c_m_block_header.html ================================================ CZPlayer: _DVIADPCMBlockHeader结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVIADPCMBlockHeader结构体 参考

Public 属性

SHORT Samp0
 
BYTE StepTableIndex
 
BYTE Reserved
 

================================================ FILE: doc/struct___d_v_i_a_d_p_c_m_header-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVIADPCMHeader 成员列表

成员的完整列表,这些成员属于 _DVIADPCMHeader,包括所有继承而来的类成员

BitsPerSample (定义于 _DVIADPCMHeader)_DVIADPCMHeader
BlockAlign (定义于 _DVIADPCMHeader)_DVIADPCMHeader
BytesPerSecond (定义于 _DVIADPCMHeader)_DVIADPCMHeader
cbSize (定义于 _DVIADPCMHeader)_DVIADPCMHeader
Channels (定义于 _DVIADPCMHeader)_DVIADPCMHeader
DataChunkId (定义于 _DVIADPCMHeader)_DVIADPCMHeader
DataLength (定义于 _DVIADPCMHeader)_DVIADPCMHeader
DataSize (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FactChunkId (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FactChunkSize (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FileSize (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FmtChunkId (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FmtChunkSize (定义于 _DVIADPCMHeader)_DVIADPCMHeader
FormatTag (定义于 _DVIADPCMHeader)_DVIADPCMHeader
RIFF (定义于 _DVIADPCMHeader)_DVIADPCMHeader
RIFFType (定义于 _DVIADPCMHeader)_DVIADPCMHeader
SampleRate (定义于 _DVIADPCMHeader)_DVIADPCMHeader
SamplesPerBlock (定义于 _DVIADPCMHeader)_DVIADPCMHeader

================================================ FILE: doc/struct___d_v_i_a_d_p_c_m_header.html ================================================ CZPlayer: _DVIADPCMHeader结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_DVIADPCMHeader结构体 参考

Public 属性

char RIFF [4]
 
DWORD FileSize
 
char RIFFType [4]
 
char FmtChunkId [4]
 
DWORD FmtChunkSize
 
WORD FormatTag
 
WORD Channels
 
DWORD SampleRate
 
DWORD BytesPerSecond
 
WORD BlockAlign
 
WORD BitsPerSample
 
WORD cbSize
 
WORD SamplesPerBlock
 
char FactChunkId [4]
 
DWORD FactChunkSize
 
DWORD DataLength
 
char DataChunkId [4]
 
DWORD DataSize
 

================================================ FILE: doc/struct___i_d3_tag-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3Tag 成员列表

成员的完整列表,这些成员属于 _ID3Tag,包括所有继承而来的类成员

m_cAlbum (定义于 _ID3Tag)_ID3Tag
m_cArtist (定义于 _ID3Tag)_ID3Tag
m_cComment (定义于 _ID3Tag)_ID3Tag
m_cGenre (定义于 _ID3Tag)_ID3Tag
m_cSong (定义于 _ID3Tag)_ID3Tag
m_cTAG (定义于 _ID3Tag)_ID3Tag
m_cYear (定义于 _ID3Tag)_ID3Tag

================================================ FILE: doc/struct___i_d3_tag.html ================================================ CZPlayer: _ID3Tag结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3Tag结构体 参考

Public 属性

char m_cTAG [3]
 
char m_cSong [30]
 
char m_cArtist [30]
 
char m_cAlbum [30]
 
char m_cYear [4]
 
char m_cComment [30]
 
unsigned char m_cGenre
 

================================================ FILE: doc/struct___i_d3v2_frame-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3v2Frame 成员列表

成员的完整列表,这些成员属于 _ID3v2Frame,包括所有继承而来的类成员

m_cFlags (定义于 _ID3v2Frame)_ID3v2Frame
m_cFrameID (定义于 _ID3v2Frame)_ID3v2Frame
m_cSize_Encoded (定义于 _ID3v2Frame)_ID3v2Frame

================================================ FILE: doc/struct___i_d3v2_frame.html ================================================ CZPlayer: _ID3v2Frame结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3v2Frame结构体 参考

Public 属性

char m_cFrameID [4]
 
unsigned char m_cSize_Encoded [4]
 
unsigned short m_cFlags
 

================================================ FILE: doc/struct___i_d3v2_tag-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3v2Tag 成员列表

成员的完整列表,这些成员属于 _ID3v2Tag,包括所有继承而来的类成员

m_cFlags (定义于 _ID3v2Tag)_ID3v2Tag
m_cSize_Encoded (定义于 _ID3v2Tag)_ID3v2Tag
m_cTAG (定义于 _ID3v2Tag)_ID3v2Tag
m_cVersion (定义于 _ID3v2Tag)_ID3v2Tag

================================================ FILE: doc/struct___i_d3v2_tag.html ================================================ CZPlayer: _ID3v2Tag结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_ID3v2Tag结构体 参考

Public 属性

char m_cTAG [3]
 
unsigned char m_cVersion [2]
 
unsigned char m_cFlags
 
unsigned char m_cSize_Encoded [4]
 

================================================ FILE: doc/struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MS_ADPCM_COEF_SET 成员列表

成员的完整列表,这些成员属于 _MS_ADPCM_COEF_SET,包括所有继承而来的类成员

Coef1 (定义于 _MS_ADPCM_COEF_SET)_MS_ADPCM_COEF_SET
Coef2 (定义于 _MS_ADPCM_COEF_SET)_MS_ADPCM_COEF_SET

================================================ FILE: doc/struct___m_s___a_d_p_c_m___c_o_e_f___s_e_t.html ================================================ CZPlayer: _MS_ADPCM_COEF_SET结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MS_ADPCM_COEF_SET结构体 参考

Public 属性

SHORT Coef1
 
SHORT Coef2
 

================================================ FILE: doc/struct___m_s___a_d_p_c_m___i_n_f_o-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MS_ADPCM_INFO 成员列表

成员的完整列表,这些成员属于 _MS_ADPCM_INFO,包括所有继承而来的类成员

BlockLength (定义于 _MS_ADPCM_INFO)_MS_ADPCM_INFO
CoefSets (定义于 _MS_ADPCM_INFO)_MS_ADPCM_INFO
DataSize (定义于 _MS_ADPCM_INFO)_MS_ADPCM_INFO
NumCoeff (定义于 _MS_ADPCM_INFO)_MS_ADPCM_INFO
SamplesPerBlock (定义于 _MS_ADPCM_INFO)_MS_ADPCM_INFO

================================================ FILE: doc/struct___m_s___a_d_p_c_m___i_n_f_o.html ================================================ CZPlayer: _MS_ADPCM_INFO结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MS_ADPCM_INFO结构体 参考

Public 属性

WORD BlockLength
 
WORD SamplesPerBlock
 
DWORD DataSize
 
WORD NumCoeff
 
MS_ADPCM_COEF_SET CoefSets [32]
 

================================================ FILE: doc/struct___m_s_a_d_p_c_m_block_header_mono-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MSADPCMBlockHeaderMono 成员列表

成员的完整列表,这些成员属于 _MSADPCMBlockHeaderMono,包括所有继承而来的类成员

Delta (定义于 _MSADPCMBlockHeaderMono)_MSADPCMBlockHeaderMono
predictor (定义于 _MSADPCMBlockHeaderMono)_MSADPCMBlockHeaderMono
Samp1 (定义于 _MSADPCMBlockHeaderMono)_MSADPCMBlockHeaderMono
Samp2 (定义于 _MSADPCMBlockHeaderMono)_MSADPCMBlockHeaderMono

================================================ FILE: doc/struct___m_s_a_d_p_c_m_block_header_mono.html ================================================ CZPlayer: _MSADPCMBlockHeaderMono结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MSADPCMBlockHeaderMono结构体 参考

Public 属性

BYTE predictor
 
SHORT Delta
 
SHORT Samp1
 
SHORT Samp2
 

================================================ FILE: doc/struct___m_s_a_d_p_c_m_block_header_stereo-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MSADPCMBlockHeaderStereo 成员列表

成员的完整列表,这些成员属于 _MSADPCMBlockHeaderStereo,包括所有继承而来的类成员

Delta (定义于 _MSADPCMBlockHeaderStereo)_MSADPCMBlockHeaderStereo
predictor (定义于 _MSADPCMBlockHeaderStereo)_MSADPCMBlockHeaderStereo
Samp1 (定义于 _MSADPCMBlockHeaderStereo)_MSADPCMBlockHeaderStereo
Samp2 (定义于 _MSADPCMBlockHeaderStereo)_MSADPCMBlockHeaderStereo

================================================ FILE: doc/struct___m_s_a_d_p_c_m_block_header_stereo.html ================================================ CZPlayer: _MSADPCMBlockHeaderStereo结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_MSADPCMBlockHeaderStereo结构体 参考

Public 属性

BYTE predictor [2]
 
SHORT Delta [2]
 
SHORT Samp1 [2]
 
SHORT Samp2 [2]
 

================================================ FILE: doc/struct___riff_header-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_RiffHeader 成员列表

成员的完整列表,这些成员属于 _RiffHeader,包括所有继承而来的类成员

BytesFollowing (定义于 _RiffHeader)_RiffHeader
ID (定义于 _RiffHeader)_RiffHeader

================================================ FILE: doc/struct___riff_header.html ================================================ CZPlayer: _RiffHeader结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_RiffHeader结构体 参考

Public 属性

char ID [4]
 
DWORD BytesFollowing
 

================================================ FILE: doc/struct___w_m_a___s_y_n_c___r_e_a_d_e_r-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WMA_SYNC_READER 成员列表

成员的完整列表,这些成员属于 _WMA_SYNC_READER,包括所有继承而来的类成员

bHasAudio (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
bProtected (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
dwBitsPerSample (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
dwChannels (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
dwOffset (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
dwOutput (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
dwSampleRate (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
liDuration (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
pAudioStream (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
pNSSBuffer (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
pStream (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
pWMHeaderInfo (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
pWMSyncReader (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER
wStream (定义于 _WMA_SYNC_READER)_WMA_SYNC_READER

================================================ FILE: doc/struct___w_m_a___s_y_n_c___r_e_a_d_e_r.html ================================================ CZPlayer: _WMA_SYNC_READER结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WMA_SYNC_READER结构体 参考

Public 属性

CAudioStreampAudioStream
 
IWMSyncReader * pWMSyncReader
 
INSSBuffer * pNSSBuffer
 
IWMHeaderInfo * pWMHeaderInfo
 
DWORD dwOffset
 
IStream * pStream
 
WORD wStream
 
DWORD dwOutput
 
bool bHasAudio
 
bool bProtected
 
WORD dwChannels
 
DWORD dwSampleRate
 
WORD dwBitsPerSample
 
LARGE_INTEGER liDuration
 

================================================ FILE: doc/struct___w_m_a_format_spec-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WMAFormatSpec 成员列表

成员的完整列表,这些成员属于 _WMAFormatSpec,包括所有继承而来的类成员

BitsPerSample (定义于 _WMAFormatSpec)_WMAFormatSpec
Channels (定义于 _WMAFormatSpec)_WMAFormatSpec
SampleRate (定义于 _WMAFormatSpec)_WMAFormatSpec

================================================ FILE: doc/struct___w_m_a_format_spec.html ================================================ CZPlayer: _WMAFormatSpec结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WMAFormatSpec结构体 参考

Public 属性

DWORD BitsPerSample
 
DWORD Channels
 
DWORD SampleRate
 

================================================ FILE: doc/struct___wave_header-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WaveHeader 成员列表

成员的完整列表,这些成员属于 _WaveHeader,包括所有继承而来的类成员

BitsPerSample (定义于 _WaveHeader)_WaveHeader
BlockAlign (定义于 _WaveHeader)_WaveHeader
BytesPerSecond (定义于 _WaveHeader)_WaveHeader
Channels (定义于 _WaveHeader)_WaveHeader
DataChunkId (定义于 _WaveHeader)_WaveHeader
DataSize (定义于 _WaveHeader)_WaveHeader
FileSize (定义于 _WaveHeader)_WaveHeader
FmtChunkId (定义于 _WaveHeader)_WaveHeader
FmtChunkSize (定义于 _WaveHeader)_WaveHeader
FormatTag (定义于 _WaveHeader)_WaveHeader
RIFF (定义于 _WaveHeader)_WaveHeader
RIFFType (定义于 _WaveHeader)_WaveHeader
SampleRate (定义于 _WaveHeader)_WaveHeader

================================================ FILE: doc/struct___wave_header.html ================================================ CZPlayer: _WaveHeader结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WaveHeader结构体 参考

Public 属性

char RIFF [4]
 
DWORD FileSize
 
char RIFFType [4]
 
char FmtChunkId [4]
 
DWORD FmtChunkSize
 
WORD FormatTag
 
WORD Channels
 
DWORD SampleRate
 
DWORD BytesPerSecond
 
WORD BlockAlign
 
WORD BitsPerSample
 
char DataChunkId [4]
 
DWORD DataSize
 

================================================ FILE: doc/struct___wave_header_ex-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WaveHeaderEx 成员列表

成员的完整列表,这些成员属于 _WaveHeaderEx,包括所有继承而来的类成员

DataChunkId (定义于 _WaveHeaderEx)_WaveHeaderEx
DataSize (定义于 _WaveHeaderEx)_WaveHeaderEx
FileSize (定义于 _WaveHeaderEx)_WaveHeaderEx
FmtChunkId (定义于 _WaveHeaderEx)_WaveHeaderEx
FmtChunkSize (定义于 _WaveHeaderEx)_WaveHeaderEx
Format (定义于 _WaveHeaderEx)_WaveHeaderEx
RIFF (定义于 _WaveHeaderEx)_WaveHeaderEx
RIFFType (定义于 _WaveHeaderEx)_WaveHeaderEx

================================================ FILE: doc/struct___wave_header_ex.html ================================================ CZPlayer: _WaveHeaderEx结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
_WaveHeaderEx结构体 参考

Public 属性

char RIFF [4]
 
DWORD FileSize
 
char RIFFType [4]
 
char FmtChunkId [4]
 
DWORD FmtChunkSize
 
WAVEFORMATEXTENSIBLE Format
 
char DataChunkId [4]
 
DWORD DataSize
 

================================================ FILE: doc/struct_d_s___audio_device_cache-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_AudioDeviceCache 成员列表

成员的完整列表,这些成员属于 DS_AudioDeviceCache,包括所有继承而来的类成员

dev (定义于 DS_AudioDeviceCache)DS_AudioDeviceCache
guid (定义于 DS_AudioDeviceCache)DS_AudioDeviceCache
isSource (定义于 DS_AudioDeviceCache)DS_AudioDeviceCache
mixerIndex (定义于 DS_AudioDeviceCache)DS_AudioDeviceCache
refCount (定义于 DS_AudioDeviceCache)DS_AudioDeviceCache

================================================ FILE: doc/struct_d_s___audio_device_cache.html ================================================ CZPlayer: DS_AudioDeviceCache结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_AudioDeviceCache结构体 参考

Public 属性

signed int mixerIndex
 
bool isSource
 
void * dev
 
signed int refCount
 
GUID guid
 

================================================ FILE: doc/struct_d_s___info-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_Info 成员列表

成员的完整列表,这些成员属于 DS_Info,包括所有继承而来的类成员

bitsPerSample (定义于 DS_Info)DS_Info
bufferSizeInBytes (定义于 DS_Info)DS_Info
captureBuffer (定义于 DS_Info)DS_Info
deviceID (定义于 DS_Info)DS_Info
dsBufferSizeInBytes (定义于 DS_Info)DS_Info
framePos (定义于 DS_Info)DS_Info
frameSize (定义于 DS_Info)DS_Info
isSource (定义于 DS_Info)DS_Info
playBuffer (定义于 DS_Info)DS_Info
silencedBytes (定义于 DS_Info)DS_Info
started (定义于 DS_Info)DS_Info
underrun (定义于 DS_Info)DS_Info
writePos (定义于 DS_Info)DS_Info

================================================ FILE: doc/struct_d_s___info.html ================================================ CZPlayer: DS_Info结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_Info结构体 参考

Public 属性

int deviceID
 
bool isSource
 
LPDIRECTSOUNDBUFFER8 playBuffer
 
LPDIRECTSOUNDCAPTUREBUFFER8 captureBuffer
 
int dsBufferSizeInBytes
 
int bufferSizeInBytes
 
int bitsPerSample
 
int frameSize
 
unsigned long long framePos
 
int writePos
 
bool started
 
int silencedBytes
 
bool underrun
 

================================================ FILE: doc/struct_d_s___refresh_cache_struct-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_RefreshCacheStruct 成员列表

成员的完整列表,这些成员属于 DS_RefreshCacheStruct,包括所有继承而来的类成员

currMixerIndex (定义于 DS_RefreshCacheStruct)DS_RefreshCacheStruct
isSource (定义于 DS_RefreshCacheStruct)DS_RefreshCacheStruct

================================================ FILE: doc/struct_d_s___refresh_cache_struct.html ================================================ CZPlayer: DS_RefreshCacheStruct结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
DS_RefreshCacheStruct结构体 参考

Public 属性

signed int currMixerIndex
 
bool isSource
 

================================================ FILE: doc/struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
WAVEFORMATEXTENSIBLE 成员列表

成员的完整列表,这些成员属于 WAVEFORMATEXTENSIBLE,包括所有继承而来的类成员

dwChannelMask (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
Format (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
Samples (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
SubFormat (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
wReserved (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
wSamplesPerBlock (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE
wValidBitsPerSample (定义于 WAVEFORMATEXTENSIBLE)WAVEFORMATEXTENSIBLE

================================================ FILE: doc/struct_w_a_v_e_f_o_r_m_a_t_e_x_t_e_n_s_i_b_l_e.html ================================================ CZPlayer: WAVEFORMATEXTENSIBLE结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
WAVEFORMATEXTENSIBLE结构体 参考

Public 属性

WAVEFORMATEX Format
 
union {
   WORD   wValidBitsPerSample
 
   WORD   wSamplesPerBlock
 
   WORD   wReserved
 
Samples
 
DWORD dwChannelMask
 
GUID SubFormat
 

================================================ FILE: doc/structdither-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
dither 成员列表

成员的完整列表,这些成员属于 dither,包括所有继承而来的类成员

error (定义于 dither)dither
random (定义于 dither)dither

================================================ FILE: doc/structdither.html ================================================ CZPlayer: dither结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
dither结构体 参考

Public 属性

mad_fixed_t error [3]
 
mad_fixed_t random
 

================================================ FILE: doc/structtag___direct_audio_device_description-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
tag_DirectAudioDeviceDescription 成员列表

================================================ FILE: doc/structtag___direct_audio_device_description.html ================================================ CZPlayer: tag_DirectAudioDeviceDescription结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
tag_DirectAudioDeviceDescription结构体 参考

Public 属性

signed int deviceID
 
signed int maxSimulLines
 
WCHAR name [DAUDIO_STRING_LENGTH+1]
 
WCHAR vendor [DAUDIO_STRING_LENGTH+1]
 
WCHAR description [DAUDIO_STRING_LENGTH+1]
 
WCHAR version [DAUDIO_STRING_LENGTH+1]
 

================================================ FILE: doc/structxing-members.html ================================================ CZPlayer: 成员列表
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
xing 成员列表

成员的完整列表,这些成员属于 xing,包括所有继承而来的类成员

bytes (定义于 xing)xing
flags (定义于 xing)xing
frames (定义于 xing)xing
scale (定义于 xing)xing
toc (定义于 xing)xing

================================================ FILE: doc/structxing.html ================================================ CZPlayer: xing结构体 参考
Copyright (C) 2012-2015 Highway-9 Studio.
CZPlayer  3.0.0
CZPlayer应用程序
xing结构体 参考

Public 属性

long flags
 
unsigned long frames
 
unsigned long bytes
 
unsigned char toc [100]
 
long scale
 

================================================ FILE: doc/tabs.css ================================================ .tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #303017; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } ================================================ FILE: doc.bat ================================================ start "" doc\index.html ================================================ FILE: main.cpp ================================================ /*************************************************************************** * Copyright (C) 2012-2015 Highway-9 Studio. * * 787280310@qq.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * CUIT Highway-9 Studio, China. * ***************************************************************************/ /*! * \file main.cpp * \author chengxuan 787280310@qq.com * \date 2014-12-21 * \brief ڡ * \version 3.0.0 * * \verbatim * ʷ * 3.0.0 , * 2014-12-21 by chengxuan * * \endverbatim * */ #include "MainWidget.h" #include "TR.h" #include #include #include #include #include #include "qtsingleapplication.h" /***************************************************************************** 汾ĶӦ *****************************************************************************/ #if TR_VERSION < 0x030000 #error "TR version error." #endif /***************************************************************************** ȫֱ *****************************************************************************/ const QString AppName = "CZPlayer"; /*!< Ӧó*/ const QString QssFilePath = ":/qss/CZPlayer.qss"; /*!< qssļ·*/ /*! \fn main ں \param argc \param argv ַָָ \return ˳0򷵻ط0ֵ */ int main(int argc, char *argv[]) { #if 1 QtSingleApplication app(argc, argv); if (app.isRunning()) { return EXIT_SUCCESS; } /*Else do nothing, and continue.*/ #else QApplication app(argc, argv); #endif app.setApplicationName(AppName); //qssʽ QFile file(QssFilePath); file.open(QFile::ReadOnly); app.setStyleSheet(TR(file.readAll())); file.close(); //ʾ MainWidget mainWidget(argv[1]); mainWidget.show(); int result = app.exec(); return result; }
Copyright (C) 2012-2015 Highway-9 Studio.