AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 0 |
r3wp | 6 |
total: | 6 |
results window for this page: [start: 1 end: 6]
world-name: r3wp
Group: RAMBO ... The REBOL bug and enhancement database [web-public] | ||
Anton: 13-Jan-2006 | I just found a file that I can READ but not OPEN a port to. This bug can be seen on old and new versions of Core and View: >> read %"/j/anton/mp3s/more/test-copy.mp3" == {ID3^C^@^@^@^@^F^NTMED^@^@^@^D^@^@^@DIGTLEN^@^@^@^G^@^@^@472006TCON^@^@^@^E^@^@^@miscTRCK^@^@^@^B^@^@^@5TALB^@^@^@^\^@^@^@Psych o... >> port: open %"/j/anton/mp3s/more/test-copy.mp3" ** Access Error: Cannot open /j/anton/mp3s/more/test-copy.mp3 ** Near: port: open %/j/anton/mp3s/more/test-copy.mp3 >> port: open/binary %"/j/anton/mp3s/more/test-copy.mp3" ** Access Error: Cannot open /j/anton/mp3s/more/test-copy.mp3 ** Near: port: open/binary %/j/anton/mp3s/more/test-copy.mp3 >> read/binary %"/j/anton/mp3s/more/test-copy.mp3" == #{ 4944330300000000060E544D454400000004000000444947544C454E00000007 00000034373230303654434F4E000000050000006D6973635452434B0000... | |
Group: Core ... Discuss core issues [web-public] | ||
[unknown: 5]: 31-Mar-2009 | Yes to save resources. For example, what if I just read an MP3 file into a word? I want to free that word so that it no longer is allocated to that data. | |
Geomol: 31-Mar-2009 | If you want to load more MP3s, it would be a good idea to reuse the same memory area. An example: >> f: func [/local blk] [blk: []] >> a: f == [] >> insert a 42 == [] >> a == [42] >> source f f: func [/local blk][blk: [42]] >> clear a == [] >> source f f: func [/local blk][blk: []] You see, A and BLK inside F points to the same memory. Next time you call F, you can put some more stuff in BLK (read another MP3). If you want to be able to completely remove BLK, I would do that using an object. Build the MP3 player as an object, instead of just a function. Makes sense? | |
Anton: 31-Mar-2009 | load-mp3-data: func [file /local contents][ contents: read/binary file ; <- modify contents here also contents contents: none ] data: load-mp3-data %song.mp3 | |
Group: !Uniserve ... Creating Uniserve processes [web-public] | ||
Oldes: 19-Jan-2009 | Will... I want to make a private mp3 stream server to play music on a local network. So it must be solved on the server side... read only enough sound data from disk to play and distribute it to listeners. I have already the mp3 parser to get for example enough data to play during specified interval of time. Now it's just how to distribute it and don't send more data than is necessary for the listeners. | |
Group: !REBOL3 ... [web-public] | ||
Marco: 26-Nov-2011 | wish for R3 / Topaz / Red / World: Add possibility to extend "read" and "load" to let them transparently load also custom file types (.tiff, .mp3 etc.) Use something like: system/mime: context [ JPG: context [ extensions: [%.jpg %.jpeg ...] header: #{JFIF} open: func [...] read: func [...] load: func [...] save: func [...] write: func [...] close: func [...] ] ... ] |