File:  [NeXTSTEP 3.3 examples] / Examples / SoundAndMusic / SoundKit / SoundEditor / ScrollingSound.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:25 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/*
 * You may freely copy, distribute and reuse the code in this example.  
 * NeXT disclaims any warranty of any kind, expressed or implied, as to 
 * its fitness for any particular use.
 */


#import "ScrollingSound.h"
#import <soundkit/soundkit.h>

@implementation ScrollingSound

- initFrame:(NXRect const *)theFrame
{
    NXRect tempRect = *theFrame;
    id theSoundView;
    int borderType = NX_NOBORDER;
    
    [ScrollView getContentSize:&tempRect.size forFrameSize:&theFrame->size
    		horizScroller:YES vertScroller:NO borderType:borderType];
    theSoundView = [[SoundView alloc] initFrame:&tempRect];
    [theSoundView setReductionFactor:32.0];
    [super initFrame:theFrame];
    [self setBorderType:borderType];
    [self setHorizScrollerRequired:YES];
    [self setDynamicScrolling:YES];
    [self setDocView:theSoundView];
    [self setBackgroundGray:NX_WHITE];
    [self setAutoresizeSubviews:YES];
    [self setAutosizing:NX_WIDTHSIZABLE|NX_HEIGHTSIZABLE];
    [[theSoundView superview] setAutoresizeSubviews:YES];
    [theSoundView setAutosizing:NX_HEIGHTSIZABLE];
    return self;
}

- play:sender {return [[self docView] play:sender];}
- stop:sender {return [[self docView] stop:sender];}
- record:sender {return [[self docView] record:sender];}


@end



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.