That looks like an empty IFF file.
Anyhow...problem solved. The scientific method at work.
MultiView can now open a Wav file and Save As IFF to save an 8SVX file.
There were actually two problems. In Sound Datatype the Sound_Write function is the SuperMethod. Normally a datatype has two methods: OM_NEW & DTM_WRITE. The first links the Load function of the datatype with Datatypes Library for getting new datatypes. The second links the Save function of
the datatype or if DT Write Method is not DTWM_RAW then it is supposed to defer to the SuperMethod.In this case it would send the DTWM_IFF message to the Sound Datatype function Sound_Write.
But as I mentioned earlier the Sound_Write function in Sound Datatype doesn't have an allowance for DTWM_IFF only DTWM_RAW. So I added a new method for Sound Datatype as follows in dispatch.c:
if( dtw->MethodID == DTM_WRITE && dtw->dtw_Mode == DTWM_IFF )
{
dbug( kprintf( "My dtw_Mode = DTWM_IFF\n" ); )
D(bug("[sound.datatype] - My dtw_Mode = DTWM_IFF\n"));
err = WriteSVX( cb, o, iff, id );
}
So if the DT Write Method is DTWM_IFF I'm forcing it to convert and save as an IFF-8SVX file.
The second problem I already alluded to...the Wave Datatype DTM_WRITE method was missing some important information. It was missing the part that sends it to the SuperMethod in Sound Datatype.
else
{
/* Pass msg to superclass (which writes an IFF-8SVX sound file)... */
return DoSuperMethodA( cl, obj, (Msg)msg );
}
After those two minor changes I can now open a Wave file and Save As IFF-8SVX. Nice!