func fromPacket(op *ogg.Packet) *C.ogg_packet { if op == nil { return nil } cp := C.ogg_packet{} if op.Packet != nil { cp.packet = (*C.uchar)(unsafe.Pointer(&op.Packet[0])) cp.bytes = C.long(len(op.Packet)) } if op.BOS { cp.b_o_s = 1 } if op.EOS { cp.e_o_s = 1 } cp.granulepos = C.ogg_int64_t(op.GranulePos) cp.packetno = C.ogg_int64_t(op.PacketNo) return &cp }
func GranuleTime(v *DspState, granulepos int64) float64 { return float64(C.vorbis_granule_time((*C.vorbis_dsp_state)(v), C.ogg_int64_t(granulepos))) }