It's a bug, the failure is here: https://github.com/pure-data/pure-data/blob/master/src/d_soundfile.c#L1307 https://github.com/pure-data/pure-data/blob/master/src/d_soundfile.c#L1307
The intent as previously stated is that not supplying a table name should use the value read from the header. However, for raw files there is no header so we *have* to try reading the length of the file. This logic is not working and I will try to fix it now.
Previously, I had a an "info" message which did this separately from "read" when I was overhauling sound file handling, but Miller's suggestion to check for the array name was more elegant.
On Jan 28, 2022, at 9:55 PM, pd-list-request@lists.iem.at wrote:
Message: 3 Date: Fri, 28 Jan 2022 20:55:43 +0000 From: Pierre Alexandre Tremblay <tremblap@gmail.com mailto:tremblap@gmail.com> To: Lucas Cordiviola <lucarda27@hotmail.com mailto:lucarda27@hotmail.com> Cc: pd-list@lists.iem.at mailto:pd-list@lists.iem.at Subject: Re: [PD] [sfinfo~] Message-ID: <AD2AB664-9F51-478E-B643-706BC254D7B6@gmail.com mailto:AD2AB664-9F51-478E-B643-706BC254D7B6@gmail.com> Content-Type: text/plain; charset="utf-8"
In d_soundfile.c around line 1207 we could see if there is only 1 arg left as a else if. If that?s the case, we could just bail down to done: and bob?s your uncle...
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Ok, here is a fix. Please test: https://github.com/pure-data/pure-data/pull/1566 https://github.com/pure-data/pure-data/pull/1566
On Jan 28, 2022, at 11:04 PM, Dan Wilcox danomatika@gmail.com wrote:
It's a bug, the failure is here: https://github.com/pure-data/pure-data/blob/master/src/d_soundfile.c#L1307 https://github.com/pure-data/pure-data/blob/master/src/d_soundfile.c#L1307
The intent as previously stated is that not supplying a table name should use the value read from the header. However, for raw files there is no header so we *have* to try reading the length of the file. This logic is not working and I will try to fix it now.
Previously, I had a an "info" message which did this separately from "read" when I was overhauling sound file handling, but Miller's suggestion to check for the array name was more elegant.
On Jan 28, 2022, at 9:55 PM, pd-list-request@lists.iem.at mailto:pd-list-request@lists.iem.at wrote:
Message: 3 Date: Fri, 28 Jan 2022 20:55:43 +0000 From: Pierre Alexandre Tremblay <tremblap@gmail.com mailto:tremblap@gmail.com> To: Lucas Cordiviola <lucarda27@hotmail.com mailto:lucarda27@hotmail.com> Cc: pd-list@lists.iem.at mailto:pd-list@lists.iem.at Subject: Re: [PD] [sfinfo~] Message-ID: <AD2AB664-9F51-478E-B643-706BC254D7B6@gmail.com mailto:AD2AB664-9F51-478E-B643-706BC254D7B6@gmail.com> Content-Type: text/plain; charset="utf-8"
In d_soundfile.c around line 1207 we could see if there is only 1 arg left as a else if. If that?s the case, we could just bail down to done: and bob?s your uncle...
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Tested on Windows. Works fantastic.
thanks!
Mensaje telepatico asistido por maquinas.
On 1/28/2022 8:29 PM, Dan Wilcox wrote:
Ok, here is a fix. Please test: https://github.com/pure-data/pure-data/pull/1566
On Jan 28, 2022, at 11:04 PM, Dan Wilcox danomatika@gmail.com wrote:
It's a bug, the failure is here: https://github.com/pure-data/pure-data/blob/master/src/d_soundfile.c#L1307
The intent as previously stated is that not supplying a table name should use the value read from the header. However, for raw files there is no header so we *have* to try reading the length of the file. This logic is not working and I will try to fix it now.
Previously, I had a an "info" message which did this separately from "read" when I was overhauling sound file handling, but Miller's suggestion to check for the array name was more elegant.
On Jan 28, 2022, at 9:55 PM, pd-list-request@lists.iem.at wrote:
Message: 3 Date: Fri, 28 Jan 2022 20:55:43 +0000 From: Pierre Alexandre Tremblay tremblap@gmail.com To: Lucas Cordiviola lucarda27@hotmail.com Cc:pd-list@lists.iem.at Subject: Re: [PD] [sfinfo~] Message-ID: AD2AB664-9F51-478E-B643-706BC254D7B6@gmail.com Content-Type: text/plain; charset="utf-8"
In d_soundfile.c around line 1207 we could see if there is only 1 arg left as a else if. If that?s the case, we could just bail down to done: and bob?s your uncle...
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com robotcowboy.com http://robotcowboy.com