Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: vis.h (Read 2667 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

vis.h

Quote
struct vis_chunk
{
   vis_sample * data;
   unsigned samples;// sizeof(data) == sizeof(vis_sample) * samples * nch;
   unsigned srate,nch;
   vis_sample * spectrum;
   unsigned spectrum_size;// sizeof(spectrum) == sizeof(vis_sample) * spectrum_size * nch;

   inline double get_duration() {return srate>0 ? (double)samples / (double)srate : 0;}

};//both data and spectrum are channel-interleaved


i am back to annoy you with more evil questions  i hope they make some sense.

1. what's the range of the floats in vis_chunk->data? are they values from 0 to 1?
2. same question for vis_chunk->spectrum.
3. how many floats are there in vis_chunk->data and vis_chunk->spectrum on every on_data()-call? i guess that "samples" is the number of floats in the chunk, but i am probably wrong...

thanks in advance,

pcween

 

vis.h

Reply #1
1) -1...1 (but may exceed that range if signal clips)
2) 0...+∞
3)
Quote
struct vis_chunk
{
vis_sample * data;
unsigned samples;// sizeof(data) == sizeof(vis_sample) * samples * nch;
unsigned srate,nch;
vis_sample * spectrum;
unsigned spectrum_size;// sizeof(spectrum) == sizeof(vis_sample) * spectrum_size * nch;

inline double get_duration() {return srate>0 ? (double)samples / (double)srate : 0;}

};//both data and spectrum are channel-interleaved
Microsoft Windows: We can't script here, this is bat country.