User Profile

Collapse

Profile Sidebar

Collapse
2wycked
2wycked
Last Activity: Sep 12 '07, 03:53 PM
Joined: Aug 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 2wycked
    started a topic Reading id3 tags
    in C

    Reading id3 tags

    Hello,

    I'm trying to make a c++ program to create a file that refrences a music library. I'm able to recursively walk through the directories, but I'm having trouble reading in id3 tags. I'm using id3lib, but it is a very akward library. Is there a better library out there with a more intuitive API, or should I bite the bullet and try to use the id3lib?

    Thanks
    See more | Go to post

  • 2wycked
    started a topic Kiosk Mode

    Kiosk Mode

    I'm trying to setup a music server in my apartment. I want to run iTunes in a kisok mode, which iTunes doesn't really have. Right now, I just want this up and running, but at some point I'm going to also make it a web server.

    My current method is to change the shell from explorer.exe to itunes.exe, which allows it to run efficiently and kind of act like a kiosk. Is this at least a reasonable approach? If so, is there any way to...
    See more | Go to post

  • 2wycked
    replied to Unwanted output
    in C
    You're using the logical or operator ( || ) wrong. You would want to compare
    [code=cppp]
    if( (this == that) || (this == theOther) )
    [/code]
    As it is, you are comparing if ch[i] == 'a', and then oring the result with a value that will always evaluate to true ('A'), which forces the first if statement to always be true....
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to 2D array, function call question in C
    in C
    For 2D arrays, such as myarray[2][3], a value of myarray[i] would be a pointer, not an int (or char, or whatever type). Just as if you declared myarray as char** myarray, a value of *myarray will be a pointer, but a value of *(*myarray) will be a char....
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Static Initialization
    in C
    Well, I'm in the process of writing my own memory manager, so using the heap would be circular in this case. What this is for is an allocation table, where the array represents a listing of bits that determine if a memory segment is managed by a heap or not. SomeClass is really class Heap, where Heap is an ADT, because I have purely virtual functions in the class. I could see where the singleton issue could come in, but since this needs to be...
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Static Initialization
    in C
    I forgot to mention that SomeClass is an ADT, so there are no instances of SomeClass. I believe this covers the Singleton issue, bur correct me if I'm wrong....
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to 2D array, function call question in C
    in C
    Well, the first thing is that myarray[2] is not defined. myarray only has rows 0 and 1, so who knows what you're actually sending the function. Other than that, I don't see a problem with the code....
    See more | Go to post

    Leave a comment:


  • 2wycked
    started a topic Static Initialization
    in C

    Static Initialization

    I'm trying to initialize a static block of memory to all zeros using (essentially) the following code:

    [CODE=cpp]
    #define NUM_BYTES 2048

    typedef unsigned int uint;

    class SomeClass {
    protected:
    static const uint* some_block();
    public:
    // more methods and such...
    };

    const uint* some_block() {
    static bool isUninit = true;
    ...
    See more | Go to post

  • 2wycked
    replied to Custom Memory Manager
    in C
    After a little research, I found some virtual memory API's for Mac OS X using the Mach interface. The function call is mach_vm_map(), or mach_vm_allocat e(). I'm doing a bit of reading up on it now to see what I can get out of it, thereby avoiding the overhead of a memory managed memory manager with malloc().



    I definately realize the scale of this task. I've been doing a lot of reading, and have done very little coding...
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Solving equation phi(x) = k in C++, how?
    in C
    Certainly. Taylor series aren't the greatest for genral approximations and Simpon's rule has pretty good convergance. Also, because of the symetry and knowing the area under the enitre curve, you get a few places to make some simplifications ....
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Solving equation phi(x) = k in C++, how?
    in C
    Actually you can differentiate the function. The function is an integral, so differentiation will simply be removing the integral (and hence return to the Gaussian curve). Knowing that, if you already have a function that gives you the function value of phi, the Newton method can be used. If you don't have a function that returns the value of phi, then you may need to construct a Taylor series approximation to evaluate phi. I'm not sure the rate...
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Custom Memory Manager
    in C
    If I use the "big block" method, is there still a way to overload the default new operator, beacause if I overload that, then I'm unable to create a block using new (because it's now overloaded). I guess the easiest would to implement malloc() ?

    Also, I don't want to grab that big of a block from memory (in case the program uses only a little bit), but at the same time, I don't want the overhead for smaller blocks of memory...
    See more | Go to post

    Leave a comment:


  • 2wycked
    replied to Custom Memory Manager
    in C
    Couple things. I'm on a Mac (OS X 10.4), so what would the system call for a new page be (I assume it's the same as UNIX, but I'm new to UNIX as well)? Also, kind of a noob question, but how much memory is there per page - is it the same cross-platform?...
    See more | Go to post

    Leave a comment:


  • 2wycked
    started a topic Custom Memory Manager
    in C

    Custom Memory Manager

    Hello all,

    I'm trying to make a custom memory manager using classes. At this point, I'm not trying to make it paticularly portable, just get something running for my system. Yes I know there are tons of other customs managers out there, but this is for my own personal development as a programmer.

    My main problem I'm having right now is initializing a global heap. The class system is based on ADT's that allow for custom...
    See more | Go to post
No activity results to display
Show More
Working...