예제 #1
0
    void open(service_ptr_t<file> m_file, const char * p_path, t_input_open_reason p_reason, abort_callback & p_abort)
    {
        if (p_reason == input_open_info_write)
        {
            throw exception_io_data();
        }

        input_open_file_helper(m_file, p_path, p_reason, p_abort);
        m_stats = m_file->get_stats(p_abort);
        m_decoder = new dts_decode();

        if (!m_decoder->load( m_file, p_abort))
        {
            throw exception_io_data();
        }
    }
예제 #2
0
	void open( service_ptr_t<file> m_file, const char * p_path, t_input_open_reason p_reason, abort_callback & p_abort )
	{
		if ( p_reason == input_open_info_write ) throw exception_io_data();
		input_open_file_helper( m_file, p_path, p_reason, p_abort );
		m_stats = m_file->get_stats( p_abort );
		t_uint8            * ptr;
		unsigned             size;
		t_filesize size64 = m_file->get_size_ex( p_abort );
		if ( size64 > ( 1 << 24 ) )
			throw exception_io_data();
		size = (unsigned) size64;
		file_buffer.set_size( size );
		ptr = file_buffer.get_ptr();
		m_file->read_object( ptr, size, p_abort );
		m_player = ModPlug_Load(ptr, size);
		if ( !m_player ) throw exception_io_data();
	}
예제 #3
0
	t_filestats get_file_stats(abort_callback &p_abort)
	{
		return m_file->get_stats(p_abort);
	}