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
User Profile
Collapse
-
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... -
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.... -
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....Leave a comment:
-
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...Leave a comment:
-
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....Leave a comment:
-
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....Leave a comment:
-
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;
... -
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...Leave a comment:
-
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 ....Leave a comment:
-
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...Leave a comment:
-
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...Leave a comment:
-
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?...Leave a comment:
-
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...
No activity results to display
Show More
Leave a comment: