PCM File plugin - minor fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

After some consideration I decided to ask for changing the meaning of the %b key from bytes to bits as it provides more convenience.

Thanks for commiting the patch.

Pavel Hofman.
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
index 6ddf14f..bfa1cc8 100644
--- a/src/pcm/pcm_file.c
+++ b/src/pcm/pcm_file.c
@@ -172,7 +172,7 @@ static int snd_pcm_file_replace_fname(snd_pcm_file_t *file, char **new_fname_p)
 
 			case BWIDTH_KEY:
 				snprintf(value, sizeof(value), "%d",
-					pcm->frame_bits/(8 * pcm->channels));
+					pcm->frame_bits/pcm->channels);
 				err = snd_pcm_file_append_value(&new_fname,
 						&new_index_ch, &new_len, value);
 				if (err < 0)
@@ -816,7 +816,7 @@ pcm.name {
 				# real values corresponding to the stream:
 				# %r	rate (replaced with: 48000)
 				# %c	channels (replaced with: 2)
-				# %b	bytes per sample (replaced with: 2)
+				# %b	bits per sample (replaced with: 16)
 				# %f	sample format string
 				#			(replaced with: S16_LE)
 				# %%	replaced with %
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux