Question

I would like to use C in order to get the last time the soundboard was playing a file. Is there a way I could do that?

Pas de solution correcte

Autres conseils

None of the components you are using (tools, libraries, sound servers, drivers, kernel) logs the time when a sound is played.

If you are using one specific tool to play sounds, you could modify it to log the time.

Otherwise, you have to actively monitor the current status of the sound device. (With ALSA, you could poll /proc/asound/card*/pcm*/sub*/status.)

I think it's not possible because of ALSA(Advanced Linux Sound Architecture) is just kernel component that provide device drivers for sound card.But i don't know if some user-space API's and library's like (alsa-ustils) can do that!,I advice may is better to check Sound-Player applications(VLC etc..) log ?!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top