Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Irbis

Pages: [1]
1
There is a very interesting exponent in the Museum of Optics in Saint-Peterburg, Russia. It's called Abbe's catalog and it consists of 144 optical glasses of different types and sizes. I've developed the software that visualizes music that is currently playing in the museum using 1152 RGB-LEDs.



SFML was used for audio jobs and for the touchscreen interface.

I'll write an article about it later, but you can already watch the video :


2
Audio / Getting samples with no delay
« on: January 15, 2011, 07:44:28 pm »
Greetings, ladies and gentlemen.
I'm doing a project that requires a real-time spectrum visualization.
So, the algorithm looks like this:
1. Get playing offset
2. Get small amount of samples starting from that offset
3. Use FFT on those samples
4. Visualize

That's the code that I'm using for it:


Code: [Select]

sf::SoundBuffer SB;
SB.LoadFromFile("file.ogg");

const sf::Int16 * SBp;
SBp = SB.GetSamples();

sf::Sound SND;
SND.SetBuffer(SB);

SND.Play();

//Get current offset
//Fill an FFT input array with some amount of samples starting from that offset
//Call FFTW


The problem is that loading from file into the sound buffer takes some  time because it loads the whole file. I don't need the whole file at any moment, only small chunks.

Is it possible to load files chunk by chunk and get samples from those chunks without waiting for the whole file to load? As I understand sf::Music is doing the loading that way, but it doesn't allow me to get it's buffer.
Code: [Select]

Pages: [1]
anything