Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 556 results for
packing
- Page 1
Packing unsigned long into Unicode characters
Programming
Software Development
14 Years Ago
by wheel
Hello! I'm wondering how to go about
packing
data from an std::vector<unsigned long> into …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
… code to create this function. It seems to work for
packing
a long into little endian of b size: [code] void…
C++ Packing order
Programming
Software Development
13 Years Ago
by jakesee
… // float x, y, z; // will there be a difference in
packing
order? }; float v[3]; }; // insert many member and static functions… above code, is it always safe to call assume the
packing
order is in the manner I call work() ? How can…
Re: Packing unsigned long into Unicode characters
Programming
Software Development
14 Years Ago
by Ancient Dragon
UNICODE characters is wchar_t, which on MS-Windows is unsigned short and on some other operating systems can be unsigned long. So why not just do something like this? [code] size_t i; wchar_t buf[20]; vector<unsigned long> characters; for(i = 0; i < characters.size(); i++) buf[i] = characters[i]; buf[i] = 0; [/code]
Re: Packing unsigned long into Unicode characters
Programming
Software Development
14 Years Ago
by wheel
Thanks for the reply! I've tried a similar method, and it didn't work (either resulted in errors when opening the file in a unicode text editor, or simply didn't print the characters). Here's my similar code: (with namespace std, of course) [code] wofstream outfile("output.txt", ios_base::trunc); vector<unsigned long> …
packing
Programming
Software Development
8 Years Ago
by basit_3
can we pack a programme made in VB.NET as a software , like other software which can be able to install
Re: packing
Programming
Software Development
8 Years Ago
by Stuugie
In your projects folder, where your program is, click into the folder that holds your program name, then Bin, Release, and then the application icon (executable) should be there. Is that what you are asking abouit?
packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
In PHP I can use the pack function to format a integer value to a 16 bit wav channel chunk. It gets the endianness right and it works. How would one go about creating raw wav data in c? [code] function cram ($integer, $type = 's', $length = '*') { return pack($type.$length, $integer); } [/code] I'm currently using SDL_mixer and this …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by Salem
Well the first thing you need to research is the [URL="http://clusty.com/search?query=wav+file+format&sourceid=Mozilla-search"]WAV file format[/URL] You'll also need to be familiar with the bitwise operators << >> & | ^ in order to pack information at the bit level.
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
[QUOTE=Salem;502136]Well the first thing you need to research is the [URL="http://clusty.com/search?query=wav+file+format&sourceid=Mozilla-search"]WAV file format[/URL] You'll also need to be familiar with the bitwise operators << >> & | ^ in order to pack information at the bit level.[/QUOTE] For 16-bit …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by Salem
> Each sample is stored least significant byte first so does that mean 00000000 00000000 == -32768, > 11111111 00000000 == 0, and 11111111 11111111 == 32767? Nope, 0 would be 00000000 00000000 255 would be 11111111 00000000 (LSB=0xFF, MSB=0x00) 256 would be 00000000 00000001 (LSB=0x00, MSB=0x01) > If so, isn't that just a short …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
[quote] Nope, 0 would be 00000000 00000000 255 would be 11111111 00000000 (LSB=0xFF, MSB=0x00) 256 would be 00000000 00000001 (LSB=0x00, MSB=0x01) [/quote] I'm confused because, 2 ^ 16 = 65536, so 65536 should be the highest number possible with 16 bits. How are you supposed to count across multiple bytes? [quote] > If so, isn't that…
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by Salem
> I'm confused because, 2 ^ 16 = 65536, so 65536 should be the highest number possible with 16 bits. No, 65535 is, which would be 0xFFFF or 11111111 11111111 > 255 would be 11111111 00000000 (LSB=0xFF, MSB=0x00) > 256 would be 00000000 00000001 (LSB=0x00, MSB=0x01) What if I wrote them out as 255 would be 00000000 11111111 (MSB=0x00…
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
[QUOTE=Salem;503703] You are attempting to write to a data structure which is endian-specific, so you need to store all your bytes in that order.[/QUOTE] How is that possible? I guess I don't understand how you can use bitwise operators if you don't know the order of the bits to start with. And Google is just being racist: [url]http://www.…
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by Salem
But I've already shown you how to extract the LSB and MSB, what more do you want? Either it's [icode]buff[i++] = sample & 0xFF; buff[i++] = (sample >> 8) & 0xFF;[/icode] Or it's [icode]buff[i++] = (sample >> 8) & 0xFF; buff[i++] = sample & 0xFF;[/icode] [ICODE](sample >> 8) & 0xFF[/ICODE] will …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by csteverun
I'm trying to understand what's going on here. buff[i++] = sample & 0xFF; This should copy all the bits from sample that match 0xFF. However, I don't know what it would do if sample was a different size than 0xFF. Would it copy the matching and then ignore the rest? Or would it copy the extra bits afterward? Or would it copy the extra …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by Salem
> sample & 0xFF; Gets bits 0 to 7 As would (sample >> 0) & 0xFF; // bits 0 to 7 which would stylistically match say (sample >> 8) & 0xFF; // bits 8 to 15 You know how to get both bytes of your sample, all that remains is to put them into your buffer in the right order. > So, assuming the extra bits are …
Re: packing wav data in c
Programming
Software Development
16 Years Ago
by WaltP
Examples [code] 1100100101001001 11111111 ---------------------- 00000000[B]01001001[/B] buff gets 01001001 1101110110110011 11111111 ---------------------- 00000000[B]10110011[/B] buff gets 10110011 [/code]
Packing a gtk.TreeView and a gtk.Menu in a top level gtk.Window
Programming
Software Development
10 Years Ago
by philcm
Hi ; I'm trying to add a simple menubar to my lister window : ------------------------------------ #!/usr/bin/env python import subprocess import os, stat, time import pygtk pygtk.require('2.0') import gtk folderxpm = [ "17 16 7 1", " c #000000", ". c #…
Re: C++ Packing order
Programming
Software Development
13 Years Ago
by Narue
If I understand your question correctly, the compiler is not allowed to reorder struct/class members between access specifiers. You can make the order unspecified like so: [code] struct Vertex { public: Vector3 p; public: Vector3 n; public: Vector3 c; } [/code]
Re: C++ Packing order
Programming
Software Development
13 Years Ago
by arkoenig
Here is what I think is a simpler version of the question you are asking. [code] struct Foo { int x, y; }; Foo bar[2]; void f() { int* p = &bar[0].x; // ... } [/CODE] I believe you are asking where there is any portable of incrementing [icode]p[/icode] so that it points to [icode]bar[1].x[/icode] instead of …
Re: C++ Packing order
Programming
Software Development
13 Years Ago
by jakesee
[QUOTE]If I understand your question correctly[/QUOTE] [QUOTE]Here is what I think is a simpler version of the question you are asking[/QUOTE] sorry for being unclear about what i was asking, but you guys got what I needed. many thanks =) I will try the "distance measuring" and see if the offset turns out to be consistent.
Re: Change-a-Letter-or-Two-Game
Community Center
Geeks' Lounge
17 Years Ago
by ~s.o.s~
packing
Error with files in C
Programming
Software Development
14 Years Ago
by athlon32
… expected declaration specifiers or ‘...’ before string constant| /home/miguel/Documents/
packing
/create_project.c|40|error: expected declaration specifiers or ‘...’ before string… constant| /home/miguel/Documents/
packing
/create_project.c|39|warning: unused variable ‘fp’| /home/miguel/Documents…
Update Statement
Programming
Databases
12 Years Ago
by shena
… in oracle sql developer (
packing
, detail, header). I need to update the
packing
table's part no with…. [CODE]update
packing
set
packing
.no = header.no where (
packing
.id like 'R%' and
packing
.no = 'N' and
packing
.id = detail.…id and
packing
.box = header.box …
Re: Update Statement
Programming
Databases
12 Years Ago
by shena
…, I'm still a novice to pl/sql. [CODE]update
packing
set
packing
.no = (Select header.no from header where header.box…
Threading in GUI with Glade
Programming
Software Development
16 Years Ago
by metalx1000
… name="fill">False</property> </
packing
> </child> <child> <… name="fill">True</property> </
packing
> </child> <child> <…name="fill">True</property> </
packing
> </child> </widget> <…
Help with Queues/Arraylist
Programming
Software Development
14 Years Ago
by ben1
…divided, my problem scenario is the following: There are 2
packing
machines, which can pack any type of food, however this…. Each food type takes 10 secs to pack. The
packing
machines get the food from the processing machines, there are… in queues, the one with the shortest queue, the
packing
machine will get a food from that queue. This is…
can somebody help me to fix the error
Programming
Software Development
11 Years Ago
by ali11
…DATE:\n"); //getting day and
packing
it printf(" Day:"); …,&r,&w,&e); //
packing
permissions permissions=p1|p2|p3; //Unpacking date…
Re: Help with Queues/Arraylist
Programming
Software Development
14 Years Ago
by BestJewSinceJC
… about it, I need to add 2 queues to the
packing
>>machines because it has to store the food… food from the processing queue and add it to the
packing
machine queue/arraylist. One it is added, then somehow it… will tell the
packing
machine and the processing machine queue will go down by1…
1
2
3
10
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC