#include <cstdio>#include <signal.h>#include <errno.h>#include <stdlib.h>#include <stdio.h>#include <assert.h>#include <string.h>#include <fcntl.h>#include <sys/ioctl.h>#include <unistd.h>#include <libgen.h>#include <time.h>#include <sys/times.h>#include <math.h>#include <qdialog.h>#include <sys/types.h>#include <sys/wait.h>#include "player-core.h"#include "memory.h"#include "scripts.h"#include "version.h"#include "dsp-drivers.h"#include "energy-analyzer.h"#include "player-config.h"#include "capacity.h"#include "clock-drivers.h"#include "info.h"
| #define DECAY 11050 |
| #define DIFF 100 |
| #define wave_bufsize (32L*1024L) |
Referenced by wave_read().
| typedef source_template<false> bare_source |
| typedef source_template<true> normalized_source |
| void copyright | ( | ) |
Referenced by core_meta_init().
| void core_done | ( | ) |
Closes the wave and writes any changes to the index
References Index::changed(), cue_write(), Debug(), finished, Info(), opt_quiet, wave_close(), and Index::write_idx().
Referenced by batch_start(), and Player::done().
| int core_meta_init | ( | ) |
Initializes the index fields and start reading the audio The error can be err_none (wanted !), err_needidx, err_noraw, err_nospawn, or err_dsp.
References arg_match, argument, common_init(), copyright(), cue_read(), currentperiod_metarate, err_needidx, err_none, Index::get_period(), normalperiod_metarate, opt_match, period_to_quad(), target, and targetperiod_metarate.
Referenced by batch_start(), check_start(), and normal_start().
| int core_object_init | ( | bool | sync | ) |
References wave_open().
Referenced by batch_start(), and Player::initCore().
| int core_start | ( | bool | ui | ) |
Starts the core if the wave is already opened. If user interface is true it will use QMessageBox to display errors.
References assert(), dsp_driver::close(), dsp, err_dsp, err_none, finished, lfo_init(), map_init(), msg_playing_state_changed(), dsp_driver::open(), pause_playing(), rms_init(), and dsp_driver::start().
Referenced by Player::startCore().
| void core_stop | ( | ) |
Waits for the core to finish, does nothing else
References dsp, finished, and dsp_driver::stop().
Referenced by Player::done(), and Player::stopCore().
| void cue_read | ( | ) |
References cue_metarate, cues_metarate, Index::get_cue(), Index::get_cue_c(), Index::get_cue_v(), Index::get_cue_x(), and Index::get_cue_z().
Referenced by core_meta_init().
| void cue_retrieve | ( | int | nr | ) |
Will retrieve the cue from memory and place it in cue It will effectively be used later in the jumpto function which will also try to stay in sync with the current position in the phrase.
References cue_metarate, and cues_metarate.
| void cue_set | ( | ) |
References cue_metarate, diskrate_to_metarate(), dsp, dsp_driver::latency(), x_normalise(), and y_playrate.
Referenced by Player::setCue(), and Player::start_stop().
| void cue_shift_metarate | ( | signed8 | whence | ) |
References cue_metarate, dsp, dsp_driver::get_paused(), and pause_playing().
| void cue_store | ( | int | nr | ) |
Will write the current position into one of the cue points
References cue_metarate, and cues_metarate.
| void cue_write | ( | ) |
References cue_metarate, cues_metarate, Index::set_cue(), Index::set_cue_c(), Index::set_cue_v(), Index::set_cue_x(), and Index::set_cue_z().
Referenced by core_done().
| QString get_rawpath | ( | ) |
References assert(), and rawpath.
Referenced by openCoreRawFile(), wave_open(), and DecoderChecker::works().
| void jumpto | ( | signed8 | mes | ) |
References cue_metarate, currentperiod_metarate, dsp, dsp_driver::get_paused(), metarate, metarate_to_diskrate(), dsp_driver::playrate, unpause_playing(), y_normalise(), and y_playrate.
Referenced by lfo_set(), map_set_diskrate(), and Player::start_stop().
| stereo_sample2 lfo_break | ( | stereo_sample2 | x | ) |
References lfo_phase_playrate, and y_playrate.
Referenced by Player::breakLfo().
| _lfo_ lfo_get | ( | ) |
References lfo_do.
Referenced by Player::metronome().
| void lfo_init | ( | ) |
References lfo_do, and lfo_no().
Referenced by core_start().
| stereo_sample2 lfo_metronome | ( | stereo_sample2 | x | ) |
References stereo_sample2::add(), dsp, lfo_phase_playrate, stereo_sample2::muldiv(), dsp_driver::playrate, and y_playrate.
Referenced by Player::metronome().
| stereo_sample2 lfo_no | ( | stereo_sample2 | lt | ) |
References stereo_sample2::muldiv().
Referenced by lfo_init(), and Player::normalLfo().
| stereo_sample2 lfo_pan | ( | stereo_sample2 | x | ) |
References lfo_phase_playrate, lfo_volume(), and y_playrate.
Referenced by Player::fastPan(), and Player::slowPan().
| stereo_sample2 lfo_revsaw | ( | stereo_sample2 | x | ) |
References lfo_phase_playrate, lfo_volume(), and y_playrate.
Referenced by Player::fastRevSaw(), and Player::slowRevSaw().
| stereo_sample2 lfo_saw | ( | stereo_sample2 | x | ) |
References lfo_phase_playrate, lfo_volume(), and y_playrate.
Referenced by Player::fastSaw(), and Player::slowSaw().
References currentperiod_metarate, dsp, dsp_driver::get_paused(), jumpto(), lfo_do, lfo_phase_playrate, metarate, quad_period_type::muldiv(), dsp_driver::playrate, unpause_playing(), and y_playrate.
Referenced by Player::breakLfo(), Player::fastPan(), Player::fastRevSaw(), Player::fastSaw(), Player::metronome(), Player::normalLfo(), Player::slowPan(), Player::slowRevSaw(), and Player::slowSaw().
| stereo_sample2 lfo_volume | ( | stereo_sample2 | x, | |
| signed4 | multiplierleft, | |||
| signed4 | divisorleft, | |||
| signed4 | multiplierright, | |||
| signed4 | divisorright | |||
| ) |
References stereo_sample2::muldiv2().
Referenced by lfo_pan(), lfo_revsaw(), and lfo_saw().
| void loop_jump | ( | ) |
References loop_restart_diskrate, x_diskrate, y_normalise(), and y_playrate.
| int loop_set_diskrate | ( | unsigned8 | jumpback | ) |
References cue_metarate, dsp, dsp_driver::get_paused(), loop_at_diskrate, loop_off, loop_restart_diskrate, metarate_to_diskrate(), unpause_playing(), and x_diskrate.
Referenced by Player::loop().
References assert(), Debug(), dx, map_exit_continue, map_exit_pos_diskrate, map_exit_restart, map_exit_stop, map_loop, map_set_diskrate(), map_size, map_start_pos_diskrate, map_stop_pos_diskrate, pause_playing(), t_segment::take_from, t_segment::volume, x_diskrate, y_normalise(), and y_playrate.
Referenced by map_stop().
| void map_init | ( | ) |
References map_do.
Referenced by core_start().
| void map_loop_set | ( | bool | l | ) |
References map_loop.
Referenced by Player::mapLoopChange().
References bpmdj_deallocate, cue_metarate, dsp, dsp_driver::get_paused(), jumpto(), dsp_driver::latency(), map_do, map_exit_pos_diskrate, map_loop, map_size, map_start_pos_diskrate, map_stop_pos_diskrate, metarate_to_diskrate(), unpause_playing(), x_normalise(), and y_playrate.
Referenced by map_active(), and Player::mapStart().
| void map_stop | ( | ) |
References bpmdj_deallocate, map_active(), map_do, x_diskrate, y_normalise(), and y_playrate.
Referenced by Player::mapStop().
| FILE* openCoreRawFile | ( | ) |
References data, get_rawpath(), and openRawFile().
Referenced by RhythmAnalyzer::calculateRhythmPattern2(), SpectrumAnalyzer::fetchSpectrum_normal(), and EnergyAnalyzer::readAudio().
| void pause_playing | ( | ) |
Asks the player to pause its playing. This function must return immediately and simply signals a pause request
References dsp, dsp_driver::get_paused(), msg_playing_state_changed(), and dsp_driver::pause().
Referenced by core_start(), cue_shift_metarate(), map_active(), and Player::start_stop().
| void rms_init | ( | ) |
| void rms_normalize | ( | stereo_sample2 * | l | ) |
References stereo_sample2::left, and stereo_sample2::right.
| void set_normalperiod_metarate | ( | quad_period_type | newnormalperiod, | |
| bool | update_on_disk | |||
| ) |
References assert(), clock_driver::set_normalperiod_metarate(), and Index::set_period().
Referenced by BeatGraphAnalyzer::setTempo().
| void something_died | ( | int | sig, | |
| siginfo_t * | info, | |||
| void * | hu | |||
| ) |
References Debug(), ExitStatus::pid, ExitStatus::status, Warning(), and writer_died().
Referenced by wave_open().
| void unpause_playing | ( | ) |
References dsp, dsp_driver::get_paused(), msg_playing_state_changed(), and dsp_driver::unpause().
Referenced by jumpto(), lfo_set(), loop_set_diskrate(), map_set_diskrate(), and Player::restart().
| void wave_close | ( | ) |
References assert(), fclose(), wave_file, and wave_name.
Referenced by core_done().
| unsigned4 wave_max | ( | ) |
References fsize(), wave_file, and wave_name.
Referenced by Player::timerTick(), wave_read(), and writer_died().
| int wave_open | ( | Index * | playing, | |
| bool | synchronous | |||
| ) |
References assert(), bpmdj_allocate, bpmdjraw(), data, err_none, err_noraw, err_nospawn, Index::get_filename(), get_rawpath(), getRawFilename(), set_decoder_environment(), something_died(), wave_file, wave_name, and writer_died().
Referenced by core_object_init().
| int wave_read | ( | unsigned4 | pos, | |
| stereo_sample2 * | val | |||
| ) |
References diskrate, i, stereo_sample2::value(), wave_bufferpos, wave_bufsize, wave_file, and wave_max().
| void writer_died | ( | ) |
Bug# 975: the jackd daemon seems to spawn its own processes To make sure that we retrieve the proper signal from the process we spawned, we retrieve the signal info and compare it against what we expect.
References diskrate, msg_writing_finished(), samples2s, Index::set_time(), sprintf(), wave_file, and wave_max().
Referenced by something_died(), and wave_open().
| char* arg_match = 0 |
Referenced by core_meta_init(), process_options(), and remote().
| char* argument |
Referenced by Md5Analyzer::analyze(), core_meta_init(), main(), normal_start(), process_options(), and remote().
Referenced by Player::initCore(), Player::restartCore(), Player::startCore(), Player::tabChanged(), and Player::timerTick().
| cue_info cue_metarate = 0 |
cue points are expressed as positions (samples) in the song at metarate cue is the current cue
Referenced by Player::checkCueNonZero(), cue_read(), cue_retrieve(), cue_set(), cue_shift_metarate(), cue_store(), cue_write(), BeatGraphLabel::drawCueText(), jumpto(), loop_set_diskrate(), map_set_diskrate(), and Player::start_stop().
| cue_info cues_metarate[4] = {0,0,0,0} |
These are the for Z, X, C and V cues, in that order
Referenced by cue_read(), cue_retrieve(), cue_store(), cue_write(), BeatGraphLabel::drawCueText(), and Player::mapStart().
| volatile int finished = 1 |
Referenced by ActiveFragmentPlayer::ActiveFragmentPlayer(), core_done(), core_start(), and core_stop().
Referenced by lfo_get(), lfo_init(), and lfo_set().
Referenced by lfo_break(), lfo_metronome(), lfo_pan(), lfo_revsaw(), lfo_saw(), and lfo_set().
Referenced by loop_set_diskrate().
Referenced by loop_set_diskrate().
Referenced by loop_jump(), and loop_set_diskrate().
| bool map_do |
Referenced by map_init(), map_set_diskrate(), and map_stop().
Referenced by map_active(), and map_set_diskrate().
Referenced by map_active(), map_loop_set(), and map_set_diskrate().
Referenced by map_active(), and map_set_diskrate().
Referenced by map_active(), and map_set_diskrate().
Referenced by map_active(), and map_set_diskrate().
Referenced by main(), process_options(), InitAndStart::run(), BeatGraphAnalyzer::setTempo(), and BpmAnalyzerDialog::tap().
| int opt_match = 0 |
Referenced by core_meta_init(), process_options(), and remote().
| int opt_quiet = 0 |
Referenced by core_done(), and process_options().
Referenced by Md5Analyzer::analyze(), EnergyAnalyzer::analyze(), batch_start(), RhythmAnalyzer::calculateRhythmPattern2(), Player::captionize_according_to_index(), SpectrumAnalyzer::fetchSpectrum_normal(), BeatGraphAnalyzer::setTempo(), setup_start(), Player::tabChanged(), BpmAnalyzerDialog::tap(), and Player::timerTick().
| QString rawpath = "" |
Referenced by get_rawpath().
| stereo_sample2 wave_buffer[wave_bufsize] |
| unsigned4 wave_bufferpos = wave_bufsize |
Referenced by wave_read().
| FILE* wave_file |
Referenced by wave_close(), wave_max(), wave_open(), wave_read(), and writer_died().
| char* wave_name = NULL |
Referenced by wave_close(), wave_max(), wave_open(), and DecoderChecker::works().
1.6.2