#include <index.h>

| Index::Index | ( | ) |
Initializes empty index
| Index::Index | ( | QString | from | ) |
Reads index from disk
References read_idx().
| Index::~Index | ( | ) |
Deep destroy of object
| void Index::add_album | ( | AlbumField * | a | ) |
References bpmdj_reallocate.
Referenced by read_idx().
| void Index::add_next_history | ( | HistoryField * | h | ) |
Referenced by read_idx().
| HistoryField * Index::add_next_song | ( | QString | mp3 | ) |
References HistoryField::count.
| void Index::add_prev_history | ( | HistoryField * | h | ) |
Referenced by read_idx().
| HistoryField * Index::add_prev_song | ( | QString | mp3 | ) |
References HistoryField::count.
| bool Index::changed | ( | ) | [inline] |
Returns whether the data has changed
Referenced by core_done(), and Song::refill().
| void Index::clear_energy | ( | ) |
References index_max, index_mean, index_min, and index_power.
Referenced by EnergyAnalyzer::analyze().
| AlbumField ** Index::copy_albums | ( | ) |
References bpmdj_allocate.
Referenced by Song::refill().
| void Index::delete_album | ( | QString | name | ) |
References AlbumField::name.
| void Index::executeInfoDialog | ( | ) |
References SongInfoDialog::info, and SongInformation::updateDataFrom().
| AlbumField * Index::find_album | ( | QString | name | ) |
References AlbumField::name.
Referenced by SongSelectorLogic::albumItemChanged().
| bool Index::fully_defined_energy | ( | ) |
References power_type::fully_defined(), sample4_type::fully_defined(), index_max, index_mean, index_min, and index_power.
Referenced by batch_start().
| AlbumField* * Index::get_albums | ( | ) | [inline] |
| QString Index::get_author | ( | ) | [inline] |
Referenced by Song::refill().
| composition_property Index::get_composition | ( | ) | [inline] |
Referenced by Song::refill().
| unsigned8 Index::get_cue | ( | ) | [inline] |
Referenced by cue_read().
| unsigned8 Index::get_cue_c | ( | ) | [inline] |
Referenced by cue_read(), and Song::refill().
| unsigned8 Index::get_cue_v | ( | ) | [inline] |
Referenced by cue_read(), and Song::refill().
| unsigned8 Index::get_cue_x | ( | ) | [inline] |
Referenced by cue_read(), main(), and Song::refill().
| unsigned8 Index::get_cue_z | ( | ) | [inline] |
Referenced by cue_read(), and Song::refill().
| capacity_type Index::get_disabled_capacities | ( | ) | [inline] |
References index_disabled_capacities.
Referenced by set_decoder_environment().
| QString Index::get_display_title | ( | ) |
Referenced by Song::refill().
| QString Index::get_filename | ( | ) | [inline] |
| echo_property Index::get_histogram | ( | ) | [inline] |
Referenced by Song::refill().
| sample4_type Index::get_max | ( | ) | [inline] |
References index_max.
Referenced by batch_start(), SpectrumAnalyzer::fetchSpectrum_normal(), Song::refill(), and rms_init().
| QString Index::get_md5sum | ( | ) | [inline] |
Referenced by batch_start(), and Song::refill().
| sample4_type Index::get_mean | ( | ) | [inline] |
References index_mean.
Referenced by batch_start(), Song::refill(), and rms_init().
| sample4_type Index::get_min | ( | ) | [inline] |
References index_min.
Referenced by batch_start(), SpectrumAnalyzer::fetchSpectrum_normal(), Song::refill(), and rms_init().
| HistoryField* * Index::get_next_songs | ( | ) | [inline] |
| period_type Index::get_period | ( | ) | [inline] |
Referenced by core_meta_init().
| unsigned4 Index::get_playcount | ( | ) |
References HistoryField::count.
Referenced by Song::refill().
| power_type Index::get_power | ( | ) | [inline] |
References index_power.
Referenced by batch_start(), Song::refill(), and rms_init().
| HistoryField* * Index::get_prev_songs | ( | ) | [inline] |
| QString Index::get_remix | ( | ) | [inline] |
| rhythm_property Index::get_rhythm | ( | ) | [inline] |
Referenced by Song::refill().
| spectrum_type * Index::get_spectrum | ( | ) |
References no_spectrum.
Referenced by batch_start(), and Song::refill().
| QString Index::get_storedin | ( | ) | [inline] |
Returns the place where this index is stored in
Referenced by MusicScanner::checkfile(), SongSlot::getPlayCommand(), main(), Song::refill(), and SongSlot::startChecking().
| QString Index::get_tags | ( | ) | [inline] |
Referenced by batch_start(), and Song::refill().
| tempo_type Index::get_tempo | ( | ) | [inline] |
References period_to_tempo().
Referenced by batch_start(), main(), Song::refill(), and BpmAnalyzerDialog::tap().
| QString Index::get_time | ( | ) | [inline] |
Referenced by SongSlot::checkerDied(), and Song::refill().
| unsigned2 Index::get_time_in_seconds | ( | ) |
Referenced by batch_start().
| QString Index::get_title | ( | ) | [inline] |
| QString Index::get_version | ( | ) | [inline] |
Referenced by Song::refill().
| void Index::read_idx | ( | QString | indexn | ) |
Initializes the index by reading the data from the passed filename
References add_album(), add_next_history(), add_prev_history(), Fatal(), index_disabled_capacities, index_max, index_mean, index_min, index_power, DataError::msg, histogram_property< bandsize >::set_data(), power_type::set_data(), and sample4_type::set_data().
Referenced by Index().
| QString Index::readable_description | ( | ) |
Referenced by batch_start(), and Player::captionize_according_to_index().
| void Index::set_author | ( | QString | new_author | ) | [inline] |
| void Index::set_changed | ( | ) | [inline] |
Marks the index as 'changed'
Referenced by EnergyAnalyzer::analyze().
| void Index::set_composition | ( | composition_property | r | ) | [inline] |
Referenced by RhythmAnalyzer::calculateRhythmPattern2().
| void Index::set_cue | ( | unsigned8 | c | ) | [inline] |
Referenced by cue_write().
| void Index::set_cue_c | ( | unsigned8 | c | ) | [inline] |
Referenced by cue_write().
| void Index::set_cue_v | ( | unsigned8 | c | ) | [inline] |
Referenced by cue_write().
| void Index::set_cue_x | ( | unsigned8 | c | ) | [inline] |
Referenced by cue_write().
| void Index::set_cue_z | ( | unsigned8 | c | ) | [inline] |
Referenced by cue_write().
| void Index::set_disabled_capacities | ( | capacity_type | c | ) | [inline] |
References index_disabled_capacities.
| void Index::set_filename | ( | QString | fn | ) | [inline] |
Referenced by createNewIndexFor(), and SongSlot::startChecking().
| void Index::set_histogram | ( | echo_property | h | ) | [inline] |
Referenced by SpectrumAnalyzer::fetchSpectrum_normal().
| void Index::set_md5sum | ( | QString | s | ) | [inline] |
Referenced by Md5Analyzer::analyze().
| void Index::set_period | ( | period_type | t, | |
| bool | update_on_disk = true | |||
| ) |
If the period is different from the old period then we remove the rhythm information and composition information
References histogram_property< bandsize >::clear(), period_type::period, and write_idx().
Referenced by createNewIndexFor(), and set_normalperiod_metarate().
| void Index::set_remix | ( | QString | t | ) | [inline] |
| void Index::set_rhythm | ( | rhythm_property | r | ) | [inline] |
Referenced by RhythmAnalyzer::calculateRhythmPattern2().
| void Index::set_spectrum | ( | spectrum_type * | s | ) | [inline] |
Referenced by SpectrumAnalyzer::fetchSpectrum_normal().
| void Index::set_storedin | ( | QString | t | ) | [inline] |
Sets the place where this index is stored in
Referenced by createNewIndexFor(), and SongSlot::startChecking().
| void Index::set_tags | ( | QString | str | ) | [inline] |
Referenced by batch_start(), and createNewIndexFor().
| void Index::set_time | ( | QString | str | ) |
Referenced by writer_died().
| void Index::set_title | ( | QString | t | ) | [inline] |
| bool Index::set_title_author_remix | ( | QString | meta_filename | ) |
Tries to figure out the name, remix, author and version from the song filename
This function tries to find title, author and remix in the filename and set the specified fields in the index.
This function probably still leaks memory but it is only used when a new index is created. So at the moment I don't care that much.
busy = 0, started with title busy = 1, started with remix busy = 2, ended with remix busy = 3, started with author busy = 4, started with author, started with version busy >= 6, ended with a crash
References bpmdj_deallocate.
Referenced by UpdateIndexedSong::change(), and createNewIndexFor().
| void Index::set_version | ( | QString | new_version | ) | [inline] |
| bool Index::write_idx | ( | QString | t | ) | [inline] |
Writes the index to a new filename, replaces meta_filename first Returns true if the file was completely written. False otherwise.
References write_idx().
| bool Index::write_idx | ( | ) |
Writes the index to the file 'meta_filename'. Returns true if the file was completely written. False otherwise.
#1155. To avoid incomplete files we write to a tmp file. If that file was writeable then we use that one.
References Error(), exists(), fclose(), FILE, fsize(), AlbumField::get_data(), power_type::get_data(), sample4_type::get_data(), histogram_property< bandsize >::get_data(), spectrum_type::get_data(), index_disabled_capacities, index_max, index_mean, index_min, index_power, and no_spectrum.
Referenced by UpdateIndexedSong::change(), core_done(), Song::refill(), set_period(), SongSlot::startChecking(), and write_idx().
friend class SongInformation [friend] |
Disabled capacities for this song
Referenced by get_disabled_capacities(), SongInformation::on_save_clicked(), read_idx(), set_disabled_capacities(), SongInformation::updateDataFrom(), and write_idx().
Referenced by EnergyAnalyzer::analyze(), clear_energy(), fully_defined_energy(), get_max(), read_idx(), and write_idx().
Referenced by EnergyAnalyzer::analyze(), clear_energy(), fully_defined_energy(), get_mean(), read_idx(), and write_idx().
Referenced by EnergyAnalyzer::analyze(), clear_energy(), fully_defined_energy(), get_min(), read_idx(), and write_idx().
Referenced by EnergyAnalyzer::analyze(), clear_energy(), fully_defined_energy(), get_power(), read_idx(), and write_idx().
1.6.2