alex9490 / editor-on-fire

Automatically exported from code.google.com/p/editor-on-fire
Other
0 stars 0 forks source link

Replace alogg_create_ogg_from_file with alogg_create_ogg_from_buffer #199

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As reported here:
http://www.fretsonfire.net/forums/viewtopic.php?f=11&t=49422&p=563613#p563483

beebe found that if he loaded an audio file that had special characters in it 
(his OGG file in question was named "08 Untitled 8 (Popplagið).ogg"), fopen() 
couldn't open it and the waveform failed to be created.  Currently, EOF only 
has 3 instances of alogg_create_ogg_from_file() that could be vulnerable to 
such a problem with filenames.

EOF's "Load OGG" logic avoids this limitation by loading the file into memory 
with eof_buffer_file() and then using alogg_create_ogg_from_buffer().  This 
would probably be the absolute best way to resolve the filename limitation with 
the current instances of alogg_create_ogg_from_file().

Original issue reported on code.google.com by raynebc on 9 Nov 2010 at 11:01

GoogleCodeExporter commented 8 years ago
Another solution would be to add an alogg_create_ogg_from_packfile() function 
(pack_fopen() supports unicode filenames). You would only have to change 'FILE 
*' to 'PACKFILE *' and fopen() to pack_fopen().

Original comment by xander4j...@yahoo.com on 9 Nov 2010 at 11:32

GoogleCodeExporter commented 8 years ago
That sounds good, we could put that in mix.c or something just in case ALOGG 
ever gets updated, so we don't lose it.

Original comment by raynebc on 9 Nov 2010 at 11:37

GoogleCodeExporter commented 8 years ago
I'm going to put this in ALOGG since we are already using a custom version. I'm 
certain ALOGG is a dead project since it's been unchanged almost since vorbis 
was first released.

Original comment by xander4j...@yahoo.com on 9 Nov 2010 at 11:44

GoogleCodeExporter commented 8 years ago
I couldn't use the PACKFILE method since PACKFILEs are not fully seekable. I 
went ahead and implemented your method of using alogg_create_ogg_from_buffer() 
instead.

Original comment by xander4j...@yahoo.com on 10 Nov 2010 at 12:06