Ejemplo n.º 1
0
void genericFilechooserWindow::setFilters
(
	int mimeType
)
{	
	switch (mimeType)
	{
		case 1 : // player --> audios/videos/pictures/containers/...
		{
			setVideoFilter();
			setAudioFilter();
		} break;
		case 2 : // playlist --> m3u and folder
		{
			setPlaylistFilter();
		} break;
		case 3 : // ebucore --> xml and mxf
		{
			setAnyEBUCoreFilter();
		} break;
		case 4 : // mxf generator --> MXF container only
		{
			setMXFFilter();
		} break;
		case 5 : // mxf generator --> any raw video files
		{
			setVideoFilter();
		} break;
		case 6 : // mxf generator --> any raw audio files
		{
			setAudioFilter();
		} break;
		case 7 : // mxf generator --> any raw ebucore files
		{
			setXMLEBUCoreFilter();
		} break;
		case 8 : // mxf generator -->any raw AVC-Intra video files
		{
			setVideoFilter();
		} break;
		case 9 : // mxf generator --> any raw AVC-Intra text files
		{
			setAVCITextFilter();
		} break;
		default : {} break;
	}
	setAllFilesFilter();
}
Ejemplo n.º 2
0
void
ReSID::loadFromBuffer(uint8_t **buffer)
{
	debug(2, "  Loading ReSID state...\n");

    setChipModel((chip_model)read8(buffer));
    setAudioFilter((bool)read8(buffer));
    setSamplingMethod((sampling_method)read8(buffer));
    setSampleRate(read32(buffer));
    setClockFrequency(read32(buffer));
}
Ejemplo n.º 3
0
ReSID::ReSID()
{
	name = "ReSID";

	debug(2, "  Creating ReSID at address %p...\n", this);

    sid = new SID();
    
    // Register snapshot items
    SnapshotItem items[] = {
        
        // Configuration items
        { &chipModel,           sizeof(chipModel),              KEEP_ON_RESET },
        { &sampleRate,          sizeof(sampleRate),             KEEP_ON_RESET },
        { &samplingMethod,      sizeof(samplingMethod),         KEEP_ON_RESET },
        { &cpuFrequency,        sizeof(cpuFrequency),           KEEP_ON_RESET },
        { &audioFilter,         sizeof(audioFilter),            KEEP_ON_RESET },
        { &externalAudioFilter, sizeof(externalAudioFilter),    KEEP_ON_RESET },
        { &volume,              sizeof(volume),                 KEEP_ON_RESET },
        { &targetVolume,        sizeof(targetVolume),           KEEP_ON_RESET },
        
        // ReSID state
        { st.sid_register,                  sizeof(st.sid_register),                    KEEP_ON_RESET },
        { &st.bus_value,                    sizeof(st.bus_value),                       KEEP_ON_RESET },
        { &st.bus_value_ttl,                sizeof(st.bus_value_ttl),                   KEEP_ON_RESET },
        { &st.accumulator[0],               sizeof(st.accumulator[0]),                  KEEP_ON_RESET },
        { &st.accumulator[1],               sizeof(st.accumulator[1]),                  KEEP_ON_RESET },
        { &st.accumulator[2],               sizeof(st.accumulator[2]),                  KEEP_ON_RESET },
        { &st.shift_register[0],            sizeof(&st.shift_register[0]),              KEEP_ON_RESET },
        { &st.shift_register[1],            sizeof(&st.shift_register[1]),              KEEP_ON_RESET },
        { &st.shift_register[2],            sizeof(&st.shift_register[2]),              KEEP_ON_RESET },
        { &st.rate_counter[0],              sizeof(st.rate_counter[0]),                 KEEP_ON_RESET },
        { &st.rate_counter[1],              sizeof(st.rate_counter[1]),                 KEEP_ON_RESET },
        { &st.rate_counter[2],              sizeof(st.rate_counter[2]),                 KEEP_ON_RESET },
        { &st.rate_counter_period[0],       sizeof(st.rate_counter_period[0]),          KEEP_ON_RESET },
        { &st.rate_counter_period[1],       sizeof(st.rate_counter_period[1]),          KEEP_ON_RESET },
        { &st.rate_counter_period[2],       sizeof(st.rate_counter_period[2]),          KEEP_ON_RESET },
        { &st.exponential_counter[0],       sizeof(st.exponential_counter[0]),          KEEP_ON_RESET },
        { &st.exponential_counter[1],       sizeof(st.exponential_counter[1]),          KEEP_ON_RESET },
        { &st.exponential_counter[2],       sizeof(st.exponential_counter[2]),          KEEP_ON_RESET },
        { &st.exponential_counter_period[0],sizeof(st.exponential_counter_period[0]),   KEEP_ON_RESET },
        { &st.exponential_counter_period[1],sizeof(st.exponential_counter_period[1]),   KEEP_ON_RESET },
        { &st.exponential_counter_period[2],sizeof(st.exponential_counter_period[2]),   KEEP_ON_RESET },
        { &st.envelope_counter[0],          sizeof(st.envelope_counter[0]),             KEEP_ON_RESET },
        { &st.envelope_counter[1],          sizeof(st.envelope_counter[1]),             KEEP_ON_RESET },
        { &st.envelope_counter[2],          sizeof(st.envelope_counter[2]),             KEEP_ON_RESET },
        { &st.envelope_state[0],            sizeof(st.envelope_state[0]),               KEEP_ON_RESET },
        { &st.envelope_state[1],            sizeof(st.envelope_state[1]),               KEEP_ON_RESET },
        { &st.envelope_state[2],            sizeof(st.envelope_state[2]),               KEEP_ON_RESET },
        { &st.hold_zero[0],                 sizeof(st.hold_zero[0]),                    KEEP_ON_RESET },
        { &st.hold_zero[1],                 sizeof(st.hold_zero[1]),                    KEEP_ON_RESET },
        { &st.hold_zero[2],                 sizeof(st.hold_zero[2]),                    KEEP_ON_RESET },
        
        { NULL,                             0,                                          0 }};
    
    registerSnapshotItems(items, sizeof(items));
    
    // Set default values
    setChipModel(MOS6581); 
    
    cpuFrequency = PAL_CYCLES_PER_FRAME * PAL_REFRESH_RATE;
    samplingMethod = SAMPLE_FAST;
    sampleRate = 44100;
    sid->set_sampling_parameters(cpuFrequency, samplingMethod, sampleRate);
    
    setAudioFilter(false);
    setExternalAudioFilter(false);
    
    volume = 100000;
    targetVolume = 100000;
}