1.2rc1

Jul 20, 2010 at 6:39 PM
Hi Guys, how is 1.2rc1 coming along?
Coordinator
Jul 21, 2010 at 11:54 AM

Hey,

there hasn't been much progress lately on porting the c code to C# due to lack of time. I am full time working and NSpeex is maintained only in my spare time.

If you need the version 1.2rc1 you could have a look at the source where you will find a managed wrapper around the unmanaged 32bit library.

Is there anything specific you need NSpeex for? Maybe I can help you with finding the right solution.

Christoph

Aug 5, 2010 at 7:37 AM

Hi Christoph, What i Need is the similar function to bits.c as in:

 

EXPORT void speex_bits_insert_terminator(SpeexBits *bits){

   if (bits->bitPtr)      speex_bits_pack(bits, 0, 1);

   while (bits->bitPtr)    speex_bits_pack(bits, 1, 1);

}

which is used to terminate the end of the frame written. I encode multiple 160 word frames to be transmitted in a single communications packet and on the receiving end, the iphone client using the native C Speex works fine but NSpeex doesnt since it doesnt seem to know when the frame ended and the next frame is starting in the word stream.

Would a C# function like this work in Bits.cs?

/// <summary> /// Insert Packet Terminator to distinguish amongst frames transmitted in a single packet /// </summary> public void InsertTerminator() { if (bitPtr != 0) Pack(0, 1); while (bitPtr != 0) Pack(1, 1); }

i guess the bitPtr in C# version is being used differently than the C version so am not sure what is the best way to implement the InsertTerminator function and where in  /// <summary> /// Pull the decoded data out into a byte array at the given offset and /// returns the number of bytes of encoded data just read. /// </summary> /// <returns>the number of bytes of encoded data just read.</returns> public int GetProcessedData(byte[] data, int offset) { int size = bits.BufferSize; System.Array.Copy(bits.Buffer, 0, data, offset, size); bits = new Bits(); cbits = new Bits(); return size; }

 

function of SpeexEncoder.cs to insert this function? Do you have any idea how to fix this so that multi-frame transmission would become compatible with the C version?

Coordinator
Aug 5, 2010 at 12:42 PM
Edited Aug 5, 2010 at 1:09 PM

Hi,

before we discuss changes on Bits.cs I need to know which version of the native Speex codec you are using. Since the bitstream has been fixed in version 1.1 which is later than the version NSpeex is currently based on I would say you are affected by changes to the bitstream.

Have you tried using a single packet transmission so that we can say for sure that we just need to get the multi-frame packing right?

Appart from the very like format mismatch I would say that the Bits.cs version is missing the Bits.Write Method as well which inserts the terminator and should be called after multiple calls to ProcessData (encode).

Christoph

Aug 5, 2010 at 4:10 PM
On the iPhone I am using the latest 1.2Rc1

On .Net I am using the latest source for Nspeex. I have not tried a single frame yet. May be I give it a try to see if it works


On 8/5/10 4:42 AM, "balistof" <notifications@codeplex.com> wrote:



From: balistof

Hi,

before we discuss changes on Bits.cs I need to know which version of the native Speex codec you are using. Since the bitstream has been fixed in version 1.1 which is later than the version NSpeex is currently based on I would say you are affected by changes to the bitstream.

Have you tried using a single packet transmission so that we can say for sure that we just need to get the multi-frame packing right?

Christoph



Read the full discussion online <http://nspeex.codeplex.com/Thread/View.aspx?ThreadId=220205&ANCHOR#Post476807> .


To add a post to this discussion, reply to this email (nspeex@discussions.codeplex.com <mailto:nspeex@discussions.codeplex.com?subject=[nspeex:220205]> )


To start a new discussion for this project, email nspeex@discussions.codeplex.com


You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe <http://www.codeplex.com/site/discussions/thread/unsubscribe/220205> on CodePlex.com.


Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Aug 5, 2010 at 4:24 PM

Yes, that would be my first step to see if we are compatible. I took a closer look at the source code and it would require some changes to make the NSpeex version multi-frame capable...

Let me know about the result or your compatibility tests and if its positive I will invest some time and get the code multi-frame capable!

Christoph

Coordinator
Aug 6, 2010 at 9:03 AM

Hi,

I made some quick testing and it looks like that the encoded stream of the current NSpeex version is binary compatible with the native Speex 1.2rc1. So I added multi-frame packing to the source.

Have a look at the latest sources!

Christoph

Aug 9, 2010 at 1:18 AM
Hi how long or how much effort would it be to add the terminator for multiframes per packet? Anything I can do to help?


On 8/5/10 8:24 AM, "balistof" <notifications@codeplex.com> wrote:



From: balistof

Yes, that would be my first step to see if we are compatible. I took a closer look at the source code and it would require some changes to make the NSpeex version multi-frame capable...

Let me know about the result or your compatibility tests and if its positive I will invest some time and get the code multi-frame capable!

Christoph



Read the full discussion online <http://nspeex.codeplex.com/Thread/View.aspx?ThreadId=220205&ANCHOR#Post476950> .


To add a post to this discussion, reply to this email (nspeex@discussions.codeplex.com <mailto:nspeex@discussions.codeplex.com?subject=[nspeex:220205]> )


To start a new discussion for this project, email nspeex@discussions.codeplex.com


You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe <http://www.codeplex.com/site/discussions/thread/unsubscribe/220205> on CodePlex.com.


Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Aug 9, 2010 at 2:33 AM

Lovely, thanks so much. U R Great…

From: balistof [mailto:notifications@codeplex.com]
Sent: Sunday, August 08, 2010 5:25 PM
To: nader@gamesbox.tv
Subject: Re: 1.2rc1 [nspeex:220205]

From: balistof

Hi,

I made some quick testing and it looks like that the encoded stream of the current NSpeex version is binary compatible with the native Speex 1.2rc1. So I added multi-frame packing to the source.

Have a look at the latest sources!

Christoph

Read the full discussion online.

To add a post to this discussion, reply to this email (nspeex@discussions.codeplex.com)

To start a new discussion for this project, email nspeex@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com