示例#1
0
void spectrum_extension::g_refresh_all()
{
	double p_time = NULL;
	g_stream->get_absolute_time(p_time);
	audio_chunk_impl p_chunk;

	unsigned fft_size = 4096;
	bool ret = g_stream->get_spectrum_absolute(p_chunk, p_time, fft_size);

	unsigned n, count = spectrum_extension::g_visualisations.get_count();
	for (n=0; n<count; n++)
	{
		spectrum_extension * vis_ext = spectrum_extension::g_visualisations[n];
		if (ret)
			vis_ext->refresh(&p_chunk);
	}
}
示例#2
0
void spectrum_extension::g_refresh_all()
{
	double p_time = NULL;
	g_stream->get_absolute_time(p_time);
	audio_chunk_impl p_chunk;

	//unsigned needed_fft_size = 1;
	//while (unsigned(rc_client.right - rc_client.left)*2 > needed_fft_size)
	//	needed_fft_size <<= 1;

	unsigned fft_size = 1024;//min(needed_fft_size, 512);
	bool ret = g_stream->get_spectrum_absolute(p_chunk, p_time, fft_size);

	unsigned n, count = spectrum_extension::g_visualisations.get_count();
	for (n=0; n<count; n++)
	{
		spectrum_extension * vis_ext = spectrum_extension::g_visualisations[n];
		if (ret)
			vis_ext->refresh(&p_chunk);
	}
}