Challenging--- How to use AudioFormat , AudioInputStream in my case
I did a application extracting data in byte format from .wav file, storing them in byte array, and I also have to use those data to do signal processing ,such FFT, convolution,... and so on, In order to do so, i guess I have to convert byte data to double(but not one bye one translate) by using AudioFormat.frameSize,, AudioFormat sampleSizeInBits and so on,,, unfortunately, I don't know how to convert, can anyone help me, thanks a lot
for more detail you can see another question of mine in this forum,say, "How to convert byte array to double array in this case"
Thanks mate!
Good luck
Thanks bsampieri very much ,, oh,oh!
what below is your code I embed in my program!
// bsampieri 's code
intArr = new int[numBytes/2];
for (int i=0; i<numBytes/2; i++) {
byteA = (int)tempBuffer1;
byteB = (int)tempBuffer1[i+1];
if(byteA < 0) byteA += 0x100;
if(byteB < 0) byteB += 0x100;
if(audioInputStream.getFormat().isBigEndian())
intArr[i] = ((int)byteA) + (((int)byteB) << 8); // big endian (you think)
else
intArr[i] = ((int)byteB) + (((int)byteA) << 8); // little endian (you think)
} //end for
for(int j=0;j<numBytes/2;j++)
System.out.println(intArr[j]);
// bsampieri 's code
the result is something like this
let me show you....
wait a moment...
oh..
16896
67
17152
68
17408
69
40704
164
41984
172
44032
170
44352
169
and what's that???!!! hehe, I love you so much, can tell me more....
Similar Messages
-
How to use a CTE in a CASE statement?
Hi everyone,
I'm trying to use a CTE in a CASE statement and getting error. In fact, I'm not sure how to use a CTE in this case and this is the first time I'm using a CTE. I managed to build a CTE successfully but, failed to incorporate it in the CASE statement.
SELECT wbs,
MIN(srt),
MAX(srt)
CASE ust
WHEN
WITH CTE AS
SELECT p_id + p_name + ps_name AS colg, p_id
FROM pd_info
WHERE s_desc = 'warehouse'
OR p_desc = 'Originated from warehouse'
OR p_desc = 'Originated from a partner store'
SELECT colg FROM CTE
WHERE cte.colg IN (SELECT p_id + p_name + ps_name AS c
omb from pd_info)
OR cte.p_id = 'xxxxxxxx' THEN 'invalid'
ELSE 'valid'
END,
p_name,
sub_name,
ps_name,
FROM pd_info;
Could experts here please help me?
Thank you,
Bangaaram
Known is a DROP, Unknown is an OCEAN.With the help from some experts, I've figured out that CTE doesn't work in this case. Here are the queries that I'm using for the above. Either of them is working good so far.
SELECT Wbs
, MIN ( Srt )
, MAX ( Srt )
, CASE
WHEN S_Desc = 'warehouse'
OR P_Desc = 'Originated from warehouse'
OR P_Desc = 'Originated from a partner store'
OR P_Id = 'xxxxxxxx'
THEN 'invalid'
ELSE 'valid'
END AS Ust
, P_Name
, Sub_Name
, Ps_Name
FROM Pd_Info
GROUP BY Wbs
, CASE
WHEN S_Desc = 'warehouse'
OR P_Desc = 'Originated from warehouse'
OR P_Desc = 'Originated from a partner store'
OR P_Id = 'xxxxxxxx'
THEN 'invalid'
ELSE 'valid'
END
, P_Name
, Sub_Name
, Ps_Name;
SELECT wbs,
MIN(srt),
MAX(srt)
CASE
WHEN cte.p_id = 'xxxxxxxx'
or exists
(select *
from pd_info p2
WHERE (s_desc = 'warehouse'
OR p_desc = 'Originated from warehouse'
OR p_desc = 'Originated from a partner store' )
and p2.p_id = p1.p_id and p2.p_name = p1.p_name and p2.ps_name = p1.ps_name
THEN 'invalid'
ELSE 'valid'
END ust,
p_name,
sub_name,
ps_name,
FROM pd_info p1;
Thank you,
Bangaaram
Known is a DROP, Unknown is an OCEAN. -
How to use dynamic SQL in this case for best performance
I have the table with following columns
ID NUMBER,
DATA LONG,
TAG VARCHAR2(255)
Records in this table will be like following
1 this is an abstract ABSTRACT
1 this is author AUTHOR
1 100 PRICE
2 this is an abstract ABSTRACT
2 this is author AUTHOR
3 contract is this CONTRACT
Basically all the records with the same number constitute 1 record for another table. Tag in the above table indicates that what column it is and DATAwill have the actual data for that column. I need to populate the second table based an the above table but will not get the same number of TAGS all the time. I need to insert the values only for the columns provided in the TAG field. How will I accomplish this by dynamic sql. Do I create a loop and create two strings one with columns and one with values and then combine them and use execute immediate to insert into table? Is there an easier way to do this??
Please respond quickly.
Thanks
Bhawna
null> so which collection should i use to perform it..
so that performance is best......
Program to interfaces. That way, you can switch out implementations and test for yourself which performance is best in an actual production context. But first, write your program so that it works. Worry about refactoring for performance once your program is written and it works.
> plz send me the logic....
Give it a shot on your own first; we can help if you get stuck.
~ -
How to use the List in this case.
I got sample code from http://developer.java.sun.com/developer/technicalArticles/ThirdParty/WebCrawler/. But when I compiled it, there was error message like "webcrawler.java:16: reference to List is ambiguous, both class java.util.List in java.util and class java.awt.List in java.awt match List listMatches; "
I think it might be because it was written by JDK1.1.3. I am using JDK1.4 to compile it. Can any body tell me how to make it can be compiled by JDK1.4?
Thanks a lot.Hi olivia16
There is an interface called java.util.List and a class java.util.List :-)
To correct source code just put java.util. prefix at lines 16 and 76:
java.awt.List listMatches; // 16
listMatches = new java.awt.List(10); // 76
Regards. -
How to use "referenced files" in MY case?
I have a MacBook pro, which I bring with me between home and studio.
Until now, I've been storing my shots on an external HD. This means that I cannot see my photos when I'm home.
I've been looking into the "referenced files"-thing.
I would like to be able to see a preview of all my shots also when I only have my MacBook and not the external drive. When I shoot, I would like to store NEW shots on my MacBook at first (to edit, tag etc.) but then put them on my external drive for storage.
I haven't been able to figure out how to do this. Can anyone please explain or link me to a place where I can read about it?
Thanks in advanceI haven't done this yet, but soon I'll need to coordinate a laptop and a desktop machine. So don't take my word for anything!
It sounds as though you have Aperture set up so that the laptop machine's library is on the external drive -- not just the images that make up the heart of the library. Is that right? The alternative would be to tell Aperture its library is on the laptop, but have the library reference master images on the external drive. Previews -- if you have Aperture set to create and/or maintain previews in any or all projects -- are in the library, which is on the computer whether or not you have the drive containing the masters with you.
(Am I going wrong yet??)
But I'm still not clear, when master images are referenced, where Aperture stores versions, adjustments, metadata; in the library or with the referenced images?
Anyway, it seems as though this arrangement should allow you to import new images into a project in the laptop's library while on the road. Then I don't think you even have to export and re-import the project -- when you're hooked back up to the external you just "relocate masters" for the new project onto the external drive.
Somebody please straighten me out if I've got all this wrong. -
How to use the js in the case of not sure the file name into multiple files to PS?
function place($path){
var idPlc = charIDToTypeID( "Plc " );
var desc28 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc28.putPath( idnull, new File( $path ) );
var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc28.putEnumerated( idFTcs, idQCSt, idQcsa );
var idOfst = charIDToTypeID( "Ofst" );
var desc29 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idRlt = charIDToTypeID( "#Rlt" );
desc29.putUnitDouble( idHrzn, idRlt, 0.000000 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idRlt = charIDToTypeID( "#Rlt" );
desc29.putUnitDouble( idVrtc, idRlt, 0.000000 );
var idOfst = charIDToTypeID( "Ofst" );
desc28.putObject( idOfst, idOfst, desc29 );
executeAction( idPlc, desc28, DialogModes.NO );
for(i=1;i<=4;i++){
place ("E:\\aaa\\"+i+".jpg");
目前我的解决方案是,把多个文件提前修改成数字序列,然后用for循环调用,我想问的是,如果我不更改文件名,是否也可以同时导入多个文件?
At present my solution is to advance the multiple files modified into a sequence of Numbers, and then use a for loop calls, I want to ask is, if I don't change the file name, also can import multiple files at the same time?You could use a file or folder selection dialog and then feed the selected files into the for-clause.
var aFile = selectFile(true);
alert (aFile);
////// select file //////
function selectFile (multi) {
if (multi == true) {var theString = "please select files"}
else {var theString = "please select one file"};
if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.jpg;*.tif;*.psd;*.png', multi)}
else {var theFiles = File.openDialog (theString, getFiles, multi)};
////// filter files for mac //////
function getFiles (theFile) {
if (theFile.name.match(/\.(jpg|tif|psd|png)$/i) || theFile.constructor.name == "Folder") {
return true
return theFiles -
How to use INNER JOIN in such case
when i program as below[CASE1]. the code is able to active.
CASE1:
==========================
DATA: WK_BUKRS LIKE T001-BUKRS,
WK_BUTXT LIKE T001-BUTXT,
WK_TABLE(4) TYPE C VALUE 'T001'.
START-OF-SELECTION.
WK_BUKRS = 'DECN'.
PERFORM GET_BUTXT USING WK_BUKRS WK_TABLE
CHANGING WK_BUTXT.
WRITE: WK_BUTXT.
FORM GET_BUTXT USING I_BUKRS LIKE T001-BUKRS
I_TABLE
CHANGING O_BUTXT LIKE T001-BUTXT.
SELECT SINGLE BUTXT
INTO O_BUTXT
FROM (I_TABLE)
WHERE BUKRS = I_BUKRS.
ENDFORM.
===========================
but when I need to INNER JOIN another table [CASE2]
CASE2:
=======================
DATA: WK_BUKRS LIKE T001-BUKRS,
WK_BUTXT LIKE T001-BUTXT,
WK_TABLE(4) TYPE C VALUE 'T001'.
START-OF-SELECTION.
WK_BUKRS = 'DECN'.
PERFORM GET_BUTXT USING WK_BUKRS WK_TABLE
CHANGING WK_BUTXT.
WRITE: WK_BUTXT.
FORM GET_BUTXT USING I_BUKRS LIKE T001-BUKRS
I_TABLE
CHANGING O_BUTXT LIKE T001-BUTXT.
SELECT SINGLE BUTXT
INTO O_BUTXT
FROM (I_TABLE) AS G INNER JOIN BKPF AS H
ON GBUKRS = HBUKRS
WHERE G~BUKRS = I_BUKRS.
ENDFORM.
=================================
Syntax error:
Wrong expression "INNER" in FROM clause. WHERE condition.
Can anybody help me to solve the problem.
My requirement is to use INNER JOIN with variable tablehi slam,
chk this sample code.
hi,
table emp
empno name
a sasi
b xxx
c yyy
table sal
empno salary
a 1000
b 2000
Inner join
select eempno ename
s~sal
into table int_table
from emp as e
inner join sal as s
on
eempno = sempno.
if you made inner join between table a and b by emp no
the selection retrives only if the condition satisfy the output will be
a sasi 1000
b xxx 2000
rgds
anver
if hlped mark points
Message was edited by: Anversha s -
How to use keyfigure selection in such case
Hi expert,
Here is the case, data like below:
material plant ordqty
A p1 100
A p2 50
B p1 30
I want a new keyfigure to show
material plant ordqty ordqty(all plant)
A p1 100 150
A p2 50 150
B p1 30 30
Could you please give me some idea, thank you in advance.
Edited by: YAODAN on Oct 9, 2011 9:30 AMHi
Please check if the below solution works for you.
1. Have material and plant in rows
2. Put ORDQTY in Key Figure
3. Create a new Formula Key Figure . Use the available function SUMCT to generate Sum of all plants for a particular material.
> SUMCT (ORDQTY)
SUMCT is available under Data Function folder.
Regards
Anindya -
How to use analytical function in this case
SELECT COUNT (rms.status_code) rms_status_count,
rms.status_name rms_status_name,
TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date, 'YYYY') month_year,
MAX (rtd.add_date) date_for_sort
FROM ri_mast_status rms, ri_tran_data rtd
WHERE rtd.status_code = rms.status_code
AND TRUNC (MONTHS_BETWEEN (SYSDATE, rtd.add_date)) < 36
AND NVL (rtd.delete_flg, '0') = '0'
GROUP BY TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date, 'YYYY'),
rms.status_name
ORDER BY MAX (rtd.add_date);
it gives output for the last 3 years based on month and year.r you trying this ?
select *from
select rms.*,
row_number() over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY') order by rtd.add_date) RN,
MAX(rtd.add_date) over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY') order by rtd.add_date) date_for_sort,
COUNT(rms.status_code) over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY') order by rtd.add_date) rms_status_count
FROM ri_mast_status rms, ri_tran_data rtd
WHERE rtd.status_code = rms.status_code
AND TRUNC (MONTHS_BETWEEN (SYSDATE, rtd.add_date)) < 36
AND NVL (rtd.delete_flg, '0') = '0'
where rn=1 -
How to use partition by instead of group by?
Hi,
I am having trouble using partition by clause in following case,
column other_number with null values contains 10 records in 'some_table'
5 records with date 11-01-2009, item_code = 1
5 records with date 10-01-2009, item_code = 2
This query returns all 10 records, (which suppose to return 2)
SELECT count (a.anumber) over (partition by TO_char(a.some_date,'MM'), a.item_code) AS i_count, a.item_code,
TO_char(a.some_date,'MM')
FROM some_table
WHERE to_char(a.some_date,'yyyy') = 2009
AND a.other_number IS NULL
Works fine if I wrote like this,
SELECT count (a.anumber) AS i_count, a.item_code,
TO_char(a.some_date,'MM')
FROM some_table
WHERE to_char(a.some_date,'yyyy') = 2009
AND a.other_number IS NULL
group by TO_char(a.some_date,'MM'), a.item_code
How to use partition by in this case?Hi,
Almost all of the aggregate functions (the ones you use in a GROUP BY query) have analytic counterparts.
You seem to have already discovered that whatever values are returned by
an aggregate funcition using "GROUP BY x, y, z" can also be found with
an analytic function using "PARTITION BY x, y. z".
Aggregate queries collapse the result set.
The aggregate COUNT function:
SELECT deptno
, COUNT (*) AS cnt
FROM scott.emp
GROUP BY deptno
;tells how many of the 14 employees are in each of the 3 departments.
So does the analytic COUNT function:
SELECT deptno
, COUNT (*) OVER (PARTITION BY deptno) AS cnt
FROM scott.emp
;but the first query produces 3 rows of output, the second query produces 14.
You could get 3 rows of output using the analytic function and SELECT DISTINCT , but it's inefficient.
Which should you use? Like so many other things, the answer depends on what data you have, and what results you want from that data.
If you want collapsed results (one row per group), that's a striong indication that you'll want aggregate, not analytic functions.
If you want one row of output for every row in the table, that's a strong indication that you'll want analytic functions.
If you have a particular question, ask it. Post some sample data and the results you want from that data, as Rob said.
There is another important difference between aggreate and analytic functions: analytic functions can easily be restricted to a window , or subset, of the data set. This is something like a WHERE clause, but a WHERE clause applies to the whole query: a wondowing condition applies only to an individual row.
If you need to compute a SUM of rows with an earlier order_date than this row or an average of the last 5 rows, then you proabably want to use analytic function. -
How to use multiple statements inside the "THEN" block of CASE statement?
Below is the code:
SET @strTempString = case @strKeyMode
WHEN 'AUTO/CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'COMMERCIAL'
THEN @strRefID + '|' + @strRetID
WHEN 'ISNAP'
THEN set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
'' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType
WHEN 'ASNAP'
THEN @strRefID + '|' + @strRetID
WHEN 'MOAT'
THEN @strRefID + '|' + @strRetID
else '0'
end
The first 3 conditions are understandable. How to use multiple statements in 4th case?
Here I first want to set the value as:
set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
and then return the string '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType to @strTempString.
Please help me remove the syntax errors.
Thanks in advance.Try below SQL
DECLARE @strKeyMode varchar(20) = 'ISNAP'
DECLARE @SQL VARCHAR(MAX)
DECLARE @strRefID int=1
DECLARE @strRetID INT=2
--FIRST WAY
IF @strKeyMode ='AUTO/CYCLE'
SELECT CAST(@strRefID as varchar(10))
ELSE IF @strKeyMode ='CYCLE'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
ELSE IF @strKeyMode='ISNAP'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE
SELECT @SQL='ABC'
print @sql
----SECOND WAY
SELECT @SQL = CASE @strKeyMode
WHEN 'AUTO/CYCLE' THEN CAST(@strRefID as varchar(10))
WHEN 'CYCLE' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
WHEN 'ISNAP' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE 'No Record'
END
PRINT (@SQL)
--Prashanth -
How to use forecast and safety stock
Hi
We have below business case for MRP case and scenarios , please guide me how to use safety stock in this case.
Requirement : System should always raise PR for quantity of forecast only , if forecast in not available then for the safety stock
Planning cycle
100 (Monday)
Deliver cycle
500(Friday)
Forecast model
S
Lead time
4
Safety stock
10Hi
Did anyone have idea how to use safety stock with forecast in such a way that System should always raise PR for quantity of forecast only , if forecast in not available or less then the safety stock quantity PR will be raise with safety stock quantity -
How To Use Your Own Router with Out Loosing Verizon's FIOS Services
How to use your own router with Verizon’s FIOS Service
First, you need a basic understanding of how FIOS works but unfortunately there are two types of FIOS systems out there. All of the systems utilize a fiber optic cable to bring TV, phone and internet to your location over one optic cable. In addition these systems provide interactivity including widgets, remote DVR, movies on demand and so forth via an IP (Internet Protocol) signal. Your STB (Set Tip Box) requires both a video and IP signal. The IP signal is necessary for all of the aforementioned interactivity. The fiber cable terminates at the Optical Network Terminal or ONT for short. The ONT converts the optics into a digital signal that can be utilized by ones equipment. From the ONT your video, phone and internet are provided to the location. This is where things can differ as the internet signal can be provided via a coaxial (MoCA or Multimedia over Coax Alliance) or RJ45 Cat5 (Ethernet) cable. It is important to identify and understand the differences of these two setups. In my case I have my internet entering via Ethernet cable, which in my humble opinion makes things a heck of a lot easier.
How does one tell the difference? In most cases it’s rather simple; just look at the Verizon’s router WAN (Wide Area Network) Port. Does it have a RJ45 (Ethernet) or Coax (TV cable Cord) going to it? If the router’s WAN port doesn’t have a coaxial connector then one will need to convert the MoCA signal into a usable Ethernet signal that routers understand. The easiest way is to use Verizon’s router as a bridge. In this method the Verizon’s router simply converts the signal and passes it along to your own router. The challenge is to try to maintain the interactivity that FIOS TV provides. Because of this one needs to supply the IP routed signal back to the FIOS router. There are multiple methods for doing this and I would recommend investigates which one make the most sense.
In my particular case the IP signal was provided by Ethernet. Again there are various ways of installing one’s own router. The hardest is to utilize Verizon’s router as a bridge. This setup requires configuring Verizon’s router as a bridge and also creating a VLAN (Virtual Local Area Networks). In addition one needs to set up their own router so it will work with the various routing tables and networks. For me this is too complex for the average person and it can be difficult to trouble shoot if something goes wrong. Please consider that Verizon will not support utilizing third party routers.
The easier method is to request an Ethernet signal (if you don’t already have one) from their ONT. I would highly recommend getting your hands on a NIM or Network Interface Module. This device is used to convert Ethernet to Coaxial so it can be fed back to your STBs. These can be purchased online and Verizon technicians can be a valuable resource with these sorts of acquisition. At the very least they can point you to the right direction. Once you have a NIM the rest is rather simple.
Log into the current Verizon Router.
Located the router’s MAC address and copy it down.
Go to the port forwarding section and copy down the Applied Rules.
Example:
Network Computer/Device: 192.168.1.100:63145
Application & Ports Forward: Application UDP Any -> 6347
Note: There may be up to three entries for each one of your Set Top Boxes.
Look at your current device list, typically found on the home screen. Copy down your STB MAC and IP address.
Example:
IP-STB1
Connection Type: Ethernet
* IP Address: 192.168.1.100
IP Address Allocation: DHCP
*MAC Address: 07:73:fFe:ad:8b:3f
* Things you will need to write down
Go to the network section and look for the main Ethernet connection. Select this and then select more setting, typically found at the bottom. Release the current lease.
Remove the Verizon router
Install your router
Connect the NIM by plugging in an Ethernet from one of the routers LAN (Local Area Network) ports to your NIM. Then connect the coax cable, the same cable that was used by Verizon router.
Set you DHCP routing IP pool to accommodate Verizon’s STB IP’s (note their IP’s start at 192.168.1.100)
Go to DHCP section and reserve the STB IP’s by inserting the IP’s and MAC addresses. This shall ensure that nothing else utilizes the same IPs as the STBs thereby preventing IP address conflict.
Add the port forwards from Step 5 above.
Clone Verizon’s Mac Address utilizing the info from step 2
Finish setting up the router in typical fashion.
Unplug and re-plugin your STB’s and test functionality. It’s best to try using a widget or Movie on demand function.
Note: if the new router can net get an internet signal contact Verizon’s support and have them release the IP and reset the ONT.
EVERYTHING should be working at this point.3 Go to the port forwarding section and copy down the Applied Rules.
Example:
Network Computer/Device: 192.168.1.100:63145
Application & Ports Forward: Application UDP Any -> 6347
Note: There may be up to three entries for each one of your Set Top Boxes.G
Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
whatever, the STB's start at 192.168.1.100 and icement by 1 for each
the port addr's will be 63145 alo incrementing by 1
there is 1 entry for each in my pf list
however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
Why do you clone the mac addr?? -
How to use MS GSM support in JMF?
Hello,
Anyone has idea how to use the MS GSM encoding and decoding support in JMF.
As Microsoft GSM is different from the standard GSM 6.10, however, JMF can both read and write MS-GSM coded file (in .wav wrapper). Here I would like to know whether it is possible to have real-time encoding and decoding in MS GSM format?
This is very important for me as I need to use PocketPC for live audio streaming and it only support microsoft GSM coding.
Thanks in advance
/h.b.Hello,
Did you (hotbee) eventually solved your problem ?
I'm writing an application which listens to a GSM 06.10 audio stream from a multicast socket.
The application that sends the audio is written in C++ and I don't manage to find the correct parameters for JMF to be able to decode it...
Here is the C++ code that encodes the audio :
m_WaveFormatEx.wfx.wFormatTag = WAVE_FORMAT_GSM610;
m_WaveFormatEx.wfx.nChannels = 1;
m_WaveFormatEx.wfx.nSamplesPerSec = 9920;
m_WaveFormatEx.wfx.nBlockAlign = 65;
m_WaveFormatEx.wfx.wBitsPerSample = 0;
m_WaveFormatEx.wfx.cbSize = 2;
m_WaveFormatEx.wSamplesPerBlock = 320;
m_WaveFormatEx.wfx.nAvgBytesPerSec = (m_WaveFormatEx.wfx.nSamplesPerSec / 320) * 65; Is JMF (Windows performance pack) able to decode this ?
If so, what is the AudioFormat I should return from my custom SourceStream ?
I tried quite a lot of parameters (GSM, GSM_MS with various combination of parameters), but couldn't get an audible sound... :(
Thanks for any help !
Julien -
MAX(SummaryNum) +1 bad idea, but how to use sequence part composite column
Hi,
My relational mode is as follows
Policy (policynum PK) has 1:M with Summary (policynum FK, SummaryNum part of PK, other columns part of PK)
Basically for each policy users can enter notes with SummaryNum 1, 2, 3, 4.... These numbers are shown to the user for tracking purpose. I need to make sure summary notes for EACH policy start with 1 (cannot really use sequence in the table in the strictest sense) and are incremented by 1. The current Oracle form basically creates the next highest possible value of SummaryNum by adding one to the currently available highest value. In brief, it is like a sequence number for summaries of a particular policy in the summary table.
PRE-INSERT
SELECT MAX(SummaryNum ) + 1
FROM Summary
I am trying to replicate this in ADF BC (using 11g) and know that not using sequencing and adding one to get the next number is a very bad idea due to concurrency challenges (transactional ACID properties). The reasons are as follows.
• Using MAX(policy_memo_seq_num) + 1 is not scalable,
• It will lead to duplicates in a multi-user environment, whether ADF BC, Oracle Forms, or any other technology
I also know how to use create a sequence in db, a related trigger, and then set the attribute in EO properties as DBSequence. My challenge is that since SummaryNum is not a primary key, and instead is part of a composite key in my case, how do I make sure that summary notes for EACH policy start with 1 in the Summary Table.
I appears that i cannot really use sequence in the table in the strictest sense as this will mean that for policies the summaryNum will start from the next available sequence number, but what i really want is to have it start by one for all policies.*
I would appreciate any help.
Thanks,Not sure if there is a better way, but here is one way. Let's say your table was like this:
SQL> desc versioned_item
Name Null? Type
ID NOT NULL NUMBER
VERSION NOT NULL NUMBER
DESCRIPTION VARCHAR2(20)and lets say your data looked like this:
SQL> select * from versioned_item order by id, version
ID VERSION DESCRIPTION
1001 1 Item 1001
1001 2 Item 1001
1001 3 Item 1001
1002 1 Item 1002
1002 2 Item 1002
1003 1 Item 1003To select only the rows for the max-version-id, you could do this:
select id, version,description
from versioned_item
where (id,version) in (select id,max(version) from versioned_item group by id)
order by id
ID VERSION DESCRIPTION
1001 3 Item 1001
1002 2 Item 1002
1003 1 Item 1003To capture this as a view object, you'd only just need to paste in the WHERE clause above into the Where clause box of the view object. No need to use expert-mode since you're not changing the select list or from clause.
Maybe you are looking for
-
How can i check if a procedure exists in a certain database version
So today i became really frustrated after noticing that the Oracle SQL version on some computer I needed to work on was 10.1. The problem with that was that I needed a procedure called "xmlserialize". I browsed the documentation for it, but I didn't
-
please help me how to authorize my computer as it always say The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed.
-
In app store on the iphone 4 featured app has no back button.
I tried restarting the app store... Rebooting the phone and also did a restore and switching from updates back to featured. the app store still stays at the featured app area where it shows the app linkedin.. I can not see the new apps. please help!
-
Thursday I upgraded from a premium to a family plan. However, when the other person is trying to use the token to access her invitation, she's told that she isn't in the same country as the owner (me.) My display shows me in the USA, hers shows hers
-
I was trying to share photos from my iphone to my windows base computer through homeshare. It showed it was transferring or copying the files, then indicated it was done. I disconnected my phone but when i checked it, all my 250-odd pictures except f