76

(1 replies, posted in Archives)

i think this' good idea too
but we have to wait until Leo arrives - less than 3 days left smile

77

(17 replies, posted in Features)

79

(41 replies, posted in Archives)

80

(41 replies, posted in Archives)

+ Check Russian translation (but for that we need someone knowing russian other than me)

81

(3 replies, posted in Bugs)

82

(3 replies, posted in Bugs)

Does not apply to stable build 0.06, but present in latest versions.
File info show bitrate either garbage, zero of does not show at all.

84

(17 replies, posted in Features)

from now cog supports APLs
my MacAPL will be cleaned and made available in some time

87

(4 replies, posted in Features)

88

(5 replies, posted in Help)

yes, seems to be fixed

90

(61 replies, posted in Development)

91

(61 replies, posted in Development)

just noticed there's no russian translation - i'll make it

10-19 02:17:48.510 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:48.510 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:48.510 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:48.511 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:48.511 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:51.161 Cog[20426] Opening: file://localhost/Volumes/WEST%3BSERVER/Music/classical%20crossover/Hayley%20Westenra/Hayley%20Westenra%20-%20Treasure%20(2007)/Hayley.Westenra.-.%5BTreasure%5D.cue#06
2007-10-19 02:17:51.161 Cog[20426] SETTING OUTPUT FORMAT!
2007-10-19 02:17:51.161 Cog[20426] REGISTERING OBSERVERS
2007-10-19 02:17:51.163 Cog[20426] GENRE!
2007-10-19 02:17:51.163 Cog[20426] UNQUOTED
2007-10-19 02:17:51.163 Cog[20426] DATE!
2007-10-19 02:17:51.173 Cog[20426] SOMETHING CHANGED!
2007-10-19 02:17:51.173 Cog[20426] FORMAT DID CHANGE!
2007-10-19 02:17:51.173 Cog[20426] FORMAT CHANGED
2007-10-19 02:17:51.173 Cog[20426] Properties: {
    bitsPerSample = 16; 
    channels = 2; 
    endian = big; 
    length = 238413.2690429688; 
    sampleRate = 44100; 
    seekable = 1; 
}
2007-10-19 02:17:51.176 Cog[20426] DEALLOCATING SOURCE
2007-10-19 02:17:51.579 Cog[20426] INITIAL BUFFER FILLED
2007-10-19 02:17:52.076 Cog[20426] INITIAL BUFFER FILLED
<whole track passed>
<here bug happened>

93

(17 replies, posted in Features)

I think here the problem is:

- (int)fillBuffer:(void *)buf ofSize:(UInt32)size
{
    long trackByteEnd = trackEnd * bytesPerSecond;    
    trackByteEnd -= trackByteEnd % (bytesPerFrame);
    
    if (bytePosition + size > trackByteEnd) {
        size = trackByteEnd - bytePosition;
    }

    if (!size) {
        return 0;
    }

    int n = [decoder fillBuffer:buf ofSize:size];
    
    bytePosition += n;
    
    return n;
}

bytesPerSecond is set once during file opening, but bitrate may vary in compressed files... (and on APEs with classical music bug seen more often)

This applies to newly invented CUE and APL file support: sometimes track does not change and underlying file continues to play beyond track (to next track in image...).
Noticed corellation: when track is played trough chances for bug are higher, when same track is scrolled to near end it changes properly.

Proposal: do you use floating point addition and comparison by '=='?
Try this little demonstration:

#include <iostream>
int main (int argc, char * const argv[]) {
    float a = 0.0;
    for (int i = 0; i < 1000000; i++) a += 0.000001;
    if (a == 1.0) std::cout << "you're very lucky\n";
    else std::cout << "la-la-la! 1 !=" << a << "\n";
        
    std::cout << "You think doubles are solution?\n";
    double d = 0.0;
    for (int i = 0; i < 1000000; i++) d += 0.000001;
    if (d == 1.0) std::cout << "you're very lucky\n";
    else std::cout << "la-la-la! 1 !=" << d << "\n";
    return 0;
}

it outputs things like this:

[Session started at 2007-10-19 01:27:57 +0400.]
la-la-la! 1 !=1.00904
You think doubles are solution?
la-la-la! 1 !=1

test has exited with status 0.

97

(17 replies, posted in Features)

98

(17 replies, posted in Features)

99

(17 replies, posted in Features)

i started writing plugin for handling APLs - planning to have smth running tomorrow...

possible fix:

<...>
- (void)parseFile:(NSString *)filename
{
    NSError *error = nil;
    NSStringEncoding enc = nil;
    NSLog(@"Trying to open with encoding detection...");
    NSString *contents = [NSString stringWithContentsOfFile:filename usedEncoding:&enc error:&error];
    if (error) {
        NSLog(@"Trying to open as unicode...");
        error = nil;
        contents = [NSString stringWithContentsOfFile:filename encoding:NSUTF8StringEncoding error:&error];
        }
    if (error) {
        NSLog(@"Last hope: opening using cp1251...");
        error = nil;
        contents = [NSString stringWithContentsOfFile:filename encoding:NSWindowsCP1251StringEncoding error:&error]; //!!! constant used
        }
    if (error || !contents) {
        NSLog(@"Could not open file...%@ %@ %@", filename, contents, error);
        return;
    }
<...>

but this requires knowing system/user language and non-unicode encoding for this, easy way - make it tunable by user

PS. constants inside code could really be pain in the ass - in early days when programs were small and computers were big there're some accidents, for example once rocket was blasted due to unchanged constant...