当前位置: 首页>>代码示例>>C++>>正文


C++ file_info::info_set方法代码示例

本文整理汇总了C++中file_info::info_set方法的典型用法代码示例。如果您正苦于以下问题:C++ file_info::info_set方法的具体用法?C++ file_info::info_set怎么用?C++ file_info::info_set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在file_info的用法示例。


在下文中一共展示了file_info::info_set方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: to_infos

void t_cuesheet_index_list::to_infos(file_info & p_out) const
{
	double base = m_positions[1];

	if (base > 0) {
		p_out.info_set("referenced_offset",cuesheet_format_index_time(base));
	}
	
	if (m_positions[0] < base)
		p_out.info_set("pregap",cuesheet_format_index_time(base - m_positions[0]));
	else
		p_out.info_remove("pregap");

	p_out.info_remove("index 00");	
	p_out.info_remove("index 01");
	
	for(unsigned n=2;n<count;n++)
	{
		char namebuffer[16];
		sprintf_s(namebuffer,"index %02u",n);
		double position = m_positions[n] - base;
		if (position > 0)
			p_out.info_set(namebuffer,cuesheet_format_index_time(position));
		else
			p_out.info_remove(namebuffer);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:27,代码来源:cuesheet_index_list.cpp

示例2: get_info

	void get_info( file_info & p_info, abort_callback & p_abort )
	{
		ModPlugFile* m_info = ModPlug_Load(file_buffer.get_ptr(), file_buffer.get_size());
		p_info.info_set( "encoding", "synthesized" );
		int type_module = ModPlug_GetModuleType(m_info);
		p_info.info_set( "codec", "Module file" );
		p_info.info_set_int( "channels", 2 );
		p_info.meta_set( "title", pfc::stringcvt::string_utf8_from_ansi(  ModPlug_GetName(m_info)  ));
		int len = ModPlug_GetLength(m_info);
		len /= 1000;
		p_info.set_length( len );
		if(m_info)ModPlug_Unload(m_info);
	}
开发者ID:FauxFaux,项目名称:foo_mudlord,代码行数:13,代码来源:input_modplug.cpp

示例3:

void IMA4Decoder::get_info(file_info &info)
{
    info.info_set("codec",    "IMA 4:1");
    info.info_set("encoding", "lossy");
    info.info_set_int("samplerate", m_format.asbd.mSampleRate);
    uint32_t channel_mask = m_format.channel_mask;
    std::string channels;
    if (channel_mask) {
        channels = Helpers::describe_channels(channel_mask);
        info.info_set("channels", channels.c_str());
    } else {
        info.info_set_int("channels", m_format.asbd.mChannelsPerFrame);
    }
}
开发者ID:nu774,项目名称:foo_input_caf,代码行数:14,代码来源:IMA4Decoder.cpp

示例4: get_info

	void get_info( file_info & p_info, abort_callback & p_abort )
	{
		YMMUSIC *  m_info = ymMusicCreate();
		ymMusicLoadMemory(m_info,file_buffer.get_ptr(), file_buffer.get_size());
		ymMusicInfo_t info;
		ymMusicGetInfo(m_info,&info);

		p_info.info_set( "encoding", "synthesized" );
		p_info.info_set( "codec", "YM" );
		p_info.info_set_int( "channels", 1 );
		p_info.meta_set( "title", pfc::stringcvt::string_utf8_from_ansi( info.pSongName) );
		p_info.meta_set( "artist", pfc::stringcvt::string_utf8_from_ansi( info.pSongAuthor) );
		p_info.meta_set( "comment", pfc::stringcvt::string_utf8_from_ansi( info.pSongComment) );
		p_info.set_length( info.musicTimeInSec );

		ymMusicDestroy(m_info);
	}
开发者ID:Crazybond,项目名称:foobar2000,代码行数:17,代码来源:input_ym.cpp

示例5: get_info

 void get_info(file_info & p_info, abort_callback & p_abort)
 {
     p_info.info_set_int("bitrate", (t_int64)m_decoder->avg_bitrate / 1000);
     p_info.info_set_int("samplerate", m_decoder->sample_rate);
     p_info.info_set_int("bitspersample", get_bps_for_format(config.format));
     p_info.info_set_int("channels", config.speakers);
     p_info.info_set("codec", m_decoder->format);
     p_info.set_length( (double) m_decoder->length);
 }
开发者ID:vsu,项目名称:foo-input-dts,代码行数:9,代码来源:foo_input_dts.cpp

示例6: get_info

	virtual void get_info(t_uint32 subsong, file_info & p_info,abort_callback & p_abort) {
		t_uint32 sample_rate = get_sample_rate();
		m_head.input->get_info(subsong, p_info, p_abort);
		pfc::string8 name;
		name << get_info_prefix();
		t_size prefixlen = name.get_length();
		name << "head_length";
		p_info.info_set(name, format_samples_ex(m_head.samples, sample_rate));
		name.truncate(prefixlen);
		name << "body_length";
		p_info.info_set(name, format_samples_ex(m_body.samples, sample_rate));
		p_info.set_length(audio_math::samples_to_time(m_head.samples + m_body.samples, sample_rate));
		if (m_autoprobe) {
			name.truncate(prefixlen);
			name << "autoprobe";
			pfc::string8 value;
			value << "type=" << g_get_short_name() << " head-suffix=" << m_head.suffix << " body-suffix=" << m_body.suffix;
			p_info.info_set(name, value);
		}
	}
开发者ID:otoboku,项目名称:foo_loop,代码行数:20,代码来源:standard.cpp

示例7: get_info

	void get_info(file_info & p_info,abort_callback & p_abort) {
		t_filesize size = m_file->get_size(p_abort);
		if (size != filesize_invalid) {
			//file size is known, let's set length
			p_info.set_length(audio_math::samples_to_time( size / raw_total_sample_width, raw_sample_rate));
		}
		//note that the values below should be based on contents of the file itself, NOT on user-configurable variables for an example. To report info that changes independently from file contents, use get_dynamic_info/get_dynamic_info_track instead.
		p_info.info_set_int("samplerate",raw_sample_rate);
		p_info.info_set_int("channels",raw_channels);
		p_info.info_set_int("bitspersample",raw_bits_per_sample);
		p_info.info_set("encoding","lossless");
		p_info.info_set_bitrate((raw_bits_per_sample * raw_channels * raw_sample_rate + 500 /* rounding for bps to kbps*/ ) / 1000 /* bps to kbps */);
		
	}
开发者ID:AICIDNN,项目名称:lastfm-desktop,代码行数:14,代码来源:foo_input_raw.cpp


注:本文中的file_info::info_set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。