From: ListsAccount <lists@s201431494.online.de>
To: alsa-devel@alsa-project.org
Subject: reading peak meter values from a RME HDSP madi soundcard
Date: Fri, 14 Mar 2008 15:16:11 +0100 [thread overview]
Message-ID: <47DA88AB.80205@s201431494.online.de> (raw)
Hi,
I'd like to read the peak values of the RME HDSP madi soundcard. To do
this, I use the function: snd_hwdep_ioctl() with the ioctl command
"SNDRV_HDSPM_IOCTL_GET_PEAK_RMS".
I use the following code:
// create container
hdspm_peak_rms_t madi_peak_rms;
hdspm_peak_rms_t* ptr_madi_peak_rms = &madi_peak_rms;
//snd_hwdep_open
...
// fill the container with values
snd_hwdep_ioctl(hw,
SNDRV_HDSPM_IOCTL_GET_PEAK_RMS,
(void *)&ptr_madi_peak_rms);
for (unsigned int chn = 0; chn < numberOfChannels; ++chn)
{
//put values from madi soundcard into std::vector containers
currentInputPeak[chn] = madi_peak_rms.level_offset[chn];
currentPlaybackPeak[chn] = madi_peak_rms.level_offset[chn+64];
currentOutputPeak[chn] = madi_peak_rms.level_offset[chn+128];
}
The upper 24 bit of the read out values should be the signal peak. The
next 8 bit seem to represent a clipping counter.
For the first eight input channels this works pretty well. But for every
eighth channel of all further channels (input, playback and output) the
peak value is to low and is not in time with the other channels.
Do i use the function in the right way?
Is there a special function to get the peak meter values? (In a similar
way as for ADAT soundcards?)
Best regards.
reply other threads:[~2008-03-14 14:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47DA88AB.80205@s201431494.online.de \
--to=lists@s201431494.online.de \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox