Exemple #1
0
IoObject *IoVorbisBlock_synthesis(IoVorbisDspState *self, IoObject *locals, IoMessage *m)
{
    /*doc VorbisBlock synthesis(packet)
    Decode the vorbis data from the packet, storing it in the
    block.
    */
    IoOggPacket *packet = IoMessage_locals_oggPacketArgAt_(m, locals, 0);
    int ret = vorbis_synthesis(DATA(self), ((ogg_packet*)(IoObject_dataPointer(packet))));

    return IONUMBER(ret);
}
Exemple #2
0
IoObject *IoTheoraDecodeContext_packetin(IoTheoraDecodeContext *self, IoObject *locals, IoMessage *m)
{
	/*doc TheoraDecodecontext packetin(packet)
	Try to decode a theora frame from the packet.
	*/
        IoOggPacket *packet = IoMessage_locals_oggPacketArgAt_(m, locals, 3);
	int ret = th_decode_packetin(DATA(self)->ctx,
				     ((ogg_packet*)(IoObject_dataPointer(packet))),
				     &(DATA(self)->granulepos));

	return IONUMBER(ret);
}
Exemple #3
0
IoObject *IoTheoraDecodeContext_headerin(IoTheoraDecodeContext *self, IoObject *locals, IoMessage *m)
{
	/*doc TheoraDecodecontext headerin(info, comment, setup, packet)
	Try to decode a theora header from the packet.
	*/
        IoTheoraInfo *info = IoMessage_locals_theoraInfoArgAt_(m, locals, 0);
        IoTheoraComment *comment = IoMessage_locals_theoraCommentArgAt_(m, locals, 1);
        IoTheoraSetupInfo *setup = IoMessage_locals_theoraSetupInfoArgAt_(m, locals, 2);
        IoOggPacket *packet = IoMessage_locals_oggPacketArgAt_(m, locals, 3);
	int ret = th_decode_headerin(((th_info*)(IoObject_dataPointer(info))),
				     ((th_comment*)(IoObject_dataPointer(comment))),
				     ((th_setup_info**)(IoObject_dataPointer(setup))),
				     ((ogg_packet*)(IoObject_dataPointer(packet))));

	return IONUMBER(ret);
}