Пример #1
0
 internal Sample(NativeType _sample)
 {
     // Note: copies are made here. Could we avoid this ?
     this.ResName = ZTypes.ZStringToString(_sample.key);
     this.Payload = ZTypes.ZBytesToBytesArray(_sample.value);
     ZnSampleFree(_sample);
 }
Пример #2
0
        unsafe internal Sample(IntPtr /* *const zn_sample_t */ _sample)
        {
            // Note: copies are made here. Could we avoid this ?
            NativeType *s = (NativeType *)_sample;

            this.ResName = ZTypes.ZStringToString(s->key);
            this.Payload = ZTypes.ZBytesToBytesArray(s->value);
        }