SoundStream.st
changeset 58 bd6753bf0401
parent 51 24f978f1d849
child 84 d401ce0001dc
equal deleted inserted replaced
57:bf0731bbbd01 58:bd6753bf0401
    19 
    19 
    20 SoundStream comment:'
    20 SoundStream comment:'
    21 COPYRIGHT (c) 1993 by Claus Gittinger
    21 COPYRIGHT (c) 1993 by Claus Gittinger
    22 	      All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.12 1995-02-05 23:38:40 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.13 1995-02-15 10:29:26 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !SoundStream class methodsFor:'documentation'!
    27 !SoundStream class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.12 1995-02-05 23:38:40 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.13 1995-02-15 10:29:26 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
   559     if (_INST(bitsPerSample) == _MKSMALLINT(16))
   559     if (_INST(bitsPerSample) == _MKSMALLINT(16))
   560 	ALsetwidth(config, AL_SAMPLE_16);
   560 	ALsetwidth(config, AL_SAMPLE_16);
   561     else
   561     else
   562 	ALsetwidth(config, AL_SAMPLE_8);
   562 	ALsetwidth(config, AL_SAMPLE_8);
   563 
   563 
   564     if (_isSmallInteger(_INST(sampleRate)))
   564     if (__isSmallInteger(_INST(sampleRate)))
   565 	params[3] = params[5] = _intVal(_INST(sampleRate));
   565 	params[3] = params[5] = _intVal(_INST(sampleRate));
   566 
   566 
   567     ALsetparams(AL_DEFAULT_DEVICE, params, 6);
   567     ALsetparams(AL_DEFAULT_DEVICE, params, 6);
   568     p = ALopenport("smallchat", (char *)_stringVal(aMode), config);
   568     p = ALopenport("smallchat", (char *)_stringVal(aMode), config);
   569     if (p) {
   569     if (p) {
   649     int objSize;
   649     int objSize;
   650     char *cp;
   650     char *cp;
   651 
   651 
   652     if (_INST(filePointer) != nil) {
   652     if (_INST(filePointer) != nil) {
   653 	if (_INST(mode) != _readonly) {
   653 	if (_INST(mode) != _readonly) {
   654 	    if (_isSmallInteger(count) && _isSmallInteger(start)) {
   654 	    if (__bothSmallInteger(count, start)) {
   655 		cnt = _intVal(count);
   655 		cnt = _intVal(count);
   656 		offs = _intVal(start) - 1;
   656 		offs = _intVal(start) - 1;
   657 		p = MKAUDIO(_INST(filePointer));
   657 		p = MKAUDIO(_INST(filePointer));
   658 
   658 
   659 		/*
   659 		/*
   696     int objSize;
   696     int objSize;
   697     char *cp;
   697     char *cp;
   698 
   698 
   699     if (_INST(filePointer) != nil) {
   699     if (_INST(filePointer) != nil) {
   700 	if (_INST(mode) != _writeonly) {
   700 	if (_INST(mode) != _writeonly) {
   701 	    if (_isSmallInteger(count) && _isSmallInteger(start)) {
   701 	    if (__bothSmallInteger(count, start)) {
   702 		cnt = _intVal(count);
   702 		cnt = _intVal(count);
   703 		offs = _intVal(start) - 1;
   703 		offs = _intVal(start) - 1;
   704 		p = MKAUDIO(_INST(filePointer));
   704 		p = MKAUDIO(_INST(filePointer));
   705 		objSize = _Size(anObject) - OHDR_SIZE;
   705 		objSize = _Size(anObject) - OHDR_SIZE;
   706 		if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {
   706 		if ((offs >= 0) && (cnt >= 0) && (objSize >= (cnt + offs))) {