halo.
YD> mm, after examining your patch and your frequent YD> opening of the same file, i had a look at the code YD> again and it that case, there might be a leak YD> because the title of the mp3 was not freed.
YD> it's fixed in v0.4 but only for linux.
YD> cheers,
YD> sevy/yves
ah thanks. that sounds good. and yes olaf, why not add a "close" message. if you could then even compile with yves new version and tell me when i can download it at http://www.akustische-kunst.org/puredata/winport/winport.html i would say dankeschön a lot.
so joreg.
YD> joreg wrote:
halo.
ok..on initialize [mp3write~] says its using lame 3.90. i do have a lame.exe (and the according dll) here that says it is 3.91 how can i make the node use the newer version?
asdf. joreg.
YD> hi,
YD> unfortunately, there's not a single memory allocation YD> in the main loop of mp3write~ : every internal structure YD> is allocated at object creation, so if something leaks, YD> it's surely lame library itself.
YD> it's funny that i don't see this phenomenon with lame 3.92 YD> on linux.
YD> cheers,
YD> sevy/yves
YD> Joreg Diessl wrote:
halo.
it took me a long time to find out why my pc freezes after about 30 minutes of operation. but now i think i found something.
i am using [mp3write~] to generate an mp3 file that is then taken by an other program and moved to a different folder (i can't do that within pd, right?). now i noticed that my system is continuously loosing memory while this patch is running. when there is no more physical memory available (which i am observing with taskmanager) the system freezes. closing pd priort to a freeze releases all the memory again.
the attached patch is a simplified version of the patch i am using. after stopping the mp3write~ i seem to have to open a dummy.mp3 file to release the other file to make it possible for another application to copy it. for my purpose i would use mode "truncate" of [mp3write~] then, but using modes "truncate" or "append" doesn't seem to make a difference.
using [writesf~] instead of [mp3write~] works. but i need .mp3 files. this happens running pd 0.36-0 on w2k and wxp using mp3write~ version 0.1
help meee youu. joreg.
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
joreg schrieb:
ah thanks. that sounds good. and yes olaf, why not add a "close" message. if you could then even compile with yves new version and tell me when i can download it at http://www.akustische-kunst.org/puredata/winport/winport.html i would say dankeschön a lot.
Okay, there's a new windows version with a close message but is is not equivalent to Yves 0.4 code!!! It seems we somewhere got out of sync. Yves code still requires a Lame DLL in the Windows system directory, the Winport I made has Lame support linked to it statically. I don't have the time right now to fix all that, so there's just the added close message...
Olaf
halo.
ok. but i still see pds memoryusage grow continuously even though i am closing each file now after stopping [mp3write~]. that might still be the thing yves mentioned.
thanks so far. joreg.
OM> joreg schrieb:
ah thanks. that sounds good. and yes olaf, why not add a "close" message. if you could then even compile with yves new version and tell me when i can download it at http://www.akustische-kunst.org/puredata/winport/winport.html i would say dankeschön a lot.
OM> Okay, there's a new windows version with a close message but is is not equivalent to OM> Yves 0.4 code!!! It seems we somewhere got out of sync. Yves code still requires a Lame OM> DLL in the Windows system directory, the Winport I made has Lame support linked to it OM> statically. I don't have the time right now to fix all that, so there's just the added OM> close message...
OM> Olaf
OM> _______________________________________________ OM> PD-list mailing list OM> PD-list@iem.kug.ac.at OM> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
joreg schrieb:
ok. but i still see pds memoryusage grow continuously even though i am closing each file now after stopping [mp3write~]. that might still be the thing yves mentioned.
Okay, I tried to reimplement Yves' changes into my windows port. So please give it a try again and let me know. Yves, could you plaese try if my port compiles on Linux? It would be nice to get them merged for the future to avoid any confusion between the two versions.
http://www.akustische-kunst.org/puredata/winport/mp3write~.zip
Olaf
halo..
thanks olaf for the new version. sory for my delay. ahm.. i tested version 0.4 of [mp3write~] now and have problems recording anything at all. the file that is written to disk has a size >0kb, but winamp and co. say its length is 0. also after stopping recording it always says 'flushed 1796 bytes'. no matter how long i record.
testing shows the same memorybehaviour as before. each time i open>start>stop>close a file memoryuse of pd increases. when i set 'truncate' and use start>stop only memoryusage stays the same.
does that help? joreg.
OM> joreg schrieb:
ok. but i still see pds memoryusage grow continuously even though i am closing each file now after stopping [mp3write~]. that might still be the thing yves mentioned.
OM> Okay, I tried to reimplement Yves' changes into my windows port. So please give it a try again OM> and let me know. Yves, could you plaese try if my port compiles on Linux? It would be nice to OM> get them merged for the future to avoid any confusion between the two versions.
OM> http://www.akustische-kunst.org/puredata/winport/mp3write~.zip
OM> Olaf
OM> _______________________________________________ OM> PD-list mailing list OM> PD-list@iem.kug.ac.at OM> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
Hi Joreg,
I managed to reproduce the increase in memory usage and found the bug. Lame was initialised everytime a new file was opened but only closed once when quiting Pd. This, I think, also applies to the Yves linux version. I've fixed this and upladed the archive on my web site (but it's still called 0.4).
I couldn't reproduce your empty file problem.... I can record as usual and Winamp (2.8) plays all the files as usual. This is on Win2k. You you email me a small mp3 file off the list?
Olaf
joreg schrieb:
halo..
thanks olaf for the new version. sory for my delay. ahm.. i tested version 0.4 of [mp3write~] now and have problems recording anything at all. the file that is written to disk has a size >0kb, but winamp and co. say its length is 0. also after stopping recording it always says 'flushed 1796 bytes'. no matter how long i record.
testing shows the same memorybehaviour as before. each time i open>start>stop>close a file memoryuse of pd increases. when i set 'truncate' and use start>stop only memoryusage stays the same.
does that help? joreg.
OM> joreg schrieb:
ok. but i still see pds memoryusage grow continuously even though i am closing each file now after stopping [mp3write~]. that might still be the thing yves mentioned.
OM> Okay, I tried to reimplement Yves' changes into my windows port. So please give it a try again OM> and let me know. Yves, could you plaese try if my port compiles on Linux? It would be nice to OM> get them merged for the future to avoid any confusion between the two versions.
OM> http://www.akustische-kunst.org/puredata/winport/mp3write~.zip
OM> Olaf
OM> _______________________________________________ OM> PD-list mailing list OM> PD-list@iem.kug.ac.at OM> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
halo olaf.
OM> I managed to reproduce the increase in memory usage and found the bug. Lame was initialised everytime OM> a new file was opened but only closed once when quiting Pd. This, I think, also applies to the Yves OM> linux version. I've fixed this and upladed the archive on my web site (but it's still called 0.4). yes. thats it. memory is no longer growing.
OM> I couldn't reproduce your empty file problem.... I can record as usual and Winamp (2.8) plays all the OM> files as usual. This is on Win2k. You you email me a small mp3 file off the list? hmm.. recording now works again as expected. but i think there are two more things: when i stop recording the console always says 'flushed 1926 bytes' no matter how long i recorded. and i have the feeling that 'truncate' and 'append' make no difference. recording is always appended when i don't close the file and reopen it.
joreg.
OM> Olaf
OM> joreg schrieb:
halo..
thanks olaf for the new version. sory for my delay. ahm.. i tested version 0.4 of [mp3write~] now and have problems recording anything at all. the file that is written to disk has a size >0kb, but winamp and co. say its length is 0. also after stopping recording it always says 'flushed 1796 bytes'. no matter how long i record.
testing shows the same memorybehaviour as before. each time i open>start>stop>close a file memoryuse of pd increases. when i set 'truncate' and use start>stop only memoryusage stays the same.
does that help? joreg.
OM> joreg schrieb:
ok. but i still see pds memoryusage grow continuously even though i am closing each file now after stopping [mp3write~]. that might still be the thing yves mentioned.
OM> Okay, I tried to reimplement Yves' changes into my windows port. So please give it a try again OM> and let me know. Yves, could you plaese try if my port compiles on Linux? It would be nice to OM> get them merged for the future to avoid any confusion between the two versions.
OM> http://www.akustische-kunst.org/puredata/winport/mp3write~.zip
OM> Olaf
OM> _______________________________________________ OM> PD-list mailing list OM> PD-list@iem.kug.ac.at OM> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
--cut here------------------- current: http://vvvv.meso.net llstar: http://joreg.ath.cx
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx
joreg schrieb:
but i think there are two more things: when i stop recording the console always says 'flushed 1926 bytes' no matter how long i recorded.
This could be normal but I'm not shure. On my machine I very often get the same number of samples for quite long times. Anyway, it shouldn't affect the file. It'll just be a very tiny bit shorter.
and i have the feeling that 'truncate' and 'append' make no difference. recording is always appended when i don't close the file and reopen it.
That's the intended behaviour. 'stop' is more a 'pause' than a real stop message. 'play' then 'unpauses' recording.
Olaf
and i have the feeling that 'truncate' and 'append' make no difference. recording is always appended when i don't close the file and reopen it.
OM> That's the intended behaviour. 'stop' is more a 'pause' than a real stop message. 'play' then 'unpauses' OM> recording.
ok. but what is the difference between 'append' and 'truncate' then?
joreg.
joreg schrieb:
OM> That's the intended behaviour. 'stop' is more a 'pause' than a real stop message. 'play' then 'unpauses' OM> recording.
ok. but what is the difference between 'append' and 'truncate' then?
in case you open a file that already exists you can
Olaf
OM> joreg schrieb:
OM> That's the intended behaviour. 'stop' is more a 'pause' than a real stop message. 'play' then 'unpauses' OM> recording.
ok. but what is the difference between 'append' and 'truncate' then?
OM> in case you open a file that already exists you can OM> - in append mode append the new audio data to it's end, keeping the existing data OM> - in truncate mode overwrite existing data
ok. that makes sense. but then i opt for one more message like 'clear' that allows me to erase already recorded sound without having to close and reopen a file (using 'truncate').
thanks so far. joreg.
--cut here------------------- current: http://vvvv.meso.net allstar: http://joreg.ath.cx