More wrong doing what works ?? was(Re: About 7051 and Multilingual-TextConversion)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

More wrong doing what works ?? was(Re: About 7051 and Multilingual-TextConversion)

Edgar J. De Cleene
Folks:

With Jerome Peace help I'm doing the 3.9b7051 version of
Rompecabezas/Puzzle.
We wish have a "applause" .wav noise when game ends.

So I having:

sonido: aWavFilePath
Sonido :=  (RWBinaryOrTextStream with: (FileStream readOnlyFileNamed:
aWavFilePath) contentsOfEntireFile )reset

This method ALWAYS  works before.

But now I should do the following change to system

contentsOfEntireFile
    "Read all of the contents of the receiver."

    | s binary |
    self readOnly.
    binary := self isBinary.
    self converter: Latin1TextConverter new. "MY CHANGE WORKS"
    self reset.    "erases knowledge of whether it is binary"
    binary ifTrue: [self binary].
    s := self next: self size.
    self close.
    ^s

For having

(SampledSound fromWaveStream: PuzzleMorph sonido ) play

With change is working.

Any comments to this ? I on Mac OS X.
You could read a .wav on 3.9 ?

Edgar




       
       
               
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas


Reply | Threaded
Open this post in threaded view
|

Re: More wrong doing what works ?? was(Re: About 7051 and Multilingual-TextConversion)

Yoshiki Ohshima
  Edgar,

> contentsOfEntireFile
>     "Read all of the contents of the receiver."
>
>     | s binary |
>     self readOnly.
>     binary := self isBinary.
>     self converter: Latin1TextConverter new. "MY CHANGE WORKS"
>     self reset.    "erases knowledge of whether it is binary"
>     binary ifTrue: [self binary].
>     s := self next: self size.
>     self close.
>     ^s

  This method is used by many others, including the ones that assumes
text.  The client/user of streams has to aware that what it actually
wants to read.  In this case, probably fixing
SampledSound>>fromWaveStream: is the right thing to do.

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: More wrong doing what works ?? was(Re: About 7051 and Multilingual-TextConversion)

Edgar J. De Cleene
Yoshiki Ohshima puso en su mail :

>   This method is used by many others, including the ones that assumes
> text.  The client/user of streams has to aware that what it actually
> wants to read.  In this case, probably fixing
> SampledSound>>fromWaveStream: is the right thing to do.
>
> -- Yoshiki
Yes. You are right of course.

I only pointing the fact what still exists many undiscovered places in image
and how deal with files / setup of appropriate converter.

I test  again and do a Mantis  report this week end.

Edgar



       
       
               
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas