}
-// make a SimpleSound morse code transmission for the specified string
-SimpleSound *FGMorse::make_ident( const string& id, const int freq ) {
+// make a SGSimpleSound morse code transmission for the specified string
+SGSimpleSound *FGMorse::make_ident( const string& id, const int freq ) {
char *idptr = (char *)id.c_str();
int length = 0;
// 1. Determine byte length of message
for ( i = 0; i < (int)id.length(); ++i ) {
if ( idptr[i] >= 'A' && idptr[i] <= 'Z' ) {
- char c = idptr[i] - 'A';
+ int c = (int)(idptr[i] - 'A');
for ( j = 0; j < 4 || alphabet[c][j] == end; ++j ) {
if ( alphabet[c][j] == DIT ) {
length += DIT_SIZE;
}
length += SPACE_SIZE;
} else if ( idptr[i] >= '0' && idptr[i] <= '9' ) {
- char c = idptr[i] - '0';
+ int c = (int)(idptr[i] - '0');
for ( j = 0; j < 5; ++j) {
if ( numerals[c][j] == DIT ) {
length += DIT_SIZE;
for ( i = 0; i < (int)id.length(); ++i ) {
if ( idptr[i] >= 'A' && idptr[i] <= 'Z' ) {
- char c = idptr[i] - 'A';
+ int c = (int)(idptr[i] - 'A');
for ( j = 0; j < 4 || alphabet[c][j] == end; ++j ) {
if ( alphabet[c][j] == DIT ) {
memcpy( buf_ptr, dit_ptr, DIT_SIZE );
memcpy( buf_ptr, space, SPACE_SIZE );
buf_ptr += SPACE_SIZE;
} else if ( idptr[i] >= '0' && idptr[i] <= '9' ) {
- char c = idptr[i] - '0';
+ int c = (int)(idptr[i] - '0');
for ( j = 0; j < 5; ++j ) {
if ( numerals[c][j] == DIT ) {
memcpy( buf_ptr, dit_ptr, DIT_SIZE );
buf_ptr += SPACE_SIZE;
// 4. create the simple sound and return
- SimpleSound *sample = new SimpleSound( buffer, length );
+ SGSimpleSound *sample = new SGSimpleSound( buffer, length );
return sample;
}