Class: SDL2::Mixer::Channels::Group

Inherits:
Object
  • Object
show all
Defined in:
mixer.c

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Object) initialize



523
524
525
526
527
# File 'mixer.c', line 523

static VALUE Group_initialize(VALUE self, VALUE tag)
{
    rb_iv_set(self, "@tag", tag);
    return Qnil;
}

Instance Attribute Details

- (Object) tag (readonly)

Class Method Details

+ (Object) default



529
530
531
532
533
# File 'mixer.c', line 529

static VALUE Group_s_default(VALUE self)
{
    VALUE tag = INT2FIX(-1);
    return rb_class_new_instance(1, &tag, self);
}

Instance Method Details

- (Object) ==



540
541
542
543
544
# File 'mixer.c', line 540

static VALUE Group_eq(VALUE self, VALUE other)
{
    return INT2BOOL(rb_obj_is_instance_of(other, cGroup) &&
                    Group_tag(self) == Group_tag(other));
}

- (Object) add



546
547
548
549
550
551
552
553
# File 'mixer.c', line 546

static VALUE Group_add(VALUE self, VALUE which)
{
    if (!Mix_GroupChannel(NUM2INT(which), Group_tag(self))) {
        SDL_SetError("Cannot add channel %d", NUM2INT(which));
        SDL_ERROR();
    }
    return Qnil;
}

- (Object) available



560
561
562
563
# File 'mixer.c', line 560

static VALUE Group_available(VALUE self)
{
    return INT2NUM(Mix_GroupAvailable(Group_tag(self)));
}

- (Object) count



555
556
557
558
# File 'mixer.c', line 555

static VALUE Group_count(VALUE self)
{
    return INT2NUM(Mix_GroupCount(Group_tag(self)));
}

- (Object) fade_out



575
576
577
578
# File 'mixer.c', line 575

static VALUE Group_fade_out(VALUE self, VALUE ms)
{
    return INT2NUM(Mix_FadeOutGroup(Group_tag(self), NUM2INT(ms)));
}

- (Object) halt



580
581
582
583
584
# File 'mixer.c', line 580

static VALUE Group_halt(VALUE self)
{
    Mix_HaltGroup(Group_tag(self));
    return Qnil;
}

- (Object) newer



570
571
572
573
# File 'mixer.c', line 570

static VALUE Group_newer(VALUE self)
{
    return INT2NUM(Mix_GroupNewer(Group_tag(self)));
}

- (Object) oldest



565
566
567
568
# File 'mixer.c', line 565

static VALUE Group_oldest(VALUE self)
{
    return INT2NUM(Mix_GroupOldest(Group_tag(self)));
}