When I try to encode a sound longer than a few seconds the VM crashes. Could be that the OggPlugin is old... This is on windows.
Karl
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Cheers, - Takashi
karl wrote:
When I try to encode a sound longer than a few seconds the VM crashes. Could be that the OggPlugin is old... This is on windows.
Takashi Yamamiya wrote:
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Hi Takashi, I tested now with the 3.7.1 VM and it still crashes. See attached crash dump log.
It could be that I use the plugin in a wrong way but it do work on mac.
I use the code aSampledSound compressWith: OggVorbisCodec.
The sampled sound is 1.6 megabyte.
Karl
--------------------------------------------------------------------- Thu Dec 06 22:13:15 2007
Exception code: C00000FD Exception addr: 6E969857 EAX:0015EE50 EBX:000AC7E0 ECX:00032A08 EDX:00066B94 ESI:004293C0 EDI:000AC7E0 EBP:0006FAD0 ESP:0006FA00 EIP:6E969857 EFL:00010202 FP Control: FFFF027F FP Status: FFFF4020 FP Tag: FFFFFFFF VM Version: Squeak 3.7.1 (release) from Sep 23 2004 Compiler: gcc 2.95.2 19991024 (release)
Current byte code: 97 Primitive index: 117
Loaded plugins: OggPlugin 10 March 2007 (e) DropPlugin 23 September 2004 (i) LargeIntegers v1.3 23 September 2004 (i) Matrix2x3Plugin 23 September 2004 (i) FloatArrayPlugin 23 September 2004 (i) B2DPlugin 23 September 2004 (i) BitBltPlugin 23 September 2004 (i) SecurityPlugin 23 September 2004 (i) FilePlugin 23 September 2004 (i) MiscPrimitivePlugin 23 September 2004 (i)
Stack dump:
577395452 OggDriver>encodeSoundBuffer: 577395360 OggDriver>compressSound: 577395268 SampledSound>compressWith: 577394992 SoundLibraryTool>compressWithOggVorbis 577393704 [] in MenuItemMorph>invokeWithEvent: 577394440 BlockContext>ensure: 577393152 Cursor>showWhile: 577245412 MenuItemMorph>invokeWithEvent: 577245320 MenuItemMorph>mouseUp: 577245228 MenuItemMorph>handleMouseUp: 577245092 MouseButtonEvent>sentTo: 577245000 Morph>handleEvent: 577244908 MorphicEventDispatcher>dispatchDefault:with: 577244696 MorphicEventDispatcher>dispatchEvent:with: 577244604 Morph>processEvent:using: 577244512 MorphicEventDispatcher>dispatchDefault:with: 577244404 MorphicEventDispatcher>dispatchEvent:with: 577244272 Morph>processEvent:using: 577244180 Morph>processEvent: 577244088 MenuMorph>handleFocusEvent: 577243812 [] in HandMorph>sendFocusEvent:to:clear: 577243904 [] in PasteUpMorph>becomeActiveDuring: 577243720 BlockContext>on:do: 577243628 PasteUpMorph>becomeActiveDuring: 577243444 HandMorph>sendFocusEvent:to:clear: 577243352 HandMorph>sendEvent:focus:clear: 577243260 HandMorph>sendMouseEvent: 577242864 HandMorph>handleEvent: 577242536 HandMorph>processEvents 577242628 [] in WorldState>doOneCycleNowFor: 577242444 SequenceableCollection>do: 577242352 WorldState>handsDo: 577242260 WorldState>doOneCycleNowFor: 577242076 WorldState>doOneCycleFor: 577241984 PasteUpMorph>doOneCycle 572891496 [] in Project class>spawnNewProcess 572891680 [] in BlockContext>newProcess
--------------------------------------------------------------------- Thu Dec 06 22:17:15 2007
Exception code: C00000FD Exception addr: 6E969857 EAX:0015EF80 EBX:0009ED88 ECX:00032A08 EDX:00066BE0 ESI:004293C0 EDI:0009ED88 EBP:0006FAD0 ESP:0006FA00 EIP:6E969857 EFL:00010202 FP Control: FFFF037F FP Status: FFFF4033 FP Tag: FFFFFFFF VM Version: Squeak 3.7.1 (release) from Sep 23 2004 Compiler: gcc 2.95.2 19991024 (release)
Current byte code: 97 Primitive index: 117
Loaded plugins: SoundCodecPrims 23 September 2004 (i) OggPlugin 10 March 2007 (e) DropPlugin 23 September 2004 (i) LargeIntegers v1.3 23 September 2004 (i) Matrix2x3Plugin 23 September 2004 (i) FloatArrayPlugin 23 September 2004 (i) B2DPlugin 23 September 2004 (i) BitBltPlugin 23 September 2004 (i) SecurityPlugin 23 September 2004 (i) FilePlugin 23 September 2004 (i) MiscPrimitivePlugin 23 September 2004 (i)
Stack dump:
68337748 OggDriver>encodeSoundBuffer: 68337628 OggDriver>compressSound: 68337536 SampledSound>compressWith: 68337444 SoundLibraryTool>compressWith: 68337168 SoundLibraryTool>compressWithOggVorbis 68335880 [] in MenuItemMorph>invokeWithEvent: 68336616 BlockContext>ensure: 68335328 Cursor>showWhile: 68307768 MenuItemMorph>invokeWithEvent: 68307676 MenuItemMorph>mouseUp: 68307584 MenuItemMorph>handleMouseUp: 68307448 MouseButtonEvent>sentTo: 68307356 Morph>handleEvent: 68307264 MorphicEventDispatcher>dispatchDefault:with: 68307048 MorphicEventDispatcher>dispatchEvent:with: 68306956 Morph>processEvent:using: 68306864 MorphicEventDispatcher>dispatchDefault:with: 68306756 MorphicEventDispatcher>dispatchEvent:with: 68306624 Morph>processEvent:using: 68306532 Morph>processEvent: 68306440 MenuMorph>handleFocusEvent: 68306164 [] in HandMorph>sendFocusEvent:to:clear: 68306256 [] in PasteUpMorph>becomeActiveDuring: 68306072 BlockContext>on:do: 68305980 PasteUpMorph>becomeActiveDuring: 68305796 HandMorph>sendFocusEvent:to:clear: 68305704 HandMorph>sendEvent:focus:clear: 68305612 HandMorph>sendMouseEvent: 68305216 HandMorph>handleEvent: 68304888 HandMorph>processEvents 68304980 [] in WorldState>doOneCycleNowFor: 68304796 SequenceableCollection>do: 68304704 WorldState>handsDo: 68304612 WorldState>doOneCycleNowFor: 68304428 WorldState>doOneCycleFor: 68304336 PasteUpMorph>doOneCycle 56881692 [] in Project class>spawnNewProcess 56881876 [] in BlockContext>newProcess
karl wrote:
Takashi Yamamiya wrote:
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Hi Takashi, I tested now with the 3.7.1 VM and it still crashes. See attached crash dump log.
It could be that I use the plugin in a wrong way but it do work on mac.
I use the code aSampledSound compressWith: OggVorbisCodec.
The sampled sound is 1.6 megabyte.
I tested again on a Mac and it crashes too with a large SampledSound to encode to OggVorbisCodec. OggSpeexCodec works. Karl
Hi Kerl,
I can reproduce it. Thank you!
This is my excuse. OggPlugin is made for SoundRecoder which uses SequentialSound as internal sound buffer. So I didn't care that such huge chunk of data is passed to the plugin a time. It should be handled as primitiveFailed at least. VM crash is a bug anyway.
Cheers, - Takashi
karl wrote:
karl wrote:
Takashi Yamamiya wrote:
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Hi Takashi, I tested now with the 3.7.1 VM and it still crashes. See attached crash dump log.
It could be that I use the plugin in a wrong way but it do work on mac.
I use the code aSampledSound compressWith: OggVorbisCodec.
The sampled sound is 1.6 megabyte.
I tested again on a Mac and it crashes too with a large SampledSound to encode to OggVorbisCodec. OggSpeexCodec works. Karl
Takashi Yamamiya wrote:
Hi Kerl,
I can reproduce it. Thank you!
This is my excuse. OggPlugin is made for SoundRecoder which uses SequentialSound as internal sound buffer. So I didn't care that such huge chunk of data is passed to the plugin a time. It should be handled as primitiveFailed at least. VM crash is a bug anyway.
So one must send smaller chunks to the plugin. Do you have workaround ? Karl
Cheers,
- Takashi
karl wrote:
karl wrote:
Takashi Yamamiya wrote:
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Hi Takashi, I tested now with the 3.7.1 VM and it still crashes. See attached crash dump log.
It could be that I use the plugin in a wrong way but it do work on mac.
I use the code aSampledSound compressWith: OggVorbisCodec.
The sampled sound is 1.6 megabyte.
I tested again on a Mac and it crashes too with a large SampledSound to encode to OggVorbisCodec. OggSpeexCodec works. Karl
Hi Karl, (sorry I misspelled your name)
2007/12/8, Karl karl.ramberg@comhem.se:
Takashi Yamamiya wrote:
This is my excuse. OggPlugin is made for SoundRecoder which uses SequentialSound as internal sound buffer. So I didn't care that such huge chunk of data is passed to the plugin a time. It should be handled as primitiveFailed at least. VM crash is a bug anyway.
So one must send smaller chunks to the plugin. Do you have workaround ? Karl
Yes, if you can divide SampledSound into a number of SequentialSound for each second, it should work. But I don't know an easy way to convert to SequentialSound. I'll take a look at that. It is a shame.
Cheers, - Takashi
Takashi Yamamiya wrote:
Hi Karl, (sorry I misspelled your name)
2007/12/8, Karl karl.ramberg@comhem.se:
Takashi Yamamiya wrote:
This is my excuse. OggPlugin is made for SoundRecoder which uses SequentialSound as internal sound buffer. So I didn't care that such huge chunk of data is passed to the plugin a time. It should be handled as primitiveFailed at least. VM crash is a bug anyway.
So one must send smaller chunks to the plugin. Do you have workaround ? Karl
Yes, if you can divide SampledSound into a number of SequentialSound for each second, it should work. But I don't know an easy way to convert to SequentialSound. I'll take a look at that. It is a shame.
Don't worry. How about using something like AbstractSound>>playSampleCount: n into: aSoundBuffer startingAt: startIndex
Play a second then encode and repeat ?
Karl
Takashi Yamamiya wrote:
Hi Karl, (sorry I misspelled your name)
2007/12/8, Karl karl.ramberg@comhem.se:
Takashi Yamamiya wrote:
This is my excuse. OggPlugin is made for SoundRecoder which uses SequentialSound as internal sound buffer. So I didn't care that such huge chunk of data is passed to the plugin a time. It should be handled as primitiveFailed at least. VM crash is a bug anyway.
So one must send smaller chunks to the plugin. Do you have workaround ? Karl
Yes, if you can divide SampledSound into a number of SequentialSound for each second, it should work. But I don't know an easy way to convert to SequentialSound. I'll take a look at that. It is a shame.
I made this method: SampledSound>>compressWithOggVorbisCodec | newSound sound samplesPerSecond size buffer startIndex stopIndex tempSound | size := self samples size. startIndex := 1. newSound := SequentialSound new. samplesPerSecond := (self computeSamplesForSeconds: 1) size. 1 to: size by: samplesPerSecond do: [:i | ((stopIndex _ startIndex + samplesPerSecond) > size) ifTrue:[ stopIndex _ size]. buffer := self samples copyFrom: startIndex to: stopIndex. sound := SampledSound samples: buffer samplingRate: self samplingRate. tempSound _ sound compressWith: OggVorbisCodec. newSound add: tempSound. startIndex := stopIndex + 1]. ^ newSound
This method returns a SequentialSound with several SampledSounds compressed with OggVorbis in it. It's not optimal as you can notice the cut between the each sound.
Karl
Hi Karl,
2007/12/9, karl karl.ramberg@comhem.se:
This method returns a SequentialSound with several SampledSounds compressed with OggVorbis in it. It's not optimal as you can notice the cut between the each sound.
Good!
But the reason why the sound was cut is Vorbis encoder has a state. It is better to reuse same encoder in a sequence. I'll put such method into the stream (I'd rather prefer the rewrite #compressWith: itself).
SampledSound>>compressWithOggVorbisCodec | newSound sound samplesPerSecond size buffer startIndex stopIndex tempSound codec | codec := OggVorbisCodec new. size := self samples size. startIndex := 1. newSound := SequentialSound new. samplesPerSecond := (self computeSamplesForSeconds: 1) size. 1 to: size by: samplesPerSecond do: [:i | ((stopIndex _ startIndex + samplesPerSecond) > size) ifTrue:[ stopIndex _ size]. buffer := self samples copyFrom: startIndex to: stopIndex. sound := SampledSound samples: buffer samplingRate: self samplingRate. tempSound := codec compressSound: sound. newSound add: tempSound. startIndex := stopIndex + 1]. ^ newSound
Cheers, - Takashi
Ah, that explains a bit :-) Thanks. Karl
Takashi Yamamiya wrote:
Hi Karl,
2007/12/9, karl karl.ramberg@comhem.se:
This method returns a SequentialSound with several SampledSounds compressed with OggVorbis in it. It's not optimal as you can notice the cut between the each sound.
Good!
But the reason why the sound was cut is Vorbis encoder has a state. It is better to reuse same encoder in a sequence. I'll put such method into the stream (I'd rather prefer the rewrite #compressWith: itself).
SampledSound>>compressWithOggVorbisCodec | newSound sound samplesPerSecond size buffer startIndex stopIndex tempSound codec | codec := OggVorbisCodec new. size := self samples size. startIndex := 1. newSound := SequentialSound new. samplesPerSecond := (self computeSamplesForSeconds: 1) size. 1 to: size by: samplesPerSecond do: [:i | ((stopIndex _ startIndex + samplesPerSecond) > size) ifTrue:[ stopIndex _ size]. buffer := self samples copyFrom: startIndex to: stopIndex. sound := SampledSound samples: buffer samplingRate: self samplingRate. tempSound := codec compressSound: sound. newSound add: tempSound. startIndex := stopIndex + 1]. ^ newSound
Cheers,
- Takashi
Hi Kerl,
Which version of VM do you use? I use Squeak3.7.1 (release) for windows and it works fine. I rescued those files at http://tinlizzie.org/olpc/OggPlugin/ But the files are same as http://metatoys.org/pub/
Cheers, - Takashi
karl wrote:
When I try to encode a sound longer than a few seconds the VM crashes. Could be that the OggPlugin is old... This is on windows.
etoys-dev@lists.squeakfoundation.org