objc2_avf_audio/generated/
AVMusicEvents.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct AVMusicEvent;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for AVMusicEvent {}
23);
24
25impl AVMusicEvent {
26 extern_methods!();
27}
28
29impl AVMusicEvent {
31 extern_methods!(
32 #[unsafe(method(init))]
33 #[unsafe(method_family = init)]
34 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36 #[unsafe(method(new))]
37 #[unsafe(method_family = new)]
38 pub unsafe fn new() -> Retained<Self>;
39 );
40}
41
42extern_class!(
43 #[unsafe(super(AVMusicEvent, NSObject))]
58 #[derive(Debug, PartialEq, Eq, Hash)]
59 pub struct AVMIDINoteEvent;
60);
61
62extern_conformance!(
63 unsafe impl NSObjectProtocol for AVMIDINoteEvent {}
64);
65
66impl AVMIDINoteEvent {
67 extern_methods!(
68 #[cfg(feature = "AVAudioTypes")]
69 #[unsafe(method(initWithChannel:key:velocity:duration:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithChannel_key_velocity_duration(
81 this: Allocated<Self>,
82 channel: u32,
83 key_num: u32,
84 velocity: u32,
85 duration: AVMusicTimeStamp,
86 ) -> Retained<Self>;
87
88 #[unsafe(method(channel))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn channel(&self) -> u32;
92
93 #[unsafe(method(setChannel:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn setChannel(&self, channel: u32);
97
98 #[unsafe(method(key))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn key(&self) -> u32;
102
103 #[unsafe(method(setKey:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setKey(&self, key: u32);
107
108 #[unsafe(method(velocity))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn velocity(&self) -> u32;
112
113 #[unsafe(method(setVelocity:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setVelocity(&self, velocity: u32);
117
118 #[cfg(feature = "AVAudioTypes")]
119 #[unsafe(method(duration))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn duration(&self) -> AVMusicTimeStamp;
123
124 #[cfg(feature = "AVAudioTypes")]
125 #[unsafe(method(setDuration:))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn setDuration(&self, duration: AVMusicTimeStamp);
129 );
130}
131
132impl AVMIDINoteEvent {
134 extern_methods!(
135 #[unsafe(method(init))]
136 #[unsafe(method_family = init)]
137 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139 #[unsafe(method(new))]
140 #[unsafe(method_family = new)]
141 pub unsafe fn new() -> Retained<Self>;
142 );
143}
144
145extern_class!(
146 #[unsafe(super(AVMusicEvent, NSObject))]
150 #[derive(Debug, PartialEq, Eq, Hash)]
151 pub struct AVMIDIChannelEvent;
152);
153
154extern_conformance!(
155 unsafe impl NSObjectProtocol for AVMIDIChannelEvent {}
156);
157
158impl AVMIDIChannelEvent {
159 extern_methods!(
160 #[unsafe(method(channel))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn channel(&self) -> u32;
164
165 #[unsafe(method(setChannel:))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn setChannel(&self, channel: u32);
169 );
170}
171
172impl AVMIDIChannelEvent {
174 extern_methods!(
175 #[unsafe(method(init))]
176 #[unsafe(method_family = init)]
177 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
178
179 #[unsafe(method(new))]
180 #[unsafe(method_family = new)]
181 pub unsafe fn new() -> Retained<Self>;
182 );
183}
184
185#[repr(transparent)]
190#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
191pub struct AVMIDIControlChangeMessageType(pub NSInteger);
192impl AVMIDIControlChangeMessageType {
193 #[doc(alias = "AVMIDIControlChangeMessageTypeBankSelect")]
194 pub const BankSelect: Self = Self(0);
195 #[doc(alias = "AVMIDIControlChangeMessageTypeModWheel")]
196 pub const ModWheel: Self = Self(1);
197 #[doc(alias = "AVMIDIControlChangeMessageTypeBreath")]
198 pub const Breath: Self = Self(2);
199 #[doc(alias = "AVMIDIControlChangeMessageTypeFoot")]
200 pub const Foot: Self = Self(4);
201 #[doc(alias = "AVMIDIControlChangeMessageTypePortamentoTime")]
202 pub const PortamentoTime: Self = Self(5);
203 #[doc(alias = "AVMIDIControlChangeMessageTypeDataEntry")]
204 pub const DataEntry: Self = Self(6);
205 #[doc(alias = "AVMIDIControlChangeMessageTypeVolume")]
206 pub const Volume: Self = Self(7);
207 #[doc(alias = "AVMIDIControlChangeMessageTypeBalance")]
208 pub const Balance: Self = Self(8);
209 #[doc(alias = "AVMIDIControlChangeMessageTypePan")]
210 pub const Pan: Self = Self(10);
211 #[doc(alias = "AVMIDIControlChangeMessageTypeExpression")]
212 pub const Expression: Self = Self(11);
213 #[doc(alias = "AVMIDIControlChangeMessageTypeSustain")]
214 pub const Sustain: Self = Self(64);
215 #[doc(alias = "AVMIDIControlChangeMessageTypePortamento")]
216 pub const Portamento: Self = Self(65);
217 #[doc(alias = "AVMIDIControlChangeMessageTypeSostenuto")]
218 pub const Sostenuto: Self = Self(66);
219 #[doc(alias = "AVMIDIControlChangeMessageTypeSoft")]
220 pub const Soft: Self = Self(67);
221 #[doc(alias = "AVMIDIControlChangeMessageTypeLegatoPedal")]
222 pub const LegatoPedal: Self = Self(68);
223 #[doc(alias = "AVMIDIControlChangeMessageTypeHold2Pedal")]
224 pub const Hold2Pedal: Self = Self(69);
225 #[doc(alias = "AVMIDIControlChangeMessageTypeFilterResonance")]
226 pub const FilterResonance: Self = Self(71);
227 #[doc(alias = "AVMIDIControlChangeMessageTypeReleaseTime")]
228 pub const ReleaseTime: Self = Self(72);
229 #[doc(alias = "AVMIDIControlChangeMessageTypeAttackTime")]
230 pub const AttackTime: Self = Self(73);
231 #[doc(alias = "AVMIDIControlChangeMessageTypeBrightness")]
232 pub const Brightness: Self = Self(74);
233 #[doc(alias = "AVMIDIControlChangeMessageTypeDecayTime")]
234 pub const DecayTime: Self = Self(75);
235 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoRate")]
236 pub const VibratoRate: Self = Self(76);
237 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoDepth")]
238 pub const VibratoDepth: Self = Self(77);
239 #[doc(alias = "AVMIDIControlChangeMessageTypeVibratoDelay")]
240 pub const VibratoDelay: Self = Self(78);
241 #[doc(alias = "AVMIDIControlChangeMessageTypeReverbLevel")]
242 pub const ReverbLevel: Self = Self(91);
243 #[doc(alias = "AVMIDIControlChangeMessageTypeChorusLevel")]
244 pub const ChorusLevel: Self = Self(93);
245 #[doc(alias = "AVMIDIControlChangeMessageTypeRPN_LSB")]
246 pub const RPN_LSB: Self = Self(100);
247 #[doc(alias = "AVMIDIControlChangeMessageTypeRPN_MSB")]
248 pub const RPN_MSB: Self = Self(101);
249 #[doc(alias = "AVMIDIControlChangeMessageTypeAllSoundOff")]
250 pub const AllSoundOff: Self = Self(120);
251 #[doc(alias = "AVMIDIControlChangeMessageTypeResetAllControllers")]
252 pub const ResetAllControllers: Self = Self(121);
253 #[doc(alias = "AVMIDIControlChangeMessageTypeAllNotesOff")]
254 pub const AllNotesOff: Self = Self(123);
255 #[doc(alias = "AVMIDIControlChangeMessageTypeOmniModeOff")]
256 pub const OmniModeOff: Self = Self(124);
257 #[doc(alias = "AVMIDIControlChangeMessageTypeOmniModeOn")]
258 pub const OmniModeOn: Self = Self(125);
259 #[doc(alias = "AVMIDIControlChangeMessageTypeMonoModeOn")]
260 pub const MonoModeOn: Self = Self(126);
261 #[doc(alias = "AVMIDIControlChangeMessageTypeMonoModeOff")]
262 pub const MonoModeOff: Self = Self(127);
263}
264
265unsafe impl Encode for AVMIDIControlChangeMessageType {
266 const ENCODING: Encoding = NSInteger::ENCODING;
267}
268
269unsafe impl RefEncode for AVMIDIControlChangeMessageType {
270 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
271}
272
273extern_class!(
274 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
278 #[derive(Debug, PartialEq, Eq, Hash)]
279 pub struct AVMIDIControlChangeEvent;
280);
281
282extern_conformance!(
283 unsafe impl NSObjectProtocol for AVMIDIControlChangeEvent {}
284);
285
286impl AVMIDIControlChangeEvent {
287 extern_methods!(
288 #[unsafe(method(initWithChannel:messageType:value:))]
296 #[unsafe(method_family = init)]
297 pub unsafe fn initWithChannel_messageType_value(
298 this: Allocated<Self>,
299 channel: u32,
300 message_type: AVMIDIControlChangeMessageType,
301 value: u32,
302 ) -> Retained<Self>;
303
304 #[unsafe(method(messageType))]
306 #[unsafe(method_family = none)]
307 pub unsafe fn messageType(&self) -> AVMIDIControlChangeMessageType;
308
309 #[unsafe(method(value))]
311 #[unsafe(method_family = none)]
312 pub unsafe fn value(&self) -> u32;
313 );
314}
315
316impl AVMIDIControlChangeEvent {
318 extern_methods!(
319 #[unsafe(method(init))]
320 #[unsafe(method_family = init)]
321 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
322
323 #[unsafe(method(new))]
324 #[unsafe(method_family = new)]
325 pub unsafe fn new() -> Retained<Self>;
326 );
327}
328
329extern_class!(
330 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
334 #[derive(Debug, PartialEq, Eq, Hash)]
335 pub struct AVMIDIPolyPressureEvent;
336);
337
338extern_conformance!(
339 unsafe impl NSObjectProtocol for AVMIDIPolyPressureEvent {}
340);
341
342impl AVMIDIPolyPressureEvent {
343 extern_methods!(
344 #[unsafe(method(initWithChannel:key:pressure:))]
352 #[unsafe(method_family = init)]
353 pub unsafe fn initWithChannel_key_pressure(
354 this: Allocated<Self>,
355 channel: u32,
356 key: u32,
357 pressure: u32,
358 ) -> Retained<Self>;
359
360 #[unsafe(method(key))]
362 #[unsafe(method_family = none)]
363 pub unsafe fn key(&self) -> u32;
364
365 #[unsafe(method(setKey:))]
367 #[unsafe(method_family = none)]
368 pub unsafe fn setKey(&self, key: u32);
369
370 #[unsafe(method(pressure))]
372 #[unsafe(method_family = none)]
373 pub unsafe fn pressure(&self) -> u32;
374
375 #[unsafe(method(setPressure:))]
377 #[unsafe(method_family = none)]
378 pub unsafe fn setPressure(&self, pressure: u32);
379 );
380}
381
382impl AVMIDIPolyPressureEvent {
384 extern_methods!(
385 #[unsafe(method(init))]
386 #[unsafe(method_family = init)]
387 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
388
389 #[unsafe(method(new))]
390 #[unsafe(method_family = new)]
391 pub unsafe fn new() -> Retained<Self>;
392 );
393}
394
395extern_class!(
396 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
402 #[derive(Debug, PartialEq, Eq, Hash)]
403 pub struct AVMIDIProgramChangeEvent;
404);
405
406extern_conformance!(
407 unsafe impl NSObjectProtocol for AVMIDIProgramChangeEvent {}
408);
409
410impl AVMIDIProgramChangeEvent {
411 extern_methods!(
412 #[unsafe(method(initWithChannel:programNumber:))]
421 #[unsafe(method_family = init)]
422 pub unsafe fn initWithChannel_programNumber(
423 this: Allocated<Self>,
424 channel: u32,
425 program_number: u32,
426 ) -> Retained<Self>;
427
428 #[unsafe(method(programNumber))]
430 #[unsafe(method_family = none)]
431 pub unsafe fn programNumber(&self) -> u32;
432
433 #[unsafe(method(setProgramNumber:))]
435 #[unsafe(method_family = none)]
436 pub unsafe fn setProgramNumber(&self, program_number: u32);
437 );
438}
439
440impl AVMIDIProgramChangeEvent {
442 extern_methods!(
443 #[unsafe(method(init))]
444 #[unsafe(method_family = init)]
445 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
446
447 #[unsafe(method(new))]
448 #[unsafe(method_family = new)]
449 pub unsafe fn new() -> Retained<Self>;
450 );
451}
452
453extern_class!(
454 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
461 #[derive(Debug, PartialEq, Eq, Hash)]
462 pub struct AVMIDIChannelPressureEvent;
463);
464
465extern_conformance!(
466 unsafe impl NSObjectProtocol for AVMIDIChannelPressureEvent {}
467);
468
469impl AVMIDIChannelPressureEvent {
470 extern_methods!(
471 #[unsafe(method(initWithChannel:pressure:))]
477 #[unsafe(method_family = init)]
478 pub unsafe fn initWithChannel_pressure(
479 this: Allocated<Self>,
480 channel: u32,
481 pressure: u32,
482 ) -> Retained<Self>;
483
484 #[unsafe(method(pressure))]
486 #[unsafe(method_family = none)]
487 pub unsafe fn pressure(&self) -> u32;
488
489 #[unsafe(method(setPressure:))]
491 #[unsafe(method_family = none)]
492 pub unsafe fn setPressure(&self, pressure: u32);
493 );
494}
495
496impl AVMIDIChannelPressureEvent {
498 extern_methods!(
499 #[unsafe(method(init))]
500 #[unsafe(method_family = init)]
501 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
502
503 #[unsafe(method(new))]
504 #[unsafe(method_family = new)]
505 pub unsafe fn new() -> Retained<Self>;
506 );
507}
508
509extern_class!(
510 #[unsafe(super(AVMIDIChannelEvent, AVMusicEvent, NSObject))]
517 #[derive(Debug, PartialEq, Eq, Hash)]
518 pub struct AVMIDIPitchBendEvent;
519);
520
521extern_conformance!(
522 unsafe impl NSObjectProtocol for AVMIDIPitchBendEvent {}
523);
524
525impl AVMIDIPitchBendEvent {
526 extern_methods!(
527 #[unsafe(method(initWithChannel:value:))]
533 #[unsafe(method_family = init)]
534 pub unsafe fn initWithChannel_value(
535 this: Allocated<Self>,
536 channel: u32,
537 value: u32,
538 ) -> Retained<Self>;
539
540 #[unsafe(method(value))]
542 #[unsafe(method_family = none)]
543 pub unsafe fn value(&self) -> u32;
544
545 #[unsafe(method(setValue:))]
547 #[unsafe(method_family = none)]
548 pub unsafe fn setValue(&self, value: u32);
549 );
550}
551
552impl AVMIDIPitchBendEvent {
554 extern_methods!(
555 #[unsafe(method(init))]
556 #[unsafe(method_family = init)]
557 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
558
559 #[unsafe(method(new))]
560 #[unsafe(method_family = new)]
561 pub unsafe fn new() -> Retained<Self>;
562 );
563}
564
565extern_class!(
566 #[unsafe(super(AVMusicEvent, NSObject))]
572 #[derive(Debug, PartialEq, Eq, Hash)]
573 pub struct AVMIDISysexEvent;
574);
575
576extern_conformance!(
577 unsafe impl NSObjectProtocol for AVMIDISysexEvent {}
578);
579
580impl AVMIDISysexEvent {
581 extern_methods!(
582 #[unsafe(method(initWithData:))]
586 #[unsafe(method_family = init)]
587 pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
588
589 #[unsafe(method(sizeInBytes))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn sizeInBytes(&self) -> u32;
593 );
594}
595
596impl AVMIDISysexEvent {
598 extern_methods!(
599 #[unsafe(method(init))]
600 #[unsafe(method_family = init)]
601 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
602
603 #[unsafe(method(new))]
604 #[unsafe(method_family = new)]
605 pub unsafe fn new() -> Retained<Self>;
606 );
607}
608
609#[repr(transparent)]
614#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
615pub struct AVMIDIMetaEventType(pub NSInteger);
616impl AVMIDIMetaEventType {
617 #[doc(alias = "AVMIDIMetaEventTypeSequenceNumber")]
618 pub const SequenceNumber: Self = Self(0x00);
619 #[doc(alias = "AVMIDIMetaEventTypeText")]
620 pub const Text: Self = Self(0x01);
621 #[doc(alias = "AVMIDIMetaEventTypeCopyright")]
622 pub const Copyright: Self = Self(0x02);
623 #[doc(alias = "AVMIDIMetaEventTypeTrackName")]
624 pub const TrackName: Self = Self(0x03);
625 #[doc(alias = "AVMIDIMetaEventTypeInstrument")]
626 pub const Instrument: Self = Self(0x04);
627 #[doc(alias = "AVMIDIMetaEventTypeLyric")]
628 pub const Lyric: Self = Self(0x05);
629 #[doc(alias = "AVMIDIMetaEventTypeMarker")]
630 pub const Marker: Self = Self(0x06);
631 #[doc(alias = "AVMIDIMetaEventTypeCuePoint")]
632 pub const CuePoint: Self = Self(0x07);
633 #[doc(alias = "AVMIDIMetaEventTypeMidiChannel")]
634 pub const MidiChannel: Self = Self(0x20);
635 #[doc(alias = "AVMIDIMetaEventTypeMidiPort")]
636 pub const MidiPort: Self = Self(0x21);
637 #[doc(alias = "AVMIDIMetaEventTypeEndOfTrack")]
638 pub const EndOfTrack: Self = Self(0x2f);
639 #[doc(alias = "AVMIDIMetaEventTypeTempo")]
640 pub const Tempo: Self = Self(0x51);
641 #[doc(alias = "AVMIDIMetaEventTypeSmpteOffset")]
642 pub const SmpteOffset: Self = Self(0x54);
643 #[doc(alias = "AVMIDIMetaEventTypeTimeSignature")]
644 pub const TimeSignature: Self = Self(0x58);
645 #[doc(alias = "AVMIDIMetaEventTypeKeySignature")]
646 pub const KeySignature: Self = Self(0x59);
647 #[doc(alias = "AVMIDIMetaEventTypeProprietaryEvent")]
648 pub const ProprietaryEvent: Self = Self(0x7f);
649}
650
651unsafe impl Encode for AVMIDIMetaEventType {
652 const ENCODING: Encoding = NSInteger::ENCODING;
653}
654
655unsafe impl RefEncode for AVMIDIMetaEventType {
656 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
657}
658
659extern_class!(
660 #[unsafe(super(AVMusicEvent, NSObject))]
671 #[derive(Debug, PartialEq, Eq, Hash)]
672 pub struct AVMIDIMetaEvent;
673);
674
675extern_conformance!(
676 unsafe impl NSObjectProtocol for AVMIDIMetaEvent {}
677);
678
679impl AVMIDIMetaEvent {
680 extern_methods!(
681 #[unsafe(method(initWithType:data:))]
687 #[unsafe(method_family = init)]
688 pub unsafe fn initWithType_data(
689 this: Allocated<Self>,
690 r#type: AVMIDIMetaEventType,
691 data: &NSData,
692 ) -> Retained<Self>;
693
694 #[unsafe(method(type))]
696 #[unsafe(method_family = none)]
697 pub unsafe fn r#type(&self) -> AVMIDIMetaEventType;
698 );
699}
700
701impl AVMIDIMetaEvent {
703 extern_methods!(
704 #[unsafe(method(init))]
705 #[unsafe(method_family = init)]
706 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
707
708 #[unsafe(method(new))]
709 #[unsafe(method_family = new)]
710 pub unsafe fn new() -> Retained<Self>;
711 );
712}
713
714extern_class!(
715 #[unsafe(super(AVMusicEvent, NSObject))]
724 #[derive(Debug, PartialEq, Eq, Hash)]
725 pub struct AVMusicUserEvent;
726);
727
728extern_conformance!(
729 unsafe impl NSObjectProtocol for AVMusicUserEvent {}
730);
731
732impl AVMusicUserEvent {
733 extern_methods!(
734 #[unsafe(method(initWithData:))]
738 #[unsafe(method_family = init)]
739 pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
740
741 #[unsafe(method(sizeInBytes))]
743 #[unsafe(method_family = none)]
744 pub unsafe fn sizeInBytes(&self) -> u32;
745 );
746}
747
748impl AVMusicUserEvent {
750 extern_methods!(
751 #[unsafe(method(init))]
752 #[unsafe(method_family = init)]
753 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
754
755 #[unsafe(method(new))]
756 #[unsafe(method_family = new)]
757 pub unsafe fn new() -> Retained<Self>;
758 );
759}
760
761extern "C" {
762 pub static AVExtendedNoteOnEventDefaultInstrument: u32;
768}
769
770extern_class!(
771 #[unsafe(super(AVMusicEvent, NSObject))]
780 #[derive(Debug, PartialEq, Eq, Hash)]
781 pub struct AVExtendedNoteOnEvent;
782);
783
784extern_conformance!(
785 unsafe impl NSObjectProtocol for AVExtendedNoteOnEvent {}
786);
787
788impl AVExtendedNoteOnEvent {
789 extern_methods!(
790 #[cfg(feature = "AVAudioTypes")]
791 #[unsafe(method(initWithMIDINote:velocity:groupID:duration:))]
803 #[unsafe(method_family = init)]
804 pub unsafe fn initWithMIDINote_velocity_groupID_duration(
805 this: Allocated<Self>,
806 midi_note: c_float,
807 velocity: c_float,
808 group_id: u32,
809 duration: AVMusicTimeStamp,
810 ) -> Retained<Self>;
811
812 #[cfg(feature = "AVAudioTypes")]
813 #[unsafe(method(initWithMIDINote:velocity:instrumentID:groupID:duration:))]
819 #[unsafe(method_family = init)]
820 pub unsafe fn initWithMIDINote_velocity_instrumentID_groupID_duration(
821 this: Allocated<Self>,
822 midi_note: c_float,
823 velocity: c_float,
824 instrument_id: u32,
825 group_id: u32,
826 duration: AVMusicTimeStamp,
827 ) -> Retained<Self>;
828
829 #[unsafe(method(midiNote))]
833 #[unsafe(method_family = none)]
834 pub unsafe fn midiNote(&self) -> c_float;
835
836 #[unsafe(method(setMidiNote:))]
838 #[unsafe(method_family = none)]
839 pub unsafe fn setMidiNote(&self, midi_note: c_float);
840
841 #[unsafe(method(velocity))]
845 #[unsafe(method_family = none)]
846 pub unsafe fn velocity(&self) -> c_float;
847
848 #[unsafe(method(setVelocity:))]
850 #[unsafe(method_family = none)]
851 pub unsafe fn setVelocity(&self, velocity: c_float);
852
853 #[unsafe(method(instrumentID))]
855 #[unsafe(method_family = none)]
856 pub unsafe fn instrumentID(&self) -> u32;
857
858 #[unsafe(method(setInstrumentID:))]
860 #[unsafe(method_family = none)]
861 pub unsafe fn setInstrumentID(&self, instrument_id: u32);
862
863 #[unsafe(method(groupID))]
867 #[unsafe(method_family = none)]
868 pub unsafe fn groupID(&self) -> u32;
869
870 #[unsafe(method(setGroupID:))]
872 #[unsafe(method_family = none)]
873 pub unsafe fn setGroupID(&self, group_id: u32);
874
875 #[cfg(feature = "AVAudioTypes")]
876 #[unsafe(method(duration))]
878 #[unsafe(method_family = none)]
879 pub unsafe fn duration(&self) -> AVMusicTimeStamp;
880
881 #[cfg(feature = "AVAudioTypes")]
882 #[unsafe(method(setDuration:))]
884 #[unsafe(method_family = none)]
885 pub unsafe fn setDuration(&self, duration: AVMusicTimeStamp);
886 );
887}
888
889impl AVExtendedNoteOnEvent {
891 extern_methods!(
892 #[unsafe(method(init))]
893 #[unsafe(method_family = init)]
894 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
895
896 #[unsafe(method(new))]
897 #[unsafe(method_family = new)]
898 pub unsafe fn new() -> Retained<Self>;
899 );
900}
901
902extern_class!(
903 #[unsafe(super(AVMusicEvent, NSObject))]
915 #[derive(Debug, PartialEq, Eq, Hash)]
916 pub struct AVParameterEvent;
917);
918
919extern_conformance!(
920 unsafe impl NSObjectProtocol for AVParameterEvent {}
921);
922
923impl AVParameterEvent {
924 extern_methods!(
925 #[unsafe(method(initWithParameterID:scope:element:value:))]
935 #[unsafe(method_family = init)]
936 pub unsafe fn initWithParameterID_scope_element_value(
937 this: Allocated<Self>,
938 parameter_id: u32,
939 scope: u32,
940 element: u32,
941 value: c_float,
942 ) -> Retained<Self>;
943
944 #[unsafe(method(parameterID))]
946 #[unsafe(method_family = none)]
947 pub unsafe fn parameterID(&self) -> u32;
948
949 #[unsafe(method(setParameterID:))]
951 #[unsafe(method_family = none)]
952 pub unsafe fn setParameterID(&self, parameter_id: u32);
953
954 #[unsafe(method(scope))]
956 #[unsafe(method_family = none)]
957 pub unsafe fn scope(&self) -> u32;
958
959 #[unsafe(method(setScope:))]
961 #[unsafe(method_family = none)]
962 pub unsafe fn setScope(&self, scope: u32);
963
964 #[unsafe(method(element))]
966 #[unsafe(method_family = none)]
967 pub unsafe fn element(&self) -> u32;
968
969 #[unsafe(method(setElement:))]
971 #[unsafe(method_family = none)]
972 pub unsafe fn setElement(&self, element: u32);
973
974 #[unsafe(method(value))]
976 #[unsafe(method_family = none)]
977 pub unsafe fn value(&self) -> c_float;
978
979 #[unsafe(method(setValue:))]
981 #[unsafe(method_family = none)]
982 pub unsafe fn setValue(&self, value: c_float);
983 );
984}
985
986impl AVParameterEvent {
988 extern_methods!(
989 #[unsafe(method(init))]
990 #[unsafe(method_family = init)]
991 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
992
993 #[unsafe(method(new))]
994 #[unsafe(method_family = new)]
995 pub unsafe fn new() -> Retained<Self>;
996 );
997}
998
999extern_class!(
1000 #[unsafe(super(AVMusicEvent, NSObject))]
1007 #[derive(Debug, PartialEq, Eq, Hash)]
1008 pub struct AVAUPresetEvent;
1009);
1010
1011extern_conformance!(
1012 unsafe impl NSObjectProtocol for AVAUPresetEvent {}
1013);
1014
1015impl AVAUPresetEvent {
1016 extern_methods!(
1017 #[unsafe(method(initWithScope:element:dictionary:))]
1029 #[unsafe(method_family = init)]
1030 pub unsafe fn initWithScope_element_dictionary(
1031 this: Allocated<Self>,
1032 scope: u32,
1033 element: u32,
1034 preset_dictionary: &NSDictionary,
1035 ) -> Retained<Self>;
1036
1037 #[unsafe(method(scope))]
1039 #[unsafe(method_family = none)]
1040 pub unsafe fn scope(&self) -> u32;
1041
1042 #[unsafe(method(setScope:))]
1044 #[unsafe(method_family = none)]
1045 pub unsafe fn setScope(&self, scope: u32);
1046
1047 #[unsafe(method(element))]
1049 #[unsafe(method_family = none)]
1050 pub unsafe fn element(&self) -> u32;
1051
1052 #[unsafe(method(setElement:))]
1054 #[unsafe(method_family = none)]
1055 pub unsafe fn setElement(&self, element: u32);
1056
1057 #[unsafe(method(presetDictionary))]
1059 #[unsafe(method_family = none)]
1060 pub unsafe fn presetDictionary(&self) -> Retained<NSDictionary>;
1061 );
1062}
1063
1064impl AVAUPresetEvent {
1066 extern_methods!(
1067 #[unsafe(method(init))]
1068 #[unsafe(method_family = init)]
1069 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1070
1071 #[unsafe(method(new))]
1072 #[unsafe(method_family = new)]
1073 pub unsafe fn new() -> Retained<Self>;
1074 );
1075}
1076
1077extern_class!(
1078 #[unsafe(super(AVMusicEvent, NSObject))]
1085 #[derive(Debug, PartialEq, Eq, Hash)]
1086 pub struct AVExtendedTempoEvent;
1087);
1088
1089extern_conformance!(
1090 unsafe impl NSObjectProtocol for AVExtendedTempoEvent {}
1091);
1092
1093impl AVExtendedTempoEvent {
1094 extern_methods!(
1095 #[unsafe(method(initWithTempo:))]
1100 #[unsafe(method_family = init)]
1101 pub unsafe fn initWithTempo(this: Allocated<Self>, tempo: c_double) -> Retained<Self>;
1102
1103 #[unsafe(method(tempo))]
1105 #[unsafe(method_family = none)]
1106 pub unsafe fn tempo(&self) -> c_double;
1107
1108 #[unsafe(method(setTempo:))]
1110 #[unsafe(method_family = none)]
1111 pub unsafe fn setTempo(&self, tempo: c_double);
1112 );
1113}
1114
1115impl AVExtendedTempoEvent {
1117 extern_methods!(
1118 #[unsafe(method(init))]
1119 #[unsafe(method_family = init)]
1120 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1121
1122 #[unsafe(method(new))]
1123 #[unsafe(method_family = new)]
1124 pub unsafe fn new() -> Retained<Self>;
1125 );
1126}