![]() ![]() ** * Get the position of a module * Returns a 2 elements Array containing respectively x and y */ PoolIntArray get_module_scope2( int slot, int mod_num, int channels, int samples_to_read ) ** * Read up to samples_to_read samples from a given module * Returns the samples */ PoolIntArray get_module_outputs( int slot, int mod_num ) ![]() ** * Get the outputs of a module * Returns the output module ids */ ** * Get the name of a module * Returns the name */ int get_module_name( int slot, int mod_num ) PoolIntArray get_module_inputs( int slot, int mod_num ) ** * Get the inputs of a module * Returns the input module ids */ ** * Get the flags of a module where * SV_MODULE_FLAG_EXISTS 1 * SV_MODULE_FLAG_EFFECT 2 * SV_MODULE_INPUTS_OFF 16 * SV_MODULE_INPUTS_MASK ( 255 << SV_MODULE_INPUTS_OFF ) * SV_MODULE_OUTPUTS_OFF ( 16 + 8 ) * SV_MODULE_OUTPUTS_MASK ( 255 << SV_MODULE_OUTPUTS_OFF ) * Returns the flags */ int get_module_flags( int slot, int mod_num ) ** * Get the value of a module's controller * Returns the value */ int get_module_ctl_value( int slot, int mod_num, int ctl_num ) ** * Get the name of a module's controller * Returns the name */ int get_module_ctl_name( int slot, int mod_num, int ctl_num, ) ** * Get module color in the following format: 0xBBGGRR * Returns the color */ int get_module_color( int slot, int mod_num ) ** * Get latest Sunvox's logs, amounting given size * Returns size bytes of logs */ ** * Get current signal * Returns signal from 0 to 255 */ int get_current_signal_level( int slot, int channel ) ** * Get the line currently playing * Returns the line with decimals */ float get_current_line2( int slot ) ** * Get the line currently playing * Returns the line */ int get_current_line( int slot ) ** * Checks if the song has ended * Returns 0 - song is playing now 1 - stopped */ int end_of_song( int slot ) ![]() ** * USE LOCK/UNLOCK! * Disconnect module source's output to module destination's input * Returns whatever Sunvox returns */ int disconnect_module( int slot, int source, int destination ) ** * De-initializes Sunvox * Returns whatever Sunvox returns */ int deinit() ** * USE LOCK/UNLOCK! * Connect module source's output to module destination's input * Returns whatever Sunvox returns */ int connect_module( int slot, int source, int destination ) ** * Closes the given slot * Returns whatever Sunvox returns */ int close_slot( int slot ) PoolByteArray audio_callback2( int frames, int latency, int out_time, int in_type, int in_channels, PoolByteArray in_buf ) where the LR is the one frame (Left+Right channels) * Returns the signal as bytes */ * in_type - input buffer type: 0 - signed short (16bit integer) 1 - float (32bit floating point) * in_channels - number of input channels * in_buf - input buffer stereo data will be interleaved in this buffer: LRLR. * It's the same as audio_callback() but you also can specify the input buffer. ** * Send some data to the Input module and receive the filtered data from the Output module. PoolByteArray audio_callback( int frames, int latency, int out_time ) ![]() ticks per second (user time space) * user_latency = user_out_time - use_cur_time //latency in user time space * unsigned int sunvox_latency = ( user_latency * get_ticks_per_second() ) / user_ticks_per_second //latency in SunVox time space * unsigned int latency_frames = ( user_latency * sample_rate_Hz ) / user_ticks_per_second //latency in frames * audio_callback( buf, frames, latency_frames, get_ticks() + sunvox_latency ) * Returns the signal as bytes */ current time (user time space) * user_ticks_per_second =. output time in user time space (NOT SunVox time space!) * user_cur_time =. * Parameters: * frames - number of frames in destination buffer * latency - audio latency (in frames) * out_time - buffer output time (in system ticks) * Example: * user_out_time =. * SV_INIT_FLAG_USER_AUDIO_CALLBACK and SV_INIT_FLAG_AUDIO_INT16 ((1 << 1) & (1 << 2)) flag in init() must be set. * With audio_callback() you can ignore the built-in SunVox sound output mechanism and use some other sound system. ** * Get the next piece of SunVox audio from the Output module. ** * Open the first available slot * Returns the opened slot number */ int acquire_slot() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |