Mercurial > audlegacy-plugins
changeset 1269:0e160bafce1c
- adapt filewriter for file:// scheme.
- filewriter plugins should return written time which includes offset.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Sun, 15 Jul 2007 19:06:04 +0900 |
parents | 74e20cec44b4 |
children | d73eed18f3f4 |
files | src/filewriter/filewriter.c src/filewriter/flac.c src/filewriter/vorbis.c src/filewriter/wav.c |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/filewriter/filewriter.c Sun Jul 15 00:53:16 2007 +0900 +++ b/src/filewriter/filewriter.c Sun Jul 15 19:06:04 2007 +0900 @@ -254,7 +254,7 @@ else directory = g_strdup(file_path); - temp = g_strdup_printf("%s/%s.%s", + temp = g_strdup_printf("file://%s/%s.%s", directory, filename, fileext_str[fileext]); g_free(directory); g_free(filename);
--- a/src/filewriter/flac.c Sun Jul 15 00:53:16 2007 +0900 +++ b/src/filewriter/flac.c Sun Jul 15 19:06:04 2007 +0900 @@ -191,7 +191,7 @@ static gint flac_get_written_time(void) { if (input.frequency && input.channels) - return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels)); + return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels) + offset); return 0; }
--- a/src/filewriter/vorbis.c Sun Jul 15 00:53:16 2007 +0900 +++ b/src/filewriter/vorbis.c Sun Jul 15 19:06:04 2007 +0900 @@ -222,7 +222,7 @@ static gint vorbis_get_written_time(void) { if (input.frequency && input.channels) - return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels)); + return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels) + offset); return 0; }
--- a/src/filewriter/wav.c Sun Jul 15 00:53:16 2007 +0900 +++ b/src/filewriter/wav.c Sun Jul 15 19:06:04 2007 +0900 @@ -113,6 +113,6 @@ static gint wav_get_written_time(void) { if (header.byte_p_sec != 0) - return (gint) ((written * 1000) / header.byte_p_sec); + return (gint) ((written * 1000) / header.byte_p_sec + offset); return 0; }