[alsa-devel] [PATCH] PCM parameters in file plugin
Pavel Hofman
pavel.hofman at insite.cz
Thu Jan 29 00:00:08 CET 2009
Takashi Iwai wrote:
> At Mon, 19 Jan 2009 23:20:49 +0100,
> Pavel Hofman wrote:
>> @@ -84,6 +106,211 @@ typedef struct {
>> #define TO_LE16(x) bswap_16(x)
>> #endif
>>
>> +/* old_string MUST contain the key! */
>> +int snd_pcm_file_replace_key(char *old_string, char *key, char *value,
>> + char **newstring_p)
>
> Make this static.
>
>> +{
>> + int str_index, newstr_index, key_index, end, new_len, old_len, cpy_len,
>> + first_key_index;
>> + char *c, *first_c, *newstring;
>> + int keys_count;
>> +
>> + first_c = c = (char *) strstr(old_string, key);
>
> I guess this parser doesn't handle '%%' properly like printf()?
>
>> +int snd_pcm_file_replace_fname(snd_pcm_file_t *file, char **new_fname_p)
>
> Make it static.
>
>> +int snd_pcm_file_has_keys(char *string)
>
> Ditto.
>
>> +int snd_pcm_file_open_output_file(snd_pcm_file_t *file)
>
> Ditto.
>
>> + if (file->final_fname[0] == '|') {
>> + /* pipe mode */
>> + FILE *pipe;
>> + /* clearing */
>> + file->final_fname[0] = ' ';
>> + pipe = popen(file->final_fname, "w");
>
> Pass "file->final_fname + 1", and you don't have to replace the pipe
> with a space.
>
>
> thanks,
>
> Takashi
Hi Takashi,
Thanks a lot for your comments.
Please find enclosed a reworked patch which reflects your requests
including the %% functionality.
Thanks,
Pavel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcm_file.c.patch
Type: text/x-patch
Size: 9666 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090129/3ff4c899/attachment.patch
More information about the Alsa-devel
mailing list