|
Given the string (or any length string with an even-number of word pairs): "12345678"
How would I swap adjacent "words"?
The result I want is "34127856"
As well as, when that's done I need to swap the longs. The result I want is: "78563412"
Started by pyNewGuy on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
-mtimeit -s'import swa' 'swa.withre(swa.s)' 78563412 78563412 10000 loops, best of 3: 42.2 usec per loop usec per loop
...and ....
I want to swap "byte pairs", not the order of the bytes.
Which is my original desired result.
|
|
I am trying to manipulate a wave file header. I have loaded the file into a NSMutableData and am trying to change the wav file header info. My problem is that on the line:
[maindata replaceBytesInRange:range withBytes:((UInt32 *)tfSC1Length)];
I am receiving...
Started by iPhone Guy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, what is the byte order expected by the wav file format for 16 bit....
Channels; // Number of Channels: 1=mono, 2=stereo SInt32 sampleRate; // Sample Rate: samples per since it's treating your lengths as pointers right now.
|
|
Hello community. I have an interesting question today.
I need to convert some pokemon audio files to a list of 8-bit samples (0-255 values). I am writing an assembly routine on the MC6800 chipset that will require these sounds to be played. I plan on ...
Started by jonathan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
[Left Sample 1][Right Sample 1][Left ....
Then you can use a tool like "hexdump" to dump for an 8-bit stereo file each sample will be arranged as follows.
U for unsigned linear, and -1 for 1 byte per sample.
|
Ask your Facebook Friends
|
Hi,
I have installed the OBIEE sample app (Build 10722) on VM box following the instructions religiously.
I have hit a problem when I try to invoke the application with Firefox.
I get
Firefox can't establish a connection to the server at localhost:700...
Started by 904564 on
, 15 posts
by 5 people.
Answer Snippets (Read the full thread at oracle):
Can anyone else confirm this?
Thanks
Helen Hi Helen,
The deployment guide of Sample App at http.
But I don't think it's already installed in the sample!
Kr,
A Thanks Christain,
I thought not.
|
|
I am learning assembler quite a while and I am trying to rewrite some simple procedures \ functions to it to see performance benefits (if any). My main development tool is Delphi 2007 and first examples will be in that language but they can be easily ...
Started by Wodzu on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
Since you decode a single byte - 256 different states - you can precalculate 256 arrays optimized per processor, and if newer processors and an improved pascal compiler comes along, you're DecodePixels5(EncPixels: Byte....
A lookup table.
|
|
Q1. I am reading data from adc using serial communication with VISA, i am using baud rate of 38400Hz, with 12 bit adc and a total of 8 channels are confihured, so as per configuration, sample rate should be 800 s/s but i am getting 200-300 s/s, what could...
Started by tygrs on
, 4 posts
by 2 people.
Answer Snippets (Read the full thread at ni):
You check Bytes at Port once, outside the loop, immediately after initializing the port sample....
With 10 bits per character and assuming two bytes per, not sample rate.
Are groups of data separated, if at all?
Next.
|
|
Hi all,
How to format the number which can be converted to Byte[] (array);
I know how to convert the result value to byte[], but the problem is how to format the intermediate number.
This is by data,
int packet = 10; int value = 20; long data = 02; //...
Started by Mohanavel on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Why a long? why not an int?
For example (note I've had to make assumptions about your byte-trimming based; int value....
The use of 3 bytes to define the long seems unusual; if it is just the 3 bytes...
For BitConverter.GetBytes(data).
|
|
I assume 100 bytes is too small and can slow down larger file transfers with all of the writes, but something like 1MB seems like it may be too much. Does anyone have any suggestions for an optimal chunk of bytes per write for sending data over a network...
Started by intargc on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, ....
If you try to send more than.
TCP packets are subject to fragmentation, and while it would be nice are using TCP/IP over Ethernet, the maximum packet size is about 1500 bytes.
No, there is no universal optimal byte size.
|
|
Disclaimer: I realize I can generate this at runtime in Java, this was needed for a very special case while performance testing some code. I've found a different approach, so now this is just more of a curiosity than anything practical.
I've tried the...
Started by Mark Renouf on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
So for 10000 elements you'd have to expect about 80kB for loading the... .
I think elements, which leads to 8 bytes per array element.
Actually takes 10 bytes ( one per digit ) instead of only 4 bytes used for the int32.
|
|
On Sat, 4 Apr 2009 22:13:01 -0700, Robert Van gemert <RobertVangemert@discussions.microsoft.com
Hi,
I have multiple capture graphs, clip playout graphs and one render graph
connected by memory files. In pal the number of audio samples per frame...
Started by Robert Van gemert on
, 3 posts
by 2 people.
Answer Snippets (Read the full thread at omgili):
I added a fifo to
the player.
What's the issue?
--
Tim Roberts the buffer
size varied but the audio sample rate was still the same.
Processing 48000
samples per second, it's just packaged differently.
|