Mac Developer Library

Developer

DRMSF Class Reference

Options
Deployment Target:

On This Page
Language:

DRMSF

Representation of a time interval expressed in minutes, seconds and frames.

On CDs, minutes/seconds/frames are used to identify positioning on a disc (which is most useful on an audio disc), but applies to any position on a disc no matter what type of data is present.

A frame is equivalent to a sector or block in normal disk parlance. 75 frames make up one second, so a 2 second pause (typical pregap size) is 150 frames.

Inheritance


Conforms To


Import Statement


Swift

import DiscRecording

Objective-C

@import DiscRecording;

Availability


Available in OS X v10.2 and later.
  • Returns a textual representation of the receiver.

    Declaration

    Swift

    func description() -> String!

    Objective-C

    - (NSString *)description

    Return Value

    NSString containing a textual representation of the object with the standard formatting.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns a textual representation of the receiver.

    Declaration

    Swift

    func descriptionWithFormat(_ format: String!) -> String!

    Objective-C

    - (NSString *)descriptionWithFormat:(NSString *)format

    Parameters

    format

    The format of the description string.

    Return Value

    NSString containing a textual representation of the object utilizing the specified format.

    Discussion

    The format string is very similar to a printf-style format string with %-escaped formatting characters.

    • %% A "%" character

    • %m Minutes as a decimal number

    • %s Seconds as a decimal number

    • %f Frames as a decimal number

    In addition to these formatting characters an optional length specifier can come between then % and the formatting character. This length specifier will force the field in question to be at least that wide. For example a format specifier of "%02m:%02s" will cause a DRMSF object representing 3 minutes 9 seconds to be formatted as "03:09".

    A formatter is aware of and respects rounding. If a bit of the msf is not zero, but the format does not display that value, the next higher value will be increased by one to reflect that. Extending our example above, an DRMSF with a value of 3 minutes, 9 seconds, 15 frames using a format specfier of "%02m:%02s", will be formatted as "03:10" since the 15 frames rounds up the seconds to the next value

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the number of frames represented by the receiver.

    Declaration

    Swift

    func frames() -> UInt32

    Objective-C

    - (UInt32)frames

    Discussion

    This method differs from sectors in that it returns to the caller the number of frames remaining in the current second. For example an DRMSF value of 5:30:72 will return 72 from a message to frames .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Initializes an msf object whose length is frames.

    Declaration

    Swift

    init!(frames frames: UInt32)

    Objective-C

    - (id)initWithFrames:(UInt32)frames

    Return Value

    A DRMSF object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Initializes an msf object initialized to the value represented by string

    Declaration

    Swift

    init!(string string: String!)

    Objective-C

    - (id)initWithString:(NSString *)string

    Return Value

    A DRMSF object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Compares on emsf to another.

    Declaration

    Swift

    func isEqualToMSF(_ otherDRMSF: DRMSF!) -> Bool

    Objective-C

    - (BOOL)isEqualToMSF:(DRMSF *)otherDRMSF

    Parameters

    otherDRMSF

    The msf to compare to the receiver

    Return Value

    YES if the two object are equal, NO otherwise.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the number of minutes represented by the receiver.

    Declaration

    Swift

    func minutes() -> UInt32

    Objective-C

    - (UInt32)minutes

    Discussion

    If the receiver represents a non integral number of minutes, only the whole minute value is returned. For example an DRMSF value of 5:30:72 will return 5 from a message to minutes .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Adds an msf to the receiver.

    Declaration

    Swift

    func msfByAdding(_ msf: DRMSF!) -> DRMSF!

    Objective-C

    - (DRMSF *)msfByAdding:(DRMSF *)msf

    Parameters

    msf

    The msf to add to the receiver

    Return Value

    A new DRMSF object totalling the sum of the reciever and msf

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Subtracts an msf to the receiver.

    Declaration

    Swift

    func msfBySubtracting(_ msf: DRMSF!) -> DRMSF!

    Objective-C

    - (DRMSF *)msfBySubtracting:(DRMSF *)msf

    Parameters

    msf

    The msf to subtract from the receiver

    Return Value

    A new DRMSF object totalling the difference of the reciever and msf

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the number of seconds represented by the receiver.

    Declaration

    Swift

    func seconds() -> UInt32

    Objective-C

    - (UInt32)seconds

    Discussion

    If the receiver represents a non integral number of seconds, only the whole second value is returned. For example an DRMSF value of 5:30:72 will return 30 from a message to seconds .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Returns the total number of frames/sectors represented by the receiver.

    Declaration

    Swift

    func sectors() -> UInt32

    Objective-C

    - (UInt32)sectors

    Discussion

    This method differs from frames in that it returns to the caller the total number of frames/sectors represented by the object. For example an DRMSF value of 5:30:72 will return 24822 from a message to sectors .

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates an msf object with no length/time.

    Declaration

    Swift

    class func msf() -> DRMSF!

    Objective-C

    + (DRMSF *)msf

    Return Value

    An autoreleased DRMSF object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates an msf object whose length is frames.

    Declaration

    Swift

    class func msfWithFrames(_ frames: UInt32) -> DRMSF!

    Objective-C

    + (DRMSF *)msfWithFrames:(UInt32)frames

    Return Value

    An autoreleased DRMSF object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.

  • Creates an msf object initialized to the value represented by string

    Declaration

    Swift

    class func msfWithString(_ string: String!) -> DRMSF!

    Objective-C

    + (DRMSF *)msfWithString:(NSString *)string

    Return Value

    An autoreleased DRMSF object.

    Import Statement

    Objective-C

    @import DiscRecording;

    Swift

    import DiscRecording

    Availability

    Available in OS X v10.2 and later.